Rapid Laravel Development with AI Agents
If you want to build a Laravel application quickly with AI coding agents, this is the stack and setup I use.
Most new Laravel apps default to Livewire and Blade. That works well, but I’ve found Inertia.js and Vue 3 with shadcn-vue gives AI agents a much cleaner boundary to work with. shadcn-vue components live in your repo as editable TypeScript files instead of a package in node_modules, so an agent can read and change your UI the same way it reads and changes your controllers.
The stack
| Layer | Tool | What it does for the agent |
| --- | --- | --- |
| Backend | Laravel 13 | Routing, Eloquent, policies, form requests and queues |
| SPA bridge | Inertia.js | Controllers render Vue pages directly, no REST or GraphQL layer |
| UI | Vue 3 + shadcn-vue | Accessible Reka UI components stored in resources/js/components/ui |
| Agent context | Laravel Boost + skills | Database schema, Artisan tools, docs search and coding rules |
| Testing and deploys | Pest + Forge | Feature and browser tests, server provisioning and deploys |
1. Install an AI coding agent
I use Claude Code for most of my work. It runs in the terminal, reads your project, runs commands and runs your tests.
npm install -g @anthropic-ai/claude-code
cd ~/Sites/app-name
claude
The first run walks you through signing in with your Claude account or an Anthropic Console API key. I cover setup and permissions in more detail in Working with Anthropic’s Claude Code.
You aren’t locked into one provider. Gemini CLI and OpenAI’s Codex CLI both work with the same setup, and I’ll often use Gemini for questions that need a very large context window:
# Google Gemini CLI
npm install -g @google/gemini-cli
# OpenAI Codex CLI
npm install -g @openai/codex
Both read project instructions from AGENTS.md and support MCP servers. Setup for each is in Working with Google’s Gemini CLI and Working with OpenAI’s Codex CLI.
2. Create the Laravel app
The Laravel installer has a Vue starter kit that sets up Inertia, Vue 3, TypeScript, Tailwind CSS and shadcn-vue for you.
composer global require laravel/installer
laravel new app-name
When the installer asks, pick:
- Starter kit: Vue
- Authentication: Laravel’s built-in authentication
- Testing framework: Pest
- Database: SQLite for fast local test runs, or MySQL/PostgreSQL if you want to match production
Then make sure everything builds and the tests pass before any agent touches it:
cd app-name
npm install && npm run build
php artisan test
3. Commit to a private GitHub repo
Do this before adding any AI tooling. Agents change files all over your working tree, and clean commits are what let you review a diff or roll back a bad run.
git init
git add .
git commit -m "Initial Laravel + Inertia + shadcn-vue scaffold"
gh repo create app-name --private --source=. --remote=origin --push
4. Install Laravel Boost
Without help, an agent only sees the text in your files. Laravel Boost is Laravel’s official MCP server, and it gives the agent live access to your database schema, routes, logs, Artisan commands and version-specific Laravel docs.
composer require laravel/boost --dev
php artisan boost:install
The install command writes the MCP config for whichever agents you pick, along with a base CLAUDE.md and AGENTS.md. Now when the agent writes a migration or an Eloquent query, it looks up the real column names instead of guessing.
If your app also needs to expose its own tools to outside AI clients, that’s a different package: laravel/mcp.
5. Add Laravel and shadcn-vue skills
Skills are short instruction files the agent loads when a task matches. I use the Laravel and Vue skills from noartem/skills. You can install the whole set:
npx skills add https://github.com/noartem/skills
Or only the ones that match this stack:
npx skills add https://github.com/noartem/skills --skill shadcn-vue
npx skills add https://github.com/noartem/skills --skill baseline-ui
npx skills add https://github.com/noartem/skills --skill laravel-migrations-and-factories
npx skills add https://github.com/noartem/skills --skill laravel-policies-and-authorization
npx skills add https://github.com/noartem/skills --skill laravel-controller-tests
What they enforce:
- shadcn-vue and baseline-ui: Reka UI primitives for anything keyboard interactive, the cn() helper for class merging, tabular-nums in data tables, and layout rules that keep the UI from looking generic.
- Laravel skills: every model gets a migration and factory, validation goes in form requests, controllers stay thin, and feature tests use factory states.
6. Add your own rules to CLAUDE.md
Boost manages part of CLAUDE.md, so put your own rules in .ai/guidelines/ or below the Boost block. These are the rules I start with for this stack:
# Project Guidelines
## Stack
- Backend: Laravel 13, PHP 8.4, Pest for tests.
- Frontend: Inertia.js v2, Vue 3 (`<script setup lang="ts">`), Tailwind CSS, shadcn-vue.
- Never create `routes/api.php` endpoints for app screens. Use `Inertia::render()` in web controllers and pass typed props.
- Use Wayfinder route helpers in Vue, never hardcoded URLs.
## UI
- Check `resources/js/components/ui/` before building a new component.
- Add missing shadcn-vue components with `npx shadcn-vue@latest add [component] -y`.
- Use `AlertDialog` for destructive actions and `Skeleton` for loading states.
## Before a task is done
- Every new controller action needs a Pest feature test.
- Run `php artisan test --compact` and `npm run build`.
Commit the MCP config, skills and guidelines so every agent session starts from the same place.
Why Inertia makes agents faster
With a separate API and SPA, one feature means an API controller, auth tokens, an API spec, a Pinia store and client-side fetch and loading state. That’s a lot of places for an agent to get something slightly wrong. With Inertia, the controller queries the data and hands it to a Vue page as props:
namespace App\Http\Controllers;
use App\Models\Project;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;
class ProjectController extends Controller
{
public function index(Request $request): Response
{
return Inertia::render('Projects/Index', [
'projects' => Project::query()
->whereBelongsTo($request->user())
->withCount('tasks')
->latest()
->paginate(15)
->withQueryString(),
'filters' => $request->only(['search', 'status']),
]);
}
}
Two more things help:
- Shared data: the logged in user, flash messages and feature flags are shared from HandleInertiaRequests middleware, so every page already has them without extra fetching code.
- Typed routes: Wayfinder generates TypeScript helpers from your Laravel routes. When the agent changes routes/web.php, a broken link shows up as a build error instead of a 404 in production.
Queue up a full feature in one prompt
shadcn-vue already has the pieces most apps need: data tables, command palettes, dialogs, drawers, date pickers, charts and forms. The agent assembles them instead of writing CSS and keyboard handling from scratch, which means one prompt can cover the database, backend, UI and tests:
> Create an Invoice management module. Generate the Invoice model, migration, factory and policy (status enum: draft, sent, paid, overdue). Create InvoiceController with index, store and destroy actions using Inertia::render. Build resources/js/pages/Invoices/Index.vue using shadcn-vue Table, Badge, DropdownMenu, and an AlertDialog to confirm deletes. Add any missing shadcn-vue components with the CLI. Write Pest feature tests for every endpoint and make sure they pass.
Here’s roughly what the agent does with that:
1. Checks the existing tables through Boost, then writes the migration, factory and policy and runs php artisan migrate.
2. Runs npx shadcn-vue@latest add table badge alert-dialog dropdown-menu -y to pull in the components.
3. Writes Invoices/Index.vue following the skills: aligned currency columns, aria-label on icon buttons, Inertia’s <Link> and useForm.
4. Runs php artisan test --compact and fixes whatever fails. With Pest browser tests, it can also load the page and check for console errors.
I still review every diff. The difference is that I’m reviewing a finished, tested feature instead of writing the boilerplate myself.
Deploy with Laravel Forge
Fast development doesn’t help much if deploys are still manual. Forge provisions servers on your own AWS or Google Cloud account and manages Nginx, PHP-FPM, queue workers, SSL and zero downtime deploys. Pushing a tested branch to GitHub deploys it to staging or production, and the Forge CLI lets an agent read deploy logs or adjust the deploy script from the terminal. I walk through my full production setup in A Rock Solid Laravel Web App.
Where this falls short
Agents don’t replace architectural judgment. Without these guardrails they produce fragile code fast. With Laravel’s conventions, Inertia’s single data flow, local shadcn-vue components, Boost and a good set of skills, the output is consistent enough that one experienced developer can cover work that used to take a small team, which is how I work as a fractional CTO for startups that need a one person technical team. If you want help building a Laravel app this way, take a look at my Laravel development services.
Mentions
Laravel Boost 2.10.4 tirou a tool MCP application-info, que jogava a lista inteira de pacotes no contexto do agente a cada sessão. E ganhou php artisan boost:index-rules para reconstruir o índice de regras depois de um merge. github.com/laravel/boost/releases/tag/v2.10.4 #Laravel #AIAgents
Rapid Laravel Development with AI Agents If you want to build a Laravel application quickly with AI coding agents, this is the stack and setup I use. Most new Laravel apps default to Livewire and Blade. That works well, but I’ve found Inertia.js and Vue 3 with shadcn-vue gives AI agents a much cleaner boundary to work with. shadcn-vue components live in your repo as editable TypeScript files instead of a package in node_modules, so an agent can read and change your UI the same way it reads and changes your controllers. The stack | Layer | Tool | What it does for the agent | | --- | --- | --- | | Backend | Laravel 13 | Routing, Eloquent, policies, form requests and queues | | SPA bridge | Inertia.js | Controllers render Vue pages directly, no REST or GraphQL layer | | UI | Vue 3 + shadcn-vue | Accessible Reka UI components stored in resources/js/components/ui | | Agent context | Laravel Boost + skills | Database schema, Artisan tools, docs search and coding rules | | Testing and deploys | Pest + Forge | Feature and browser tests, server provisioning and deploys | 1. Install an AI coding agent I use Claude Code for most of my work. It runs in the terminal, reads your project, runs commands and runs your tests. npm install -g @anthropic-ai/claude-code cd ~/Sites/app-name claude The first run walks you through signing in with your Claude account or an Anthropic Console API key. I cover setup and permissions in more detail in Working with Anthropic’s Claude Code. You aren’t locked into one provider. Gemini CLI and OpenAI’s Codex CLI both work with the same setup, and I’ll often use Gemini for questions that need a very large context window: # Google Gemini CLI npm install -g @google/gemini-cli # OpenAI Codex CLI npm install -g @openai/codex Both read project instructions from AGENTS.md and support MCP servers. Setup for each is in Working with Google’s Gemini CLI and Working with OpenAI’s Codex CLI. 2. Create the Laravel app The Laravel installer has a Vue starter kit that sets up Inertia, Vue 3, TypeScript, Tailwind CSS and shadcn-vue for you. composer global require laravel/installer laravel new app-name When the installer asks, pick: - Starter kit: Vue - Authentication: Laravel’s built-in authentication - Testing framework: Pest - Database: SQLite for fast local test runs, or MySQL/PostgreSQL if you want to match production Then make sure everything builds and the tests pass before any agent touches it: cd app-name npm install && npm run build php artisan test 3. Commit to a private GitHub repo Do this before adding any AI tooling. Agents change files all over your working tree, and clean commits are what let you review a diff or roll back a bad run. git init git add . git commit -m "Initial Laravel + Inertia + shadcn-vue scaffold" gh repo create app-name --private --source=. --remote=origin --push 4. Install Laravel Boost Without help, an agent only sees the text in your files. Laravel Boost is Laravel’s official MCP server, and it gives the agent live access to your database schema, routes, logs, Artisan commands and version-specific Laravel docs. composer require laravel/boost --dev php artisan boost:install The install command writes the MCP config for whichever agents you pick, along with a base CLAUDE.md and AGENTS.md. Now when the agent writes a migration or an Eloquent query, it looks up the real column names instead of guessing. If your app also needs to expose its own tools to outside AI clients, that’s a different package: laravel/mcp. 5. Add Laravel and shadcn-vue skills Skills are short instruction files the agent loads when a task matches. I use the Laravel and Vue skills from noartem/skills. You can install the whole set: npx skills add https://github.com/noartem/skills Or only the ones that match this stack: npx skills add https://github.com/noartem/skills --skill shadcn-vue npx skills add https://github.com/noartem/skills --skill baseline-ui npx skills add https://github.com/noartem/skills --skill laravel-migrations-and-factories npx skills add https://github.com/noartem/skills --skill laravel-policies-and-authorization npx skills add https://github.com/noartem/skills --skill laravel-controller-tests What they enforce: - shadcn-vue and baseline-ui: Reka UI primitives for anything keyboard interactive, the cn() helper for class merging, tabular-nums in data tables, and layout rules that keep the UI from looking generic. - Laravel skills: every model gets a migration and factory, validation goes in form requests, controllers stay thin, and feature tests use factory states. 6. Add your own rules to CLAUDE.md Boost manages part of CLAUDE.md, so put your own rules in .ai/guidelines/ or below the Boost block. These are the rules I start with for this stack: # Project Guidelines ## Stack - Backend: Laravel 13, PHP 8.4, Pest for tests. - Frontend: Inertia.js v2, Vue 3 (`<script setup lang="ts">`), Tailwind CSS, shadcn-vue. - Never create `routes/api.php` endpoints for app screens. Use `Inertia::render()` in web controllers and pass typed props. - Use Wayfinder route helpers in Vue, never hardcoded URLs. ## UI - Check `resources/js/components/ui/` before building a new component. - Add missing shadcn-vue components with `npx shadcn-vue@latest add [component] -y`. - Use `AlertDialog` for destructive actions and `Skeleton` for loading states. ## Before a task is done - Every new controller action needs a Pest feature test. - Run `php artisan test --compact` and `npm run build`. Commit the MCP config, skills and guidelines so every agent session starts from the same place. Why Inertia makes agents faster With a separate API and SPA, one feature means an API controller, auth tokens, an API spec, a Pinia store and client-side fetch and loading state. That’s a lot of places for an agent to get something slightly wrong. With Inertia, the controller queries the data and hands it to a Vue page as props: namespace App\Http\Controllers; use App\Models\Project; use Illuminate\Http\Request; use Inertia\Inertia; use Inertia\Response; class ProjectController extends Controller { public function index(Request $request): Response { return Inertia::render('Projects/Index', [ 'projects' => Project::query() ->whereBelongsTo($request->user()) ->withCount('tasks') ->latest() ->paginate(15) ->withQueryString(), 'filters' => $request->only(['search', 'status']), ]); } } Two more things help: - Shared data: the logged in user, flash messages and feature flags are shared from HandleInertiaRequests middleware, so every page already has them without extra fetching code. - Typed routes: Wayfinder generates TypeScript helpers from your Laravel routes. When the agent changes routes/web.php, a broken link shows up as a build error instead of a 404 in production. Queue up a full feature in one prompt shadcn-vue already has the pieces most apps need: data tables, command palettes, dialogs, drawers, date pickers, charts and forms. The agent assembles them instead of writing CSS and keyboard handling from scratch, which means one prompt can cover the database, backend, UI and tests: > Create an Invoice management module. Generate the Invoice model, migration, factory and policy (status enum: draft, sent, paid, overdue). Create InvoiceController with index, store and destroy actions using Inertia::render. Build resources/js/pages/Invoices/Index.vue using shadcn-vue Table, Badge, DropdownMenu, and an AlertDialog to confirm deletes. Add any missing shadcn-vue components with the CLI. Write Pest feature tests for every endpoint and make sure they pass. Here’s roughly what the agent does with that: 1. Checks the existing tables through Boost, then writes the migration, factory and policy and runs php artisan migrate. 2. Runs npx shadcn-vue@latest add table badge alert-dialog dropdown-menu -y to pull in the components. 3. Writes Invoices/Index.vue following the skills: aligned currency columns, aria-label on icon buttons, Inertia’s <Link> and useForm. 4. Runs php artisan test --compact and fixes whatever fails. With Pest browser tests, it can also load the page and check for console errors. I still review every diff. The difference is that I’m reviewing a finished, tested feature instead of writing the boilerplate myself. Deploy with Laravel Forge Fast development doesn’t help much if deploys are still manual. Forge provisions servers on your own AWS or Google Cloud account and manages Nginx, PHP-FPM, queue workers, SSL and zero downtime deploys. Pushing a tested branch to GitHub deploys it to staging or production, and the Forge CLI lets an agent read deploy logs or adjust the deploy script from the terminal. I walk through my full production setup in A Rock Solid Laravel Web App. Where this falls short Agents don’t replace architectural judgment. Without these guardrails they produce fragile code fast. With Laravel’s conventions, Inertia’s single data flow, local shadcn-vue components, Boost and a good set of skills, the output is consistent enough that one experienced developer can cover work that used to take a small team, which is how I work as a fractional CTO for startups that need a one person technical team. If you want help building a Laravel app this way, take a look at my Laravel development services.
Best PR description ever, in Laravel Boost v2.10, released a few weeks ago. Another example how Laravel team tries to keep up with all latest changes in AI market. Great job @pushpak1300 Read more (and active discussion about this change) here: boost#1032 t.co