What problem does it solve?
This skill helps developers quickly evaluate a Laravel application's architecture, identifying structural issues such as inline validation, overly large controllers, hard‑coded strings, duplicated code, misuse of env() outside config, and other anti‑patterns, so they can refactor for maintainability and readability.
Core Features & Use Cases
- Inline Validation Detection: Flags large or complex validation logic inside controllers and suggests Form Request extraction.
- Fat Controller Identification: Highlights controller methods exceeding ~20 lines or containing multiple responsibilities, recommending service or action extraction.
- String Constant & Enum Recommendation: Finds hard‑coded role/status strings and advises using PHP Enums.
- Duplicate Logic Spotting: Detects repeated code blocks across controllers and proposes shared scopes or services.
- Env Misuse Alert: Catches env() calls outside config files to prevent production bugs.
- API Resource & Route Model Binding Checks: Suggests proper response resources and model binding for cleaner APIs.
- Authorization & Policy Guidance, Lifecycle Logic Consolidation, Over‑Engineering Flags, and more.
Quick Start
Ask the skill to audit the structure of a Laravel project located at ./my‑app and provide a concise report with actionable suggestions.