网页
综合
更新时间 2026-11-13 17:32:21
Laravel Boost | Laravel 13.x - The clean stack for Artisans and agents
自动蜘蛛
laravel.com
正文约 6000 字
Laravel Boost accelerates AI-assisted development by providing the essential guidelines and agent skills that help AI agents write high-quality Laravel applications that adhere to Laravel best practices.
Boost also provides a powerful Laravel ecosystem documentation API that combines a built-in MCP tool with an extensive knowledge base containing over 17,000 pieces of Laravel-specific information, all enhanced by semantic search capabilities using embeddings for precise, context-aware results. Boost instructs AI agents like Claude Code and Cursor to use this API to learn about the latest Laravel features and best practices.
Laravel Boost can be installed via Composer:
Next, install the MCP server and coding guidelines:
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 <laravel-boost-guidelines> block, so anything you have written outside of that block is preserved.
Once Laravel Boost has been installed, you're ready to start coding with Cursor, Claude Code, or your AI agent of choice.
Feel free to add the generated MCP configuration file (.mcp.json), guideline files (CLAUDE.md, AGENTS.md, junie/, etc.), and the boost.json configuration file to your application's .gitignore, as these files are automatically regenerated when running boost:install and boost:update.
You may want to periodically update your local Boost resources (AI guidelines and skills) to ensure they reflect the latest versions of the Laravel ecosystem packages you have installed. To do so, you can use the boost:update Artisan command.
You may also automate this process by adding it to your Composer "post-update-cmd" scripts:
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. This prompt is skipped when the command runs non-interactively, such as from a Composer script. If you would like Boost to only update the existing Boost resources already published within your application, you may use the --no-discover option:
Laravel Boost provides an MCP (Model Context Protocol) server that exposes tools for AI agents to interact with your Laravel application. These tools give agents the ability to inspect your application's structure, query the database, execute code, and more.
Sometimes you may need to manually register the Laravel Boost MCP server with your editor of choice. You should register the MCP server using the following details:
AI guidelines are composable instruction files that are loaded upfront to provide AI agents with essential context about Laravel ecosystem packages. These guidelines contain core conventions, best practices, and framework-specific patterns that help agents generate consistent, high-quality code.
Laravel 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.
To keep your AI guidelines up-to-date, see the Keeping Boost Resources Updated section.
To augment Laravel Boost with your own custom AI guidelines, add .blade.php or .md files to your application's .ai/guidelines/* directory. These files will automatically be included with Laravel Boost's guidelines when you run boost:install.
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 React v2 Form Guidance" guidelines, create a file at .ai/guidelines/inertia-react/2/forms.blade.php. When you run boost:install, Boost will include your custom guideline instead of the default one.
If you maintain a third-party package and would like Boost to include AI guidelines for it, you can do so by adding a resources/boost/guidelines/core.blade.php file to your package. When users of your package run php artisan boost:install, Boost will automatically load your guidelines.
AI guidelines should provide a short overview of what your package does, outline any required file structure or conventions, and explain how to create or use its main features (with example commands or code snippets). Keep them concise, actionable, and focused on best practices so AI can generate correct code for your users. Here is an example:
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 composer.json. For example, if your project includes livewire/livewire, the livewire-development skill will be installed automatically. Skills included with Boost, such as infer-conventions, are installed regardless of which packages you have.
To keep your skills up-to-date, see the Keeping Boost Resources Updated section.
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:
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 livewire-development skill,
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。