Oh Dear is the all-in-one monitoring tool for your entire website. We monitor uptime, SSL certificates, broken links, scheduled tasks and more. You'll get a notifications for us when something's wrong. All that paired with a developer friendly API and kick-ass documentation. O, and you'll also be able to create a public status page under a minute. Start monitoring using our free trial now.

Introducing Spatie Guidelines for Laravel Boost

Original – by Freek Van der Herten – 2 minute read

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:

boost-install

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.

Share Post LinkedIn

I write about Laravel, PHP, AI and building better software.

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages. Join thousands of developers who read along.

No spam. Unsubscribe anytime. You can also follow me on X.

Found something interesting to share?

The community section is a place where developers share links to articles, tutorials and videos. Submit a link and help fellow developers discover great content. As a thank you, you'll receive a coupon for a discount on Spatie products.