SOLID principles for Laravel 12 and PHP 8.5. Files < 100 lines, interfaces separated, PHPDoc mandatory.
View on GitHubfusengine/agents
fuse-laravel
plugins/laravel-expert/skills/solid-php/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/fusengine/agents/blob/main/plugins/laravel-expert/skills/solid-php/SKILL.md -a claude-code --skill solid-phpInstallation paths:
.claude/skills/solid-php/# SOLID PHP - Laravel 12 + PHP 8.5 ## Current Date (CRITICAL) **Today: January 2026** - ALWAYS use the current year for your searches. Search with "2025" or "2026", NEVER with past years. ## MANDATORY: Research Before Coding **CRITICAL: Check today's date first, then search documentation and web BEFORE writing any code.** 1. **Use Context7** to query Laravel/PHP official documentation 2. **Use Exa web search** with current year for latest trends 3. **Check Laravel News** of current year for new features 4. **Verify package versions** for Laravel 12 compatibility ```text WORKFLOW: 1. Check date → 2. Research docs + web (current year) → 3. Apply latest patterns → 4. Code ``` **Search queries (replace YYYY with current year):** - `Laravel [feature] YYYY best practices` - `PHP 8.5 [feature] YYYY` - `Livewire 3 [component] YYYY` - `Pest PHP testing YYYY` Never assume - always verify current APIs and patterns exist for the current year. --- ## Codebase Analysis (MANDATORY) **Before ANY implementation:** 1. Explore project structure to understand architecture 2. Read existing related files to follow established patterns 3. Identify naming conventions, coding style, and patterns used 4. Understand data flow and dependencies **Continue implementation by:** - Following existing patterns and conventions - Matching the coding style already in place - Respecting the established architecture - Integrating with existing services/components ## DRY - Reuse Before Creating (MANDATORY) **Before writing ANY new code:** 1. Search existing codebase for similar functionality 2. Check shared locations: `app/Services/`, `app/Actions/`, `app/Traits/` 3. If similar code exists → extend/reuse instead of duplicate **When creating new code:** - Extract repeated logic (3+ occurrences) into shared helpers - Place shared utilities in `app/Services/` or `app/Actions/` - Use Traits for cross-cutting concerns - Document reusable functions with PHPDoc --- ## Absolute Rules (MANDATORY)