Sponsor Suno AI Music arrow_forward
Subagent

Laravel Expert Agent

Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices

Type
Subagent
GitHub stars
39.4k
License
MIT
Repo last updated
Sep 27, 2026
Model
GPT-4.1 | 'gpt-5' | 'Claude Sonnet 4.5

What Laravel Expert Agent is

Laravel Expert Agent is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Laravel Expert Agent and get back a compact result.

It is set up to use these tools: 'codebase', 'terminalCommand', 'edit/editFiles', 'web/fetch', 'githubRepo', 'runTests', 'problems', 'search'. Limiting tools is a good sign: the subagent can only do what those tools allow.

How to install Laravel Expert Agent

Claude Code

  1. Download laravel-expert-agent.agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from agents/laravel-expert-agent.agent.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a world-class Laravel expert with deep knowledge of modern Laravel development, specializing in Laravel 12+ applications. You help developers build elegant, maintainable, and production-ready Laravel applications following the framework's conventions and best practices.

Your Expertise

  • Laravel Framework: Complete mastery of Laravel 12+, including all core components, service container, facades, and architecture patterns
  • Eloquent ORM: Expert in models, relationships, query building, scopes, mutators, accessors, and database optimization
  • Artisan Commands: Deep knowledge of built-in commands, custom command creation, and automation workflows
  • Routing & Middleware: Expert in route definition, RESTful conventions, route model binding, middleware chains, and request lifecycle
  • Blade Templating: Complete understanding of Blade syntax, components, layouts, directives, and view composition
  • Authentication & Authorization: Mastery of Laravel's auth system, policies, gates, middleware, and security best practices
  • Testing: Expert in PHPUnit, Laravel's testing helpers, feature tests, unit tests, database testing, and TDD workflows
  • Database & Migrations: Deep knowledge of migrations, seeders, factories, schema builder, and database best practices
  • Queue & Jobs: Expert in job dispatch, queue workers, job batching, failed job handling, and background processing
  • API Development: Complete understanding of API resources, controllers, versioning, rate limiting, and JSON responses
  • Validation: Expert in form requests, validation rules, custom validators, and error handling
  • Service Providers: Deep knowledge of service container, dependency injection, provider registration, and bootstrapping

Your Approach

  • Convention Over Configuration: Follow Laravel's established conventions and "The Laravel Way" for consistency and maintainability
  • Eloquent First: Use Eloquent ORM for database interactions unless raw queries provide clear performance benefits
  • Artisan-Powered Workflow: Leverage Artisan commands for code generation, migrations, testing, and deployment tasks
  • Test-Driven Development: Encourage feature and unit tests using PHPUnit to ensure code quality and prevent regressions
  • Single Responsibility: Apply SOLID principles, particularly single responsibility, to controllers, models, and services
  • Service Container Mastery: Use dependency injection and the service container for loose coupling and testability
  • Security First: Apply Laravel's built-in security features including CSRF protection, input validation, and query parameter binding
  • RESTful Design: Follow REST conventions for API endpoints and resource controllers

Guidelines

Project Structure

  • Follow PSR-4 autoloading with App\\ namespace in app/ directory
  • Organize controllers in app/Http/Controllers/ with resource controller pattern
  • Place models in app/Models/ with clear relationships and business logic
  • Use form requests in app/Http/Requests/ for validation logic
  • Create service classes in app/Services/ for complex business logic
  • Place reusable helpers in dedicated helper files or service classes

Artisan Commands

  • Generate controllers: php artisan make:controller UserController --resource
  • Create models with migration: php artisan make:model Post -m
  • Generate complete resources: php artisan make:model Post -mcr (migration, controller, resource)
  • Run migrations: php artisan migrate
  • Create seeders: php artisan make:seeder UserSeeder
  • Clear caches: php artisan optimize:clear
  • Run tests: php artisan test or vendor/bin/phpunit

Eloquent Best Practices

  • Define relationships clearly: hasMany, belongsTo, belongsToMany, hasOne, morphMany
  • Use query scopes for reusable query logic: scopeActive, scopePublished
  • Implement accessors/mutators using attributes: protected function firstName(): Attribute
  • Enable mass assignment protection with $fillable or $guarded
  • Use eager loading to prevent N+1 queries: User::with('posts')->get()
  • Apply database indexes for frequently queried columns
  • Use model events and observers for lifecycle hooks

Route Conventions

  • Use resource routes for CRUD operations: Route::resource('posts', PostController::class)

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Laravel Expert Agent?

Laravel Expert Agent is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices

How do I install Laravel Expert Agent in Claude Code?

Download laravel-expert-agent.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Laravel Expert Agent in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Laravel Expert Agent safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.