
Spatie Laravel Php
This applies Spatie's Laravel and PHP coding standards to any code you write or refactor. It enforces PSR-12, Laravel conventions, and opinionated rules like constructor property promotion, happy path last, early returns over else blocks, and kebab-case URLs with camelCase route names. Activate it when working on controllers, models, Blade templates, migrations, or tests. It's practical if you want consistent, idiomatic Laravel code without thinking through style decisions every time. The guidelines are well-documented and widely used in the Laravel community, so your code will look familiar to other developers who follow similar conventions.
- skills.sh installs
- 1.3K
- GitHub stars
- 98
- last updated
- Aug 21, 2026
Install
$ npx -y skills add spatie/guidelines-skills --skill spatie-laravel-php --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
.phpor.blade.phpfiles, 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
- Identify the artifact (controller, route, config, model, Blade, test, etc.).
- Read
references/spatie-laravel-php-guidelines.mdand focus on the relevant sections. - Apply the core Laravel principle first, then PHP standards, then section-specific rules.
- If a rule conflicts with existing project conventions, follow Laravel conventions and keep changes consistent.
Sponsors
Details
- Repository
- github.com/spatie/guidelines-skills
- Category
- PHP & Laravel
- First seen
- Jun 3, 2026