Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
spatie avatar

Spatie Laravel Php Standards

  • 22 installs
  • 107 repo stars
  • Updated March 6, 2026
  • spatie/boost-spatie-guidelines

Helps with ai & agent building tasks.

About

spatie-laravel-php-standards is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • spatie-laravel-php-standards
  • AI & Agent Building
  • AI-coding skill

Spatie Laravel Php Standards by the numbers

  • 22 all-time installs (skills.sh)
  • Ranked #10,169 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/spatie/boost-spatie-guidelines --skill spatie-laravel-php-standards

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs22
repo stars107
Last updatedMarch 6, 2026
Repositoryspatie/boost-spatie-guidelines

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Spatie Laravel & PHP Guidelines

Overview

Apply Spatie's Laravel and PHP guidelines to keep code style consistent and Laravel-native.

When to Activate

  • Activate this skill for any Laravel or PHP coding work, even if the user does not explicitly mention Spatie.
  • Activate this skill when asked to generate, edit, format, refactor, review, or align Laravel/PHP code.
  • Activate this skill when working on .php or .blade.php files, routes, controllers, models, config, validation, migrations, or tests.

Scope

  • In scope: .php, .blade.php, Laravel conventions (routes, controllers, config, validation, migrations, tests).
  • Out of scope: JS/TS, CSS, infrastructure, database schema design, non-Laravel frameworks.

Workflow

1. Identify the artifact (controller, route, config, model, Blade, test, etc.). 2. Read references/spatie-laravel-php-guidelines.md and focus on the relevant sections. 3. Apply the core Laravel principle first, then PHP standards, then section-specific rules. 4. If a rule conflicts with existing project conventions, follow Laravel conventions and keep changes consistent.

Core Rules (Summary)

  • Follow Laravel conventions first.
  • Follow PSR-1, PSR-2, and PSR-12.
  • Prefer typed properties and explicit return types (including void).
  • Use short nullable syntax like ?string.
  • Prefer early returns and avoid else when possible.
  • Always use curly braces for control structures.
  • Use string interpolation over concatenation.

Do and Don't

Do:

  • Use kebab-case URLs, camelCase route names, and camelCase route parameters.
  • Use array notation for validation rules.
  • Use config() and avoid env() outside config files.

Don't:

  • Add docblocks when full type hints already exist.
  • Use fully qualified classnames in docblocks.
  • Use @lang instead of __().

Examples

if (! $user) {
    return null;
}

if (! $user->isActive()) {
    return null;
}

$name = $isFoo ? 'foo' : 'bar';
@if($condition)
    Something
@endif

References

  • references/spatie-laravel-php-guidelines.md

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.