laravel-specialist
27
总安装量
27
周安装量
#7542
全站排名
安装命令
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill laravel-specialist
Agent 安装分布
claude-code
21
opencode
19
codex
17
cursor
14
windsurf
13
Skill 文档
Laravel Specialist
Purpose
Provides expert guidance on Laravel framework development using modern Laravel 11+ features, Livewire 3, and PHP 8.3. Specializes in building scalable web applications, APIs, real-time features, and performance optimization with Octane.
When to Use
- Building new Laravel applications or APIs
- Implementing Livewire 3 reactive components
- Optimizing Laravel performance with Octane
- Designing Eloquent models and relationships
- Creating custom Artisan commands
- Implementing Laravel queues and jobs
- Building real-time features with Broadcasting
- Setting up Laravel Sail or deployment
Quick Start
Invoke this skill when:
- Developing Laravel web applications or APIs
- Building reactive UIs with Livewire 3
- Optimizing performance with Octane or caching
- Working with Eloquent ORM patterns
- Implementing Laravel ecosystem packages
Do NOT invoke when:
- Generic PHP without Laravel â use
/php-pro - WordPress development â use
/wordpress-master - Frontend JavaScript frameworks â use
/vue-expertor/react-specialist - Database design independent of Laravel â use
/database-administrator
Decision Framework
Feature Type?
âââ Interactive UI
â âââ Complex SPA â Inertia.js + Vue/React
â âââ Reactive components â Livewire 3
âââ API
â âââ Simple REST â Laravel API Resources
â âââ Complex â Laravel + Sanctum/Passport
âââ Background Processing
â âââ Laravel Queues with Redis/SQS
âââ Real-time
âââ Laravel Echo + Pusher/Soketi
Core Workflows
1. Laravel 11 Application Setup
- Create project with
laravel new --using=sail - Configure environment and database
- Set up authentication (Breeze/Jetstream)
- Define models with migrations
- Implement routes and controllers
- Add middleware and policies
2. Livewire 3 Component Development
- Create Livewire component class
- Define public properties and methods
- Build Blade template with wire directives
- Implement validation and actions
- Add Alpine.js for client-side enhancements
- Test with Livewire testing utilities
3. Performance Optimization
- Enable Octane with Swoole/RoadRunner
- Implement query caching and eager loading
- Use Redis for session and cache
- Optimize Composer autoloader
- Configure OPcache settings
- Set up queue workers for async tasks
Best Practices
- Use strict types and PHP 8.3 features (readonly, enums)
- Eager load relationships to avoid N+1 queries
- Implement form requests for validation
- Use Laravel Pint for consistent code style
- Write feature tests with Laravel’s testing utilities
- Leverage Laravel’s built-in security features
Anti-Patterns
| Anti-Pattern | Problem | Correct Approach |
|---|---|---|
| Fat controllers | Hard to test and maintain | Move logic to Actions/Services |
| N+1 queries | Performance degradation | Eager loading with with() |
| Raw SQL everywhere | Loses Eloquent benefits | Use Eloquent, raw only when needed |
| Ignoring queues | Slow user responses | Queue slow operations |
| No caching | Unnecessary DB load | Cache expensive queries |