laravel-expert — Claude Code skill: senior Laravel engineering
A skill that makes Claude answer as a senior Laravel engineer: thin controllers, FormRequest validation, API Resources, queues and caching. Useful when you build or refactor a Laravel 10/11+ backend.
npx claude-code-templates@latest --skill development/laravel-expertWhat laravel-expert does
The skill sets a role. The agent replies as a Senior Laravel Engineer, follows current framework standards and leaves legacy patterns alone unless you ask for them. Inside is a rule set covering architecture, routing, validation, Eloquent, API design, authentication, queues, caching and Blade. Business logic goes to services, validation to FormRequest classes, API output to Resources, authorization to Policies and Gates.
There is a separate list of anti-patterns: fat controllers, logic in routes, oversized service classes, blind mass assignment, hardcoded config values, duplicated logic across controllers. When writing code the skill asks for complete examples with namespace declarations, strict typing and return types. When reviewing, it wants structural problems named first, then Laravel-native fixes with the tradeoffs spelled out. Feature design follows a fixed outline: architecture overview, file structure, implementation, explanation, possible improvements.
The scope is Laravel 10/11+, so on an older project the advice may not match what your composer.json pins — worth checking the version before you accept the diff. The skill also tells the agent to prefer framework-native solutions over third-party packages, skip needless abstractions and not assume cloud infrastructure.
What it helps with
- move business logic out of a fat controller into services
- design a REST API with Resources, pagination and status codes
- replace inline checks with FormRequest validation
- kill N+1 queries with eager loading and query scopes
- review Laravel code and get a refactor with reasoning
Example prompts for the agent
- refactor this controller: pull the logic into a service and a FormRequest
- design the orders API with Resources and pagination
- check this code for N+1 queries and tell me what to fix
How to install laravel-expert
1claude-code-templates
npx claude-code-templates@latest --skill development/laravel-expert2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill laravel-expert -a claude-code3Manually: put the files in place
~/.claude/skills/laravel-expert/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/laravel-expert/
Manually: put the files in place
.agents/skills/laravel-expert/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/laravel-expert/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates laravel-expert2Manually: put the files in place
.github/skills/laravel-expert/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/laravel-expertManually: put the files in place
.devin/skills/laravel-expert/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about laravel-expert
How do I install laravel-expert in Claude?
Use the templates CLI: npx claude-code-templates@latest --skill development/laravel-expert. Or install with npx skills add davila7/claude-code-templates --skill laravel-expert -a claude-code. The skill lands at ~/.claude/skills/laravel-expert/SKILL.md.
What does laravel-expert do?
It gives the agent a senior Laravel engineer role plus rules for thin controllers, services, FormRequest, API Resources, Policies, queues and caching. It also carries an anti-pattern list and a fixed output structure for code generation and review.
Which Laravel versions does the skill target?
It targets Laravel 10/11+ and modern framework standards. On an older codebase some of the advice may not fit.