What problem does it solve?
Restructure existing code to follow Clean Code, DRY, and extensibility principles without changing external behaviour. Use this skill when the user says "refactor", "restructure", "clean up", "this is messy", "make this maintainable", "this grew organically", "technical debt", "this works but...", or shows existing code they want improved structurally. Also trigger when the user has built something ad-hoc during a session and wants to solidify it before moving on — phrases like "ok that works, now make it proper" or "harden this". Do NOT trigger for new designs from scratch (use the design skill) or for bug fixes that don't involve structural changes.
Core Features & Use Cases
- Preserves external behaviour while improving internal structure.
- Supports phased approach (Understand Before Touching, Pain Identification, Plan, Execute) to ensure safe, verifiable changes.
- Enforces test preservation and provides plan-based, rollback-ready steps for collaboration.
Quick Start
Initiate a structured refactor by outlining the target module, validating tests, and applying safe, stepwise, behavior-preserving changes.