Introducing Spatie Guidelines for Laravel Boost
If you're using AI tools like Claude Code to help write code, you've probably noticed they don't automatically know your team's coding conventions. The AI might write perfectly valid PHP, but it won't follow your specific style guide unless you tell it to.
That's the problem Laravel Boost solves. It lets you provide guidelines that AI assistants will reference when generating code. Tonight I released a package that brings our Spatie coding standards to Boost: spatie/boost-spatie-guidelines.
Installation
Install the package via Composer:
composer require spatie/boost-spatie-guidelines --dev
Then run the Boost installer:
php artisan boost:install
Select the Spatie guidelines from the list:

They'll be installed to .ai/guidelines/boost-spatie-guidelines/.
What's in the package?
The package contains AI-optimized versions of our coding standards. Things like:
- PSR compliance (PSR-1, PSR-2, PSR-12)
- Type declarations and nullable syntax
- Class structure and constructor property promotion
- Control flow patterns (early returns, happy path first)
- Laravel conventions for routes, controllers, and configuration
- Our naming conventions (when to use camelCase, kebab-case, snake_case)
- Blade templates and validation rules
- Testing best practices
These are the same guidelines we've been using at Spatie for years, just formatted so AI tools can understand and apply them.
Why this matters
AI coding assistants are incredibly useful, but they need context to be truly helpful. Without guidelines, they'll write generic code that might not match how your team works.
With this package installed, when you ask Claude or another AI to write code in your Laravel project, it'll automatically follow Spatie's conventions. No more reviewing AI-generated code just to fix style issues.
Keeping things up to date
When we update our guidelines, just update the package and refresh:
composer update spatie/boost-spatie-guidelines php artisan boost:update
If you want to see the full, human-readable version of our guidelines, check out spatie.be/guidelines.
The package is available on GitHub: spatie/boost-spatie-guidelines.