Laravel Agent
AI-powered Laravel development assistant. Architecture decisions, code generation, testing, deployment, and more.
# Add the marketplace
/plugin marketplace add hadyfayed/laravel-agent
# Install the plugin
/plugin install laravel-agent@hadyfayed-laravel-agent
Installation
Requirements
- Claude Code with Plugin support
- Laravel 10+ project
- PHP 8.1 or higher
Verify Installation
After installation, verify by running:
/laravel-agent:patterns
Quick Start
Intelligent Build (Recommended)
Let the architect analyze and decide the best approach:
/laravel-agent:build invoice management system with PDF exportCreate Features Directly
Build complete features with CRUD, views, API, and tests:
/laravel-feature Products with categoriesGenerate Tests
Create comprehensive Pest tests for any class:
/laravel-testing App/Services/PaymentServiceSkills
6666 specialized skills organized by type: reference, scaffolder, and utility.
Scaffold a Claude Code agent with role, capabilities, and workflow; when creating a plugin agent....
Generate AI features with Prism PHP (chat, embeddings, tool-calling) across OpenAI/Anthropic/Ollama; when adding AI services....
Generate a comprehensive codebase health report analyzing architecture, quality, security, performance, and dependencies; when auditing...
SET UP Laravel authentication with Sanctum/Fortify/Breeze, guards, roles & permissions, policies, social login, 2FA; when...
Configure automated backups (spatie/laravel-backup) — schedule, storage disks, retention, monitoring/notifications; when setting up backups.
Generate a broadcast event + channel wiring for real-time updates; when adding broadcasting.
Systematically diagnose and fix a bug — reproduce, root-cause, fix, regression test; when fixing a...
Set up CI/CD pipelines (GitHub Actions/GitLab/Bitbucket) — tests, linting, security scan, deploy stages; when configuring...
Scaffold a Claude Code slash-command with frontmatter and prompt; when creating a plugin command.
Generate a database ER diagram or schema visualization from migrations and models in Mermaid or...
Optimize database performance by analyzing queries, detecting N+1 and Big O issues, suggesting indexes, and...
Configure deployment — Forge/Vapor/Docker, env/secrets, zero-downtime, deploy scripts; when setting up deployment.
Generate project documentation — API docs, code docs, README sections from the codebase; when documenting...
Generate a typed DTO with spatie/laravel-data, validation, and casting; when creating data transfer objects.
Define a Laravel Pennant feature flag (class-based or simple), with scoping and rollout; when adding...
Scaffold geolocation features with distance queries, geocoding, spatial indexes; when adding location-based functionality.
Stage and create a well-formed git commit for the current changes. Manual invoke only.
Create a well-formed pull request (title/body/labels) from the current branch via gh; manual invoke only....
Cut a release — version bump, changelog, tag, GitHub release; manual invoke only.
Set up application health checks and uptime monitoring with spatie/laravel-health — checks, scheduling, dashboard, notifications;...
Scaffold a data importer for CSV/Excel with validation, chunking, error handling; when building bulk data...
Guided interactive mode — helps you pick the right laravel-agent skill for what you want...
Generate a queued job with retries/backoff/middleware; when creating async jobs.
Scaffold a REST/JSON:API/GraphQL API — controllers, requests, resources, versioning, OpenAPI docs, rate limiting. Use when...
Wiring up Laravel authentication & authorization — login, register, guards, policies, gates, roles, permissions, API...
Run the full Laravel build and quality pipeline—Pint, PHPStan/Larastan, tests, asset build, optimization—as a one-shot...
Laravel Cashier billing — Stripe/Paddle subscriptions, trials, invoices, webhooks, payment methods, single charges, and customer...
Reference on Laravel database conventions — migrations, Eloquent relationships, N+1 and Big-O query optimization, indexing;...
Laravel deployment — Forge, Vapor, Docker, Bref (AWS Lambda), traditional servers, zero-downtime releases, environment/secrets, CI/CD...
Scaffold a complete Laravel feature module — controllers, requests, resources, models, migrations, policies, tests; when...
Scaffold or build a Filament v3/v4 admin panel with resources, forms, tables, widgets, custom pages,...
Laravel Horizon — Redis queue dashboard, supervisors and auto-scaling/balancing, multi-queue worker config, metrics, failed-job management,...
Build server-driven single-page apps with Laravel + Inertia.js (Vue 3 or React) — controllers, shared...
Build and scaffold Livewire 3 components, forms, tables, modals, real-time search, and reactive UI with...
Scaffold a reusable domain module under app/Modules with contracts, services, DTOs, events, strategies; when building...
Build Laravel Nova admin panels — resources, fields, actions, lenses, metrics, filters, and custom tools....
Laravel Octane high-performance application servers — Swoole, RoadRunner, FrankenPHP; concurrent tasks, ticks, Octane cache, Swoole...
Laravel architecture and design patterns — SOLID, DRY, Repository, Action, Service, DTO, Strategy, Factory, Pipeline,...
Laravel performance optimization — caching strategies, query and N+1 fixes, Big O complexity, Octane/queue tuning,...
Laravel queues — jobs, batching, chains, events/listeners, notifications, retries, failure handling, and workers. Use when...
Refactor Laravel code for SOLID/DRY compliance — extract god classes, improve structure without changing behavior;...
Review code, a pull request, staged changes, or a path across security, quality, Laravel best...
Laravel Scout full-text search — Algolia, Meilisearch, Typesense, database driver; searchable models, indexes, filters, pagination;...
Laravel security conventions and OWASP best practices — XSS, SQL injection, CSRF, mass assignment, auth/authorization...
Scaffold a service or single-purpose action class; when extracting business logic into a service, orchestrating...
Laravel testing conventions — Pest/PHPUnit patterns, feature/unit/API tests, factories, assertions, TDD practices; when writing or...
Laravel real-time / WebSockets — Reverb server, broadcasting events, public/private/presence channels, Echo client, scaling with...
Scaffold an MCP tool or server (PHP/TypeScript); when adding MCP capabilities to a plugin.
Migrate a legacy app or database into Laravel — schema import, data migration, model generation;...
Generate a Laravel notification with multi-channel support (mail, database, broadcast, SMS, Telegram, Discord, Slack, WebPush,...
Scaffold a reusable Laravel package with proper structure, service provider, config/facade publishing, tests, and Packagist...
Generate PDF documents (invoices, reports, certificates) using spatie/laravel-pdf or barryvdh/laravel-dompdf with templates and controllers; when...
Publish a Claude Code plugin to marketplace — validate, bump version, tag, release; when releasing...
Scaffold Claude Code plugin artifacts — plugin structure, manifests (plugin.json/marketplace.json), commands, agents, skills, MCP, and...
Set up Laravel Pulse performance monitoring — cards, recorders, custom metrics, dashboard auth; when adding...
Install and configure Laravel Reverb WebSocket server — env, scaling, supervisor; when setting up Reverb....
Scaffold a complete new Laravel application with architecture — migrations, models, controllers, views, policies, tests,...
Set up full-text search with Laravel Scout — install and configure Algolia, Meilisearch, Typesense, or...
Run an OWASP security audit of Laravel code with false-positive filtering and confidence scoring; when...
Set up SEO infrastructure — sitemaps, meta tags, Open Graph, structured data/schema, robots.txt. Triggers: "SEO",...
Scaffold a Claude Code skill with directory structure, references, and evals; when creating a skill....
Install and configure Laravel Telescope — debugging, request/exception/query inspection, watchers, auth gating, pruning, production guards....
Run and report test coverage (Pest/PHPUnit), identify gaps, enforce thresholds; when checking coverage.
Generate comprehensive Pest/PHPUnit tests (unit, feature, API, or Dusk browser) for a target class, controller,...
Upgrade Laravel/PHP versions with breaking-change handling, automated fixes, and dependency bumps; when upgrading to a...
Scaffold webhook infrastructure with receiver endpoints, signature verification, dispatch/retry, and event handling; when integrating webhooks....
Specialized Agents
11| Agent | Purpose |
|---|---|
| laravel-architect | Analyzes requests, decides approach, delegates to builders |
| laravel-feature | Builds complete features with CRUD, views, API, tests |
| laravel-api | Scaffolds REST/GraphQL APIs with validation, policies, tests |
| laravel-testing | Pest tests - unit, feature, API, browser |
| laravel-security | OWASP audits, security headers, vulnerability fixes |
| laravel-review | Code review, architecture audit, performance analysis |
| laravel-filament | Filament admin resources, dashboards, tables, forms |
| laravel-livewire | Livewire components with validation, events, caching |
| laravel-module | Modular architecture with nwidart/laravel-modules |
| laravel-service | Service classes with dependency injection and contracts |
Quality Hooks
7pre-commit.sh
PHP syntax, Pint, PHPStan, security scan, Blade validation
security-scan.sh
Detect secrets, API keys, passwords, debug functions
Package Integrations
85+Agents detect installed packages and adapt output automatically.
Admin & UI
- filament/filament
- livewire/livewire
- inertiajs/inertia-laravel
Testing
- pestphp/pest
- laravel/dusk
- mockery/mockery
API & Auth
- laravel/sanctum
- spatie/laravel-permission
- nuwave/lighthouse
Performance
- laravel/octane
- laravel/horizon
- laravel/pulse