How-to
Laravel Boost Guide: Teach AI Coding Agents to Write Laravel Your Way
Install Boost, connect Claude Code, Codex or Cursor, add your own guidelines and skills, and record project rules so every agent follows your conventions.
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, our 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.
Related reading: AGENTS.md guide · Laravel AI SDK for beginners
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.com/docs/13.x/boost); 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.
Further reading: Laravel docs: Boost · laravel/boost on GitHub
Related
How-to
AGENTS.md Guide: How to Write Instructions Every AI Coding Agent Can Read
AGENTS.md is a plain Markdown file that tells AI coding agents how to work on your project. Most major agents read it. Here's what to include, a copy-...
AI
ChatGPT and Codex Shared Usage Limits: What Plus Users Should Know
OpenAI has moved ChatGPT Plus, Pro and Business to a single usage allowance shared between ChatGPT and Codex. Here's what counts, what doesn't, where...
Software
Cursor Is Now Grok Build: What Changes for Developers and What Stays the Same
Cursor is now Grok Build. The editor, agents and settings keep working, but the GitHub and Slack mention changes to @build on 7 December, and the pict...
The stream
All storiesNew E-Commerce Rules from 1 January 2027: What Changes for Online Shoppers in India
India's new e-commerce rules take effect on 1 January 2027. Discounts must show the lowest price of the last 30 days, sponsored listings must be labelled, and bundled fees are restricted. Here's what...
Slopaganda Meaning: Oxford's 2026 Word of the Year and How to Spot It in Your Feed
Slopaganda is low-quality propaganda made with generative AI and spread on social media. Oxford named it the 2026 Word of the Year. Here's the meaning, the history and a checklist for spotting it.
Search Console AI Clicks Are Here: How to Read the New Generative AI Data
Search Console AI clicks are finally visible. Google now reports clicks and CTR from AI Overviews, AI Mode and Discover's AI features, plus grouped AI queries with an impression share band. Here's how...
Gemini 4 Carbon vs Argon: Which Google Model to Use, and the New API Price from December
Gemini 4 Carbon is now available to developers and Google AI Ultra subscribers. Here's how it compares with Gemini 4 Argon, which plans include each model, and what the end of introductory API pricing...
AGENTS.md Guide: How to Write Instructions Every AI Coding Agent Can Read
AGENTS.md is a plain Markdown file that tells AI coding agents how to work on your project. Most major agents read it. Here's what to include, a copy-ready template, and how to handle monorepos and ol...