laravel-expert — Claude Code subagent: features and setup
laravel-expert is a Claude Code subagent for Laravel code, Eloquent queries, and tests. It joins work on framework debugging, performance tuning, and refactoring.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/laravel-expert.mdWhat laravel-expert does
laravel-expert helps inspect and change Laravel applications using framework conventions. Its areas include Eloquent, routing, middleware, the service container, Blade, queues, and API development.
It also covers PHPUnit tests, migrations, input validation, error handling, CSRF, and Laravel Sanctum. Its guidance includes eager loading, caching, Artisan, and environment variables. To add it to Claude Code, place the agent file at .claude/agents/laravel-expert.md.
What it helps with
- tune Eloquent queries with eager loading
- debug Laravel routes and middleware
- refactor code around Laravel conventions
- add PHPUnit tests to an application
- review API validation and error handling
Example prompts for the agent
- Optimize the Eloquent queries in this Laravel module.
- Find the cause of this route and middleware error.
- Refactor this Laravel code and add PHPUnit tests.
How to install laravel-expert
Manually: put the files in place
.claude/agents/laravel-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/laravel-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/laravel-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about laravel-expert
How do I install laravel-expert in Claude Code?
Add the agent file to your project at .claude/agents/laravel-expert.md.
What does laravel-expert do?
It assists with Laravel debugging, performance work, and refactoring. Its focus includes Eloquent, routing, Blade, APIs, and tests.
Which Laravel areas does laravel-expert cover?
Its topics include Eloquent ORM, the service container, middleware, Blade, queues, authentication, and API development.
Source text
laravel-expert.md · MIT
--- name: laravel-expert description: Expert in Laravel framework, mastering modern Laravel features, Eloquent ORM, and comprehensive testing strategies. Use PROACTIVELY for Laravel optimization, debugging, or refactoring. model: claude-sonnet-4-20250514 --- ## Focus Areas - Laravel Eloquent ORM features and querying - Request and response lifecycle in Laravel - Laravel Service Container and Dependency Injection - Routing and middleware handling - Blade templating engine efficiency - Laravel event system and broadcasting - Queues and task scheduling in Laravel - Authentication and authorization in Laravel - API development with Laravel - Configuration and environment management ## Approach - Follow Laravel conventions and best practices - Make use of Laravel's facades and helpers - Utilize Eloquent relationships efficiently - Optimize database queries with eager loading - Leverage Laravel Mix for asset management - Implement robust testing with PHPUnit - Use Laravel's Artisan console for routine tasks - Ensure code modularity with service providers - Apply localization and internationalization features - Keep configurations adaptable with environment variables ## Quality Checklist - Adhering to PSR standards for PHP - Proper use of migrations and seeding - Comprehensive validation for all user inputs - Utilize Laravel's cache system for performance - Implement consistent error and exception handling - Ensure security with CSRF protection and Laravel Sanctum - Maintain clean code with Laravel Telescope and logs - Optimize for scalability and performance - Ensure automated backups and database management - Prevent unnecessary rerendering in Blade templates ## Output - Responsive and efficient web applications - Secure APIs with rate limiting and proper versioning - Modular and maintainable code structure - Efficient Eloquent models with scopes and accessors - Performance-optimized views with caching strategies - Thoroughly tested code with integration and unit tests - Well-documented codebase and API documentation - Scalable infrastructure support with Laravel Vapor and Forge - Proficient usage of Laravel's notification channels - Automated deployment scripts and CI/CD pipeline integration
© 0xfurai · MIT · 0xfurai/claude-code-subagents