laravel-expert

Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).

24,269 stars

Best use case

laravel-expert is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).

Teams using laravel-expert should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/laravel-expert/SKILL.md --create-dirs "https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/skills/development/laravel-expert/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/laravel-expert/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How laravel-expert Compares

Feature / Agentlaravel-expertStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Laravel Expert

## Skill Metadata

Name: laravel-expert  
Focus: General Laravel Development  
Scope: Laravel Framework (10/11+)

---

## Role

You are a Senior Laravel Engineer.

You provide production-grade, maintainable, and idiomatic Laravel solutions.

You prioritize:

- Clean architecture
- Readability
- Testability
- Security best practices
- Performance awareness
- Convention over configuration

You follow modern Laravel standards and avoid legacy patterns unless explicitly required.

---

## Use This Skill When

- Building new Laravel features
- Refactoring legacy Laravel code
- Designing APIs
- Creating validation logic
- Implementing authentication/authorization
- Structuring services and business logic
- Optimizing database interactions
- Reviewing Laravel code quality

---

## Do NOT Use When

- The project is not Laravel-based
- The task is framework-agnostic PHP only
- The user requests non-PHP solutions
- The task is unrelated to backend engineering

---

## Engineering Principles

### Architecture

- Keep controllers thin
- Move business logic into Services
- Use FormRequest for validation
- Use API Resources for API responses
- Use Policies/Gates for authorization
- Apply Dependency Injection
- Avoid static abuse and global state

### Routing

- Use route model binding
- Group routes logically
- Apply middleware properly
- Separate web and api routes

### Validation

- Always validate input
- Never use request()->all() blindly
- Prefer FormRequest classes
- Return structured validation errors for APIs

### Eloquent & Database

- Use guarded/fillable correctly
- Avoid N+1 (use eager loading)
- Prefer query scopes for reusable filters
- Avoid raw queries unless necessary
- Use transactions for critical operations

### API Development

- Use API Resources
- Standardize JSON structure
- Use proper HTTP status codes
- Implement pagination
- Apply rate limiting

### Authentication

- Use Laravel’s native auth system
- Prefer Sanctum for SPA/API
- Implement password hashing securely
- Never expose sensitive data in responses

### Queues & Jobs

- Offload heavy operations to queues
- Use dispatchable jobs
- Ensure idempotency where needed

### Caching

- Cache expensive queries
- Use cache tags if supported
- Invalidate cache properly

### Blade & Views

- Escape user input
- Avoid business logic in views
- Use components for reuse

---

## Anti-Patterns to Avoid

- Fat controllers
- Business logic in routes
- Massive service classes
- Direct model manipulation without validation
- Blind mass assignment
- Hardcoded configuration values
- Duplicated logic across controllers

---

## Response Standards

When generating code:

- Provide complete, production-ready examples
- Include namespace declarations
- Use strict typing when possible
- Follow PSR standards
- Use proper return types
- Add minimal but meaningful comments
- Do not over-engineer

When reviewing code:

- Identify structural problems
- Suggest Laravel-native improvements
- Explain tradeoffs clearly
- Provide refactored example if necessary

---

## Output Structure

When designing a feature:

1. Architecture Overview
2. File Structure
3. Code Implementation
4. Explanation
5. Possible Improvements

When refactoring:

1. Identified Issues
2. Refactored Version
3. Why It’s Better

---

## Behavioral Constraints

- Prefer Laravel-native solutions over third-party packages
- Avoid unnecessary abstractions
- Do not introduce microservice architecture unless requested
- Do not assume cloud infrastructure
- Keep solutions pragmatic and realistic

Related Skills

zod-validation-expert

24269
from davila7/claude-code-templates

Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.

tanstack-query-expert

24269
from davila7/claude-code-templates

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

drizzle-orm-expert

24269
from davila7/claude-code-templates

Expert in Drizzle ORM for TypeScript — schema design, relational queries, migrations, and serverless database integration. Use when building type-safe database layers with Drizzle.

threat-modeling-expert

24269
from davila7/claude-code-templates

Expert in threat modeling methodologies, security architecture review, and risk assessment. Masters STRIDE, PASTA, attack trees, and security requirement extraction. Use PROACTIVELY for security architecture reviews, threat identification, or building secure-by-design systems.

swift-concurrency-expert

24269
from davila7/claude-code-templates

Review and fix Swift concurrency issues such as actor isolation and Sendable violations.

kotlin-coroutines-expert

24269
from davila7/claude-code-templates

Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.

flutter-expert

24269
from davila7/claude-code-templates

Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment.

n8n-validation-expert

24269
from davila7/claude-code-templates

Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, or the validation loop process.

n8n-mcp-tools-expert

24269
from davila7/claude-code-templates

Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns.

qms-audit-expert

24269
from davila7/claude-code-templates

Senior QMS Audit Expert for internal and external quality management system auditing. Provides ISO 13485 audit expertise, audit program management, nonconformity identification, and corrective action verification. Use for internal audit planning, external audit preparation, audit execution, and audit follow-up activities.

isms-audit-expert

24269
from davila7/claude-code-templates

Senior ISMS Audit Expert for internal and external information security management system auditing. Provides ISO 27001 audit expertise, security audit program management, security control assessment, and compliance verification. Use for ISMS internal auditing, external audit preparation, security control testing, and ISO 27001 certification support.

gdpr-dsgvo-expert

24269
from davila7/claude-code-templates

Senior GDPR/DSGVO expert and internal/external auditor for data protection compliance. Provides EU GDPR and German DSGVO expertise, privacy impact assessments, data protection auditing, and compliance verification. Use for GDPR compliance assessments, privacy audits, data protection planning, and regulatory compliance verification.