controller-refactor-plan

Audit a controller file for reachable handlers and scope boundaries.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/ryan-mahoney/ryan-llm-skills --skill controller-refactor-plan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: controller-refactor-plan
Source: https://github.com/ryan-mahoney/ryan-llm-skills/tree/main/skills/controller-refactor-plan
Command: npx skills add https://github.com/ryan-mahoney/ryan-llm-skills --skill controller-refactor-plan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit a single controller file to determine which handlers are still reachable from routes and whether the controller's responsibilities have grown beyond validation and response orchestration.

Core Features & Use Cases

  • Identify reachable handlers and route references to confirm routing wiring.
  • Detect handlers that are no longer invoked or that inline business logic, indicating scope creep.
  • Map responsibilities to existing contexts or propose targets for extraction, improving modularity and maintainability.

Quick Start

Analyze the specified controller file and produce a concise analysis document.

Frequently Asked Questions about controller-refactor-plan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find dead routes and unused handlers in a controller?

Auditing a controller file identifies which handlers remain reachable from routes and flags unreferenced methods, confirming routing wiring and exposing dead code that should be removed.

What is controller scope creep and how do I detect it?

Controller scope creep happens when responsibilities exceed validation and response orchestration. Auditing detects it by identifying handlers that inline business logic instead of delegating to proper contexts.

How do I analyze a controller to extract business logic into separate contexts?

Analyze the controller to map inline business responsibilities to existing contexts or propose extraction targets, generating a markdown analysis with evidence and risk notes to improve modularity.

Can I get an automated analysis of controller responsibilities without an implementation plan?

Yes, auditing a controller file produces an analytical markdown document with evidence and risk notes that maps scope violations to context boundaries while explicitly ensuring no implementation plan is generated.

When should I audit a controller for route reachability and modularity?

Audit a controller for route reachability and modularity when refactoring architecture or maintaining legacy code, confirming routing wiring and detecting scope creep before extracting responsibilities into existing contexts.