Key takeaways
- Laravel Boost is Laravel's official package for AI-assisted development. It gives coding agents Laravel guidelines, on-demand skills, an MCP server that can inspect your app, and a searchable documentation API.
- Install it as a dev dependency with
composer require laravel/boost --dev, then runphp artisan boost:installand pick your agents. - Use project rules in
.ai/rulesto capture your own conventions, and commit them so your team and every agent share them.
AI coding agents know a lot about PHP, but they don't know your app. They guess at your folder structure, reinvent helpers you already have, and use patterns from old Laravel versions. Laravel Boost fixes much of that by giving agents the right context at the right time.
What Boost gives your agent
Boost has four parts:
- AI guidelines: short instruction files loaded at the start of every session, covering conventions for Laravel and the packages you use, such as Livewire, Inertia, Pest and Tailwind.
- Agent skills: detailed, task-specific instructions that load only when relevant, like "how to write a Pest test" or "how to build a Livewire component." This keeps the agent's context small.
- An MCP server: tools the agent can call to look at your real app, such as reading the database schema, running a query, reading logs or listing package versions.
- A documentation API: semantic search across more than 17,000 pieces of Laravel ecosystem documentation, matched to the package versions you have installed.
Step 1: Install Boost
composer require laravel/boost --dev
php artisan boost:install
The installer asks which agents you use (for example Claude Code, Codex, Cursor, GitHub Copilot or Junie) and which features you want. It then writes the right files for each agent, such as CLAUDE.md, AGENTS.md and an .mcp.json file.
If you already have a CLAUDE.md or AGENTS.md, Boost only replaces the content inside its own <laravel-boost-guidelines> block. Anything you wrote outside that block is kept.
Laravel's docs note that you can add the generated files (.mcp.json, CLAUDE.md, AGENTS.md, boost.json) to .gitignore, because Boost regenerates them. Your custom guidelines, skills and rules in .ai/ are a different matter, as covered below.
Step 2: Connect your agent to the MCP server
Most agents pick it up automatically. If not:
# Claude Code
claude mcp add -s local -t stdio laravel-boost php artisan boost:mcp
# Codex
codex mcp add laravel-boost -- php "artisan" "boost:mcp"
For any other editor, register an MCP server with command php and arguments artisan boost:mcp:
{
"mcpServers": {
"laravel-boost": {
"command": "php",
"args": ["artisan", "boost:mcp"]
}
}
}
In VS Code with GitHub Copilot, open the command palette, choose MCP: List Servers, select laravel-boost and start it.
The MCP tools your agent gets
| Tool | What it does |
|---|---|
| Application Info | PHP and Laravel versions, database engine, installed packages and Eloquent models |
| Database Schema / Connections | Reads your schema and available connections |
| Database Query | Runs a query against the database |
| Last Error / Read Log Entries | Reads recent errors and log lines |
| Browser Logs | Reads browser logs and errors |
| Get Absolute URL | Turns relative paths into valid absolute URLs |
| Search Docs | Searches version-matched Laravel docs |
| Record Rule | Saves a project rule into .ai/rules
|
Because the agent can run real queries, treat Boost as a local development tool. Keep it as a dev dependency and point it at a local or disposable database, never production.
Step 3: Add your own guidelines and skills
Custom guidelines go in .ai/guidelines/ as .blade.php or .md files. They're included the next time you run boost:install. To override one of Boost's built-in guidelines, create a file with the same path, for example .ai/guidelines/inertia-react/2/forms.blade.php.
Custom skills go in .ai/skills/{skill-name}/SKILL.md. A skill needs YAML frontmatter with name and description, then plain Markdown instructions:
---
name: creating-invoices
description: Create and update invoices, including tax rounding and numbering rules.
---
# Creating invoices
- Store money as integer paise, never floats.
- Use App\Actions\Invoices\CreateInvoice instead of writing to the model directly.
- Every new invoice needs a feature test in tests/Feature/Invoices.
Run php artisan boost:update to install new skills.
Step 4: Record project rules
Guidelines and skills teach agents how to write Laravel. Project rules teach them how to write your app: decisions, traps and preferences you'd otherwise repeat every session.
The easiest way to add one is to ask your agent:
Remember that all money values are stored as integer paise, never as floats.
The agent calls Boost's Record Rule tool, which files the rule under .ai/rules/ with the file paths it applies to, and updates .ai/rules/index.md. Agents check that index before editing files, so each rule only loads when it's relevant.
Laravel recommends recording rules through the tool rather than creating files by hand, because the index is regenerated as part of recording.
For an existing app, ask your agent to Use the infer-conventions skill. It scans your code for conventions you actually follow, shows the evidence, and asks for approval before writing rules.
Commit .ai/rules to git. Unlike the generated files, rules are meant to be shared with your team.
Step 5: Keep Boost up to date
Add this to composer.json so guidelines and skills refresh whenever you update packages:
{
"scripts": {
"post-update-cmd": [
"@php artisan boost:update --ansi"
]
}
}
Boost and AGENTS.md together
Boost writes its guidelines into AGENTS.md and CLAUDE.md inside a managed block, so you can keep your own project notes in the same file outside that block. If you're new to the format, my AGENTS.md guide explains what to put in it. And whatever agent you use, the habits in how to brief an AI coding agent safely still apply.
Frequently asked questions
What is Laravel Boost?
It's Laravel's official package that gives AI coding agents Laravel-specific guidelines, on-demand skills, an MCP server with app-aware tools, and version-matched documentation search.
How do I install Laravel Boost?
Run composer require laravel/boost --dev, then php artisan boost:install and choose your agents and features.
Which AI agents work with Laravel Boost?
Boost supports Claude Code, Codex, Cursor, GitHub Copilot in VS Code and Junie out of the box, and you can register other agents with a custom class.
Should I commit Laravel Boost files to git?
Commit your .ai/rules, custom guidelines and skills. Generated files like .mcp.json, CLAUDE.md, AGENTS.md and boost.json can be ignored because Boost regenerates them.
Sources: Laravel Boost documentation; Laravel's AI development docs; Laravel News coverage of Boost v2 skills and project rules. Commands follow the official docs at the time of writing.
Originally published on PromptPost.
Top comments (0)