controller-cleanup

Installation
SKILL.md

Controller Cleanup

Use this skill when controllers become difficult to understand, test, or maintain.

When a Laravel app has several menus/pages, also use module-per-menu: avoid one broad controller for the whole app, and split by menu, page group, or resource boundary.

Controllers should stay thin and focused on HTTP orchestration. They should not contain long business workflows, provider payload construction, repeated query logic, or file-processing loops.

Responsibilities

A controller may:

  • receive route-bound models and requests;
  • call $this->authorize() or rely on middleware/Form Request authorization;
  • call a Form Request's validated() data;
  • invoke an Action or Service;
  • return redirects, views, JSON resources, streams, or downloads;
  • attach session flash messages.
Installs
8
GitHub Stars
4
First Seen
Jul 16, 2026
controller-cleanup — soden46/syarif-laravel-ai-skills