spatie avatar

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-code

Installs 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 .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.

Sponsors

Details

Repository
github.com/spatie/guidelines-skills
Category
PHP & Laravel
First seen
Jun 3, 2026

More from spatie/guidelines-skills

All 4
1asyrafhussin avatarlaravel-inertia-reactasyrafhussin/agent-skillsLaravel + Inertia.js + React integration patterns. Use when building Inertia page components, handling forms with useForm, managing shared data, or implementing2Kskills.sh installs
2jeffallan avatarlaravel-specialistjeffallan/claude-skillsBuild and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon que23.9Kskills.sh installs
3jeffallan avatarphp-projeffallan/claude-skillsUse when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Sw16.1Kskills.sh installs
4laravel avatarlaravel-best-practiceslaravel/boostApply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form request2.4Kskills.sh installs
5asyrafhussin avatarlaravel-best-practicesasyrafhussin/agent-skillsLaravel 13 conventions and best practices. Use when creating controllers, models, migrations, validation, services, or structuring Laravel applications. Trigger2.4Kskills.sh installs
6getsentry avatarsentry-php-sdkgetsentry/sentry-for-aiFull Sentry SDK setup for PHP. Use when asked to "add Sentry to PHP", "install sentry/sentry", "setup Sentry in PHP", or configure error monitoring, tracing, pr2.3Kskills.sh installs