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+).
About this skill
This skill transforms the AI agent into a Senior Laravel Engineer persona, specializing in delivering production-grade, maintainable, and idiomatic Laravel solutions. It instills a strong focus on clean architecture, readability, testability, security best practices, and performance awareness. The agent will prioritize modern Laravel standards (version 10/11 and beyond), adhering to convention over configuration, and avoiding legacy patterns unless explicitly requested. This skill is ideal for generating high-quality Laravel code, offering architectural guidance, debugging insights, and providing expert-level recommendations for robust web application development.
Best use case
When an AI agent needs to provide expert-level guidance, code snippets, architectural patterns, or debugging assistance specifically for Laravel applications, ensuring solutions are modern, secure, and maintainable.
Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).
Expert-level, maintainable, secure, and performant Laravel code snippets, architectural advice, debugging insights, and best-practice recommendations, all adhering to modern Laravel (10/11+) standards with an emphasis on clean architecture and testability.
Practical example
Example input
Design a robust database schema and corresponding Eloquent models for an e-commerce platform with products, orders, users, and reviews, ensuring proper relationships and indexing. Provide a basic example for fetching all active orders.
Example output
```php
// Database Migrations (Schema Design Considerations)
// For 'users' table:
// - Include common fields: id, name, email (unique), password, created_at, updated_at.
// - Consider adding 'email_verified_at' and 'remember_token'.
// - Indexes for email.
// For 'products' table:
// - id, name, description, price (decimal), stock, image_url, created_at, updated_at.
// - Consider categories via pivot table if many-to-many.
// For 'orders' table:
// - id, user_id (foreign key to users), status (e.g., pending, completed, cancelled), total_amount (decimal), created_at, updated_at.
// - Index for user_id and status.
// For 'order_items' table (pivot for orders and products):
// - id, order_id (fk to orders), product_id (fk to products), quantity, price_at_purchase (decimal).
// - Composite index for order_id and product_id.
// For 'reviews' table:
// - id, user_id (fk to users), product_id (fk to products), rating (tinyint), comment, created_at, updated_at.
// - Composite index for user_id and product_id.
// Example: User Model
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable;
protected $fillable = ['name', 'email', 'password'];
protected $hidden = ['password', 'remember_token'];
protected $casts = ['email_verified_at' => 'datetime'];
public function orders()
{
return $this->hasMany(Order::class);
}
public function reviews()
{
return $this->hasMany(Review::class);
}
}
// Example: Order Model
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Order extends Model
{
use HasFactory;
protected $fillable = ['user_id', 'status', 'total_amount'];
public function user()
{
return $this->belongsTo(User::class);
}
public function items()
{
return $this->hasMany(OrderItem::class);
}
/**
* Fetch all active orders.
* @return \Illuminate\Database\Eloquent\Collection
*/
public static function getActiveOrders()
{
return self::where('status', 'active')->get();
}
}
// ... (Further Eloquent models for Product, OrderItem, Review, including their relationships and considerations for soft deletes, accessors/mutators, etc., would follow. The output would also elaborate on best practices for indexing, security, and performance specific to an e-commerce context.)
```When to use this skill
- Seeking high-quality, idiomatic Laravel code examples and implementations.
- Designing robust and scalable architectures for new Laravel projects.
- Troubleshooting and debugging complex issues within Laravel applications.
- Obtaining advice on Laravel best practices, security vulnerabilities, and performance optimizations.
When not to use this skill
- For development tasks involving frameworks other than Laravel.
- When strictly basic or non-production-grade Laravel questions are sufficient, as the agent's output will be highly detailed and optimized.
- When an external API call or specific tool integration is required (this skill defines a persona, not an external tool interface).
- For highly specific legacy Laravel versions where adherence to older, non-modern patterns is strictly necessary, as the skill prioritizes contemporary standards.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/laravel-expert/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How laravel-expert Compares
| Feature / Agent | laravel-expert | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/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+).
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
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
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
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
webmcp
This skill guides AI agents in implementing WebMCP within web projects, enabling browser-native structured tools for AI interaction using JavaScript or HTML APIs.
Prompt Coach
Analyze your Claude Code session logs to improve prompt quality, optimize tool usage, and enhance your skills as an AI-native engineer.
nextjs
Provides comprehensive Next.js routing capabilities, including typed routes, helpers for `PageProps` and `LayoutProps`, and `nuqs` for managing URL state.
react
This AI agent skill guides the generation of modern React components, incorporating best practices such as destructured props, leveraging compiler optimizations, and proper use of React Effects. It also ensures compatibility and utilizes Tailwind CSS v4 syntax.
just
Use `just` to save and run project-specific commands. Use when the user mentions `justfile`, `recipe`, or needs a simple alternative to `make` for task automation.
chrome-debug
This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.
worktree-manager
Create, manage, and cleanup git worktrees with Claude Code agents across all projects. USE THIS SKILL when user says "create worktree", "spin up worktrees", "new worktree for X", "worktree status", "cleanup worktrees", "sync worktrees", or wants parallel development branches. Also use when creating PRs from a worktree branch (to update registry with PR number). Handles worktree creation, dependency installation, validation, agent launching in Ghostty, and global registry management.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
osgrep
Semantic code search using natural language queries. Use when users ask "where is X implemented", "how does Y work", "find the logic for Z", or need to locate code by concept rather than exact text. Returns file paths with line numbers and code snippets.
10up-css
CSS architecture, best practices, and patterns for WordPress projects. Covers ITCSS methodology, accessibility, specificity management, naming conventions, and modern CSS features.
agentifind
This skill sets up codebase intelligence for AI agents by running the `agentifind` CLI to extract code structure and synthesize a `CODEBASE.md` navigation guide. It includes staleness detection and intelligently handles LSP installation for optimal accuracy.
CLAUDE.md – JJ Quick Command List
A concise cheat sheet for essential Jujutsu (`jj`) version control commands, designed to help AI agents or users quickly perform common repository operations.