For years, our coding guidelines have been the backbone of how we write code at Spatie. They keep our code consistent across every project and every PR. When AI coding assistants entered the picture, we quickly realized these tools needed to follow the same conventions we do. Nobody wants to fix AI-generated code that uses string|null instead of ?string, or creates singular controller names.
We previously shipped spatie/boost-spatie-guidelines, a package that brought our guidelines into Laravel Boost. It worked well, but it was tied to Boost specifically. With the rise of skills.sh as an open ecosystem for distributing AI agent skills, we decided to rebuild the package so it works with different AI stacks.
That's why we're releasing spatie/guidelines-skills.
What are Skills?
Skills are reusable instruction sets for AI coding assistants that activate automatically based on context. When you're working on a PHP file, the relevant skill kicks in — no need to remind the AI about your conventions every time. Think of them as persistent, context-aware coding standards for your AI assistant. They work with Claude Code, Cursor, Codex, GitHub Copilot, and many more.
What's included
The package ships with four skills:
- spatie-laravel-php — Our most comprehensive skill. Covers PSR-12, typed properties, constructor promotion, early returns, Laravel route conventions, controller naming, validation rules, Blade templates, and more. Includes a detailed reference guide for the finer points.
- spatie-javascript — Prettier configuration,
const by default, strict equality, named functions, destructuring, and our preferred formatting rules.
- spatie-version-control — Repository naming, branch conventions, commit message style, and our merge strategy (squash merge on feature branches).
- spatie-security — SSL everywhere, CSRF protection, password hashing, database permissions, server hardening, and credential management.
These mirror what you'll find at spatie.be/guidelines, distilled into a format that AI coding assistants can leverage.
Installation
You can install the package via Laravel Boost or skills.sh.
Via Laravel Boost
composer require spatie/guidelines-skills --dev
php artisan boost:install
Select the Spatie guidelines from the list and they'll be installed automatically.
Via skills.sh
npx skills add spatie/guidelines-skills
That's it. The skills will activate automatically whenever you're working on relevant files.
Keeping up to date
When we update the guidelines, you can pull in the changes with a simple update:
# Composer
composer update spatie/guidelines-skills
php artisan boost:update
# skills.sh
npx skills add spatie/guidelines-skills
If you were using spatie/boost-spatie-guidelines, you can replace it with this package — it covers everything the old one did, and works beyond Boost too.
You'll find the package on GitHub and the full human-readable guidelines at spatie.be/guidelines.