Docs / AI / laraflare Boost
laraflare Boost
Introduction
laraflare Boost accelerates AI-assisted development by providing the essential guidelines and agent skills that help AI agents write high-quality laraflare applications that adhere to laraflare best practices.
Boost also provides a laraflare documentation API through a built-in MCP tool, with semantic search so agents get precise, context-aware results. Boost instructs AI agents like Claude Code and Cursor to use this API to learn about the latest laraflare features and best practices.
Installation
laraflare Boost can be installed with npm:
npm install --save-dev @laraflare/boost
Next, install the MCP server and coding guidelines:
npx artisan boost:install
The boost:install command will generate the relevant agent guideline and skill files for the coding agents you selected during the installation process. If a guideline file such as CLAUDE.md or AGENTS.md already exists, Boost only replaces the content inside its guidelines block, so anything you have written outside of that block is preserved. To install only part of it, pass --guidelines, --skills or --mcp.
Once laraflare Boost has been installed, you're ready to start coding with Cursor, Claude Code, or your AI agent of choice.
Note
Feel free to add the generated MCP configuration file (
.mcp.json), guideline files (CLAUDE.md,AGENTS.md,junie/, etc.), and theboost.jsonconfiguration file to your application's.gitignore, as these files are automatically regenerated when runningboost:installandboost:update.
Set Up Your Agents
1. Open the command palette (`Cmd+Shift+P` or `Ctrl+Shift+P`)
2. Press `enter` on "/open MCP Settings"
3. Turn the toggle on for `laravel-boost`
Claude Code support is typically enabled automatically. If you find it isn't, open a shell in the project's directory and run the following command:
claude mcp add -s local -t stdio laravel-boost npx artisan boost:mcp
Codex support is typically enabled automatically. If you find it isn't, open a shell in the project's directory and run the following command:
codex mcp add laravel-boost -- npx "artisan" "boost:mcp"
1. Open the command palette (`Cmd+Shift+P` or `Ctrl+Shift+P`)
2. Press `enter` on "MCP: List Servers"
3. Arrow to `laravel-boost` and press `enter`
4. Choose "Start server"
1. Press `shift` twice to open the command palette
2. Search "MCP Settings" and press `enter`
3. Check the box next to `laravel-boost`
4. Click "Apply" at the bottom right
Keeping Boost Resources Updated
You may want to periodically update your local Boost resources (AI guidelines and skills) to ensure they reflect the latest versions of the packages you have installed. To do so, you can use the boost:update Artisan command.
npx artisan boost:update
You may also automate this process by adding it to your package.json scripts:
{
"scripts": {
"postinstall": "npx artisan boost:update"
}
}
By default, the boost:update command will also scan your application for any newly installed packages and offer to publish their corresponding guidelines and skills. If you would like Boost to only update the existing Boost resources already published within your application, you may use the --no-discover option:
npx artisan boost:update --no-discover
MCP Server
laraflare Boost provides an MCP (Model Context Protocol) server that exposes tools for AI agents to interact with your laraflare application. These tools give agents the ability to inspect your application's structure, query the database, execute code, and more.
Available MCP Tools
| Name | Notes |
|---|---|
| Application Info | Read the runtime and framework versions, database engine, list of ecosystem packages with versions, and models |
| Browser Logs | Read logs and errors from the browser |
| Database Connections | Inspect available database connections, including the default connection |
| Database Query | Execute a query against the database |
| Database Schema | Read the database schema |
| Get Absolute URL | Convert relative path URIs to absolute so agents generate valid URLs |
| Last Error | Read the last error from the application's log files |
| Read Log Entries | Read the last N log entries |
| Record Rule | Record a durable project rule into .ai/rules so future agents inherit it |
| Search Docs | Query the hosted documentation API service to retrieve documentation based on installed packages |
| Tinker | Execute code in the context of your application |
You can also run a tool yourself from the terminal with npx artisan boost:execute-tool.
Manually Registering the MCP Server
Sometimes you may need to manually register the laraflare Boost MCP server with your editor of choice. You should register the MCP server using the following details:
| Command | npx |
| Args | artisan boost:mcp |
JSON example:
{
"mcpServers": {
"laravel-boost": {
"command": "npx",
"args": ["artisan", "boost:mcp"]
}
}
}
AI Guidelines
AI guidelines are composable instruction files that are loaded upfront to provide AI agents with essential context about laraflare ecosystem packages. These guidelines contain core conventions, best practices, and framework-specific patterns that help agents generate consistent, high-quality code.
Available AI Guidelines
laraflare Boost includes AI guidelines for the following packages and frameworks. The core guidelines provide generic, generalized advice to the AI for the given package that is applicable across all versions.
| Package | Versions Supported |
|---|---|
| Core & Boost | core |
| laraflare Framework | core |
| Inertia React | core, 1.x, 2.x |
| Inertia Vue | core, 1.x, 2.x |
| Tailwind CSS | 3.x, 4.x |
| Wayfinder | core |
Note
To keep your AI guidelines up-to-date, see the Keeping Boost Resources Updated section.
You may exclude any guideline from boost:install and boost:update by listing its name (as shown in the boost:install summary) under guidelines.exclude in config/boost.ts.
Adding Custom AI Guidelines
To augment laraflare Boost with your own custom AI guidelines, add .md files to your application's .ai/guidelines/* directory. These files will automatically be included with Boost's guidelines when you run boost:install.
Overriding Boost AI Guidelines
You can override Boost's built-in AI guidelines by creating your own custom guidelines with matching file paths. When you create a custom guideline that matches an existing Boost guideline path, Boost will use your custom version instead of the built-in one.
For example, to override Boost's Inertia Vue v2 guidelines, create a file at .ai/guidelines/inertia-vue/2/core.md. When you run boost:install, Boost will include your custom guideline instead of the default one.
Agent Skills
Agent Skills are lightweight, targeted knowledge modules that agents can activate on-demand when working on specific domains. Unlike guidelines, which are loaded upfront, skills allow detailed patterns and best practices to be loaded only when relevant, reducing context bloat and improving the relevance of AI-generated code.
When you run boost:install and select skills as a feature, skills are automatically installed based on the packages detected in your project. Skills included with Boost, such as infer-conventions, are installed regardless of which packages you have. Use npx artisan boost:add-skill to add skills from a remote repository, and npx artisan boost:list-skills to list the skills available in your project.
Available Skills
| Skill | Package |
|---|---|
| infer-conventions | Boost |
| moving-from-php | Framework |
| tailwindcss-development | Tailwind CSS |
| wayfinder-development | Wayfinder |
Note
To keep your skills up-to-date, see the Keeping Boost Resources Updated section.
You may keep a skill from being installed by listing its name under skills.exclude in config/boost.ts. Your own skills within .ai/skills are never excluded.
Custom Skills
To create your own custom skills, add a SKILL.md file to your application's .ai/skills/{skill-name}/ directory. When you run boost:update, your custom skills will be installed alongside Boost's built-in skills.
For example, to create a custom skill for your application's domain logic:
.ai/skills/creating-invoices/SKILL.md
Overriding Skills
You can override Boost's built-in skills by creating your own custom skills with matching names. When you create a custom skill that matches an existing Boost skill name, Boost will use your custom version instead of the built-in one.
For example, to override Boost's tailwindcss-development skill, create a file at .ai/skills/tailwindcss-development/SKILL.md. When you run boost:update, Boost will include your custom skill instead of the default one.
Moving an Existing Application
Note
The
moving-from-phpskill is Laraflare's own. It moves an application written in PHP on Laravel into a Laraflare application. Because Laraflare keeps the same classes, methods, routes and messages, a file moves to the same path with the same class and methods:app/Models/Post.phpbecomesapp/Models/Post.ts. It is a move, not a rewrite.
Create a new application with Boost, so that your agent is given the skill, then start your agent inside it and tell it where the existing application is:
laraflare new example-app --boost
cd example-app
Move the application at ../example-php here.
The agent only reads the existing application; it never changes it. It first lists what that application added to a new one in docs/move.md, one row per file with its state (pending, moved, moved with edits or cannot move), so the work can be picked up again in a later session. It then moves one resource at a time, a model and everything that hangs off it, in this order:
- The migration, followed by
npx artisan migrate. - The model, and its relations on the models that are already there.
- The factory and the seeder.
- The form requests, policies and rules.
- The controller.
- The routes.
- The tests, which are then run:
npx artisan test tests/Feature/PostTest.ts.
After each resource the agent runs npx tsc --noEmit and the resource's test file, and goes on only when both pass. The existing application's tests move with their assertions unchanged, and they are the proof that a resource moved. Middleware, jobs, events, mail, notifications, console commands and configuration values follow, a folder at a time. When nothing is pending, the agent reports what moved as written, what moved with edits, and what could not move.
A moved file needs a few things the original did not, because a parameter's type is gone when TypeScript runs. A controller action receives the request first, then the route's parameters. The controller names each action's form request (static formRequests = { store: StorePostRequest }), and a route parameter is bound to its model in the boot method of AppServiceProvider (Route.model('post', Post)). Everything that reaches the database or sends a request is awaited. A relationship is called and awaited, never read as a property: $post->user is await post.user().
Some things cannot move, and the agent lists each one instead of working around it:
- Blade views and components, Livewire, Volt and Folio. Pages are Vue, rendered through Inertia, and each view is rewritten as a page by hand.
fake()in factories and tests. There is no Faker, so a factory writes its values.- A package that is not one of the first-party packages Laraflare has.
- Code that reads or writes the local disk, or starts a process, while serving a request.
- Raw SQL written for MySQL or PostgreSQL, when the application will run on D1.
- The rows in the existing application's database. The skill moves code, not data.
Warning
The skill is new. It has been run end to end by an agent once, on a new Laravel 13 application with one resource added: a model with a relationship, a scope and a cast, its migration and factory, a form request, an API resource controller, its routes, and a feature test of five tests, all of which pass after the move. Jobs, mail, notifications, events, policies, middleware and console commands have not been moved with it yet; for those the skill sends the agent to
make:*and to this documentation.
Guidelines vs. Skills
laraflare Boost provides two distinct ways to give AI agents context about your application: guidelines and skills.
Guidelines are loaded upfront when the AI agent starts, providing essential context about laraflare conventions and best practices that apply broadly across your codebase.
Skills are activated on-demand when working on specific tasks, containing detailed patterns for particular domains (like Tailwind CSS styling). Loading skills only when relevant reduces context bloat and improves code quality.
| Aspect | Guidelines | Skills |
|---|---|---|
| Loaded | Upfront, always present | On-demand, when relevant |
| Scope | Broad, foundational | Focused, task-specific |
| Purpose | Core conventions & best practices | Detailed implementation patterns |
Both guidelines and skills describe the laraflare ecosystem. To capture the conventions of your own application, you should use project rules.
Project Rules
While guidelines and skills teach agents how to write laraflare, project rules teach them how to write your application. A rule is anything you would otherwise need to explain again in every new session:
- Decisions made along the way by you, your agents, or your teammates.
- Style guidelines and preferences that are difficult to get an agent to follow.
- Traps and constraints that can't be inferred from the surrounding code.
Rules are stored as Markdown files within your application's .ai/rules directory and should be committed to source control. Unlike an agent's own memory, which is personal and session-scoped, your rules are shared with your team and with every agent that works on your application.
Each rule file declares the file globs it applies to within its frontmatter:
---
paths:
- app/Http/Controllers/**
---
# Http Controllers
## Extend BaseController for tenant scoping
All controllers must extend `app/Http/Controllers/BaseController`, which applies the
current tenant's query scope. Extending the framework's base controller directly will leak
data across tenants.
In addition, Boost maintains an .ai/rules/index.md file which maps globs to their rule files. Agents are instructed to consult this index before planning or editing any file, so a rule is only loaded when it is relevant:
# Project Rules Index
Before planning or editing, find the row whose globs match the file's path and read that rule file.
| Applies to | Rule file |
| --- | --- |
| app/Http/Controllers/** | .ai/rules/controllers.md |
| app/Models/** | .ai/rules/models.md |
Note
Unlike the
.mcp.jsonand generated guideline files, the.ai/rulesdirectory should be committed to source control so that your rules are shared with your team.
Recording Rules
To record a rule, you may simply ask your agent to remember it:
Remember that all money values are stored as integer cents, never as floats.
The agent will invoke Boost's record-rule MCP tool with a glob, a short title, and a note. Boost will then file the rule under the matching area, creating the rule file if needed, and update the index.
You should always record rules using the record-rule tool rather than creating rule files by hand. Boost regenerates .ai/rules/index.md as part of recording a rule, and agents rely on that index to discover which rules apply to the file they are working on. A rule file that is added manually will not be discovered until the index is next regenerated, which you may do with npx artisan boost:index-rules.
Inferring Your Application's Conventions
Recording rules one at a time works well going forward; however, an existing application already contains years of conventions. The infer-conventions skill will bootstrap your rules from the code you have already written. To get started, ask your agent to use the skill:
Use the infer-conventions skill
The skill will sweep your application across a checklist of convention dimensions, including validation, controllers, authorization, models, architecture, testing, frontend, database, and console, followed by an open-ended pass for patterns such as base classes, shared traits, and module layouts.
The skill documents what your code actually does rather than what it should do. It records only well-supported, non-default conventions, skips framework defaults and anything your formatter or linter already enforces, and reports genuinely mixed patterns instead of recording them. Before writing any rules, the skill will present each convention it discovered, along with its supporting evidence, for your approval. If you would like the skill to record all discovered conventions without confirmation, you may tell it to "yolo".
Disabling Project Rules
Project rules are enabled by default. To disable them entirely, define the following environment variable. This removes the record-rule MCP tool and stops Boost from managing the .ai/rules directory:
BOOST_RULES_ENABLED=false
Documentation API
laraflare Boost includes a Documentation API that provides AI agents with access to a knowledge base of laraflare-specific information. The API uses semantic search with embeddings to deliver precise, context-aware results.
The Search Docs MCP tool allows agents to query the hosted documentation API service to retrieve documentation based on your installed packages. Boost's AI guidelines and skills will automatically instruct your coding agent to use this API.
Note
Searching the documentation needs a network connection, as the search runs against a hosted service.
Extending Boost
Boost works with many popular IDEs and AI agents out of the box, including Claude Code, Codex, Cursor, GitHub Copilot, Junie, OpenCode and Zed. If your coding tool isn't supported yet, you can create your own agent and integrate it with Boost.
Adding Support for Other IDEs / AI Agents
To add support for a new IDE or AI agent, create a class that extends Agent (@laraflare/boost/Install/Agents/Agent) and implement one or more of the following contracts depending on what you need:
SupportsGuidelines(@laraflare/boost/Contracts/SupportsGuidelines) - Adds support for AI guidelines.SupportsMcp(@laraflare/boost/Contracts/SupportsMcp) - Adds support for MCP.SupportsSkills(@laraflare/boost/Contracts/SupportsSkills) - Adds support for Agent Skills.
Writing the Agent
import type { SupportsGuidelines } from '@laraflare/boost/Contracts/SupportsGuidelines';
import type { SupportsSkills } from '@laraflare/boost/Contracts/SupportsSkills';
import { Agent } from '@laraflare/boost/Install/Agents/Agent';
export class CustomAgent extends Agent implements SupportsGuidelines, SupportsSkills {
// Your implementation...
}
For an example implementation, see ClaudeCode.ts in @laraflare/boost/Install/Agents/ClaudeCode.
Registering the Agent
Register your custom agent in the boot method of your application's app/Providers/AppServiceProvider.ts:
import { Boost } from '@laraflare/boost/Boost';
override boot(): void {
Boost.registerAgent('customagent', CustomAgent);
}
Once registered, your agent will be available for selection when running npx artisan boost:install.