What problem does it solve?
Surgical code refactoring to improve maintainability without changing external behavior. It covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Core Features & Use Cases
- Incremental improvement: Tackle large, messy code sections step by step without affecting functionality.
- Targeted techniques: Extract methods, rename identifiers for clarity, decompose complex conditions, and introduce design patterns.
- Use Case: Apply refactoring to a legacy module to reduce cognitive load and make future changes safer and faster.
Quick Start
Use the refactor skill to guide safe incremental improvements on a legacy module: identify a large function, extract focused helper methods, rename ambiguous variables for clarity, add unit tests, and commit after each safe change.