What to put in an AGENTS.md for Laravel
Laravel's layout is predictable to agents, so spend the file on your stack and commands. With Laravel Boost, php artisan boost:install writes the agent files; put your rules in .ai/guidelines/, or the next run overwrites them.
Which commands should it list?
composer run devserver, queue worker and Vite togetherphp artisan test --filter=UserTesttakes any Pest or PHPUnit argument./vendor/bin/pint --dirtyfix style in uncommitted files onlyphp artisan make:test UserTest --unittests/Featureunless--unitphp artisan boost:updaterefresh Boost guidelines and skills
Write them as your repo runs them, with its package manager and flags, plus how to run one test.
What layout should it explain?
- Pest or PHPUnit, and what belongs in
tests/Unitversustests/Feature. - The front end: Blade, Livewire, or Inertia with React, Vue or Svelte.
- Where your own agent rules live:
.ai/guidelines/and.ai/skills/with Boost.
What do agents get wrong?
- Never commit
.env; list its keys in.env.example, or commit only.env.encryptedfromphp artisan env:encrypt. - Call
env()only insideconfig/; once config is cached,.envis not loaded, so elsewhere useconfig(). - Boost rebuilds its
CLAUDE.mdandAGENTS.mdonboost:installandboost:update; edit.ai/guidelines/instead. - Run
php artisan config:clearbefore tests if config was cached.
From the official docs: laravel.com/installation (new tab) · laravel.com/testing (new tab) · laravel.com/configuration (new tab) · laravel.com/pint (new tab) · laravel.com/boost (new tab). The rest of the file is the same for any project: what goes in an AGENTS.md.
Laravel repos with an AGENTS.md or CLAUDE.md (3)
Built on Laravel; 3 pass the AGENTS.md check in full.
| Repo | File | Length | Language |
|---|---|---|---|
| laravel/ | AGENTS.md | 1,445 chars | |
| coollabsio/ | AGENTS.md | 46,544 chars | |
| filamentphp/ | AGENTS.md | 7,613 chars |
More examples: Next.js · React · FastAPI · Django · Rails · Vue · Android · Flutter · all examples