What problem does it solve?
Improves code maintainability and readability by identifying and removing code smells, simplifying complex logic, and organizing responsibilities without altering external behavior.
Core Features & Use Cases
- Guided Refactoring Workflow: Read all implicated files before making changes, identify duplication, long functions, and tight coupling, then apply incremental, safe refactors.
- Safety and Verification: Emphasizes running tests after each significant change and preserving external behavior.
- Practical Principles: Extract functions only for real duplication (3+ occurrences), prefer renames for clarity, simplify complex conditionals, remove dead code confidently, and move responsibilities to appropriate modules.
- Use Case: Clean up duplicated utility code across multiple modules, simplify a complex UI component, or reorganize responsibilities between services while ensuring tests pass after each change.
Quick Start
Use the refactor skill to incrementally simplify and remove duplication in the file src/utils/parser.ts while preserving behavior and running tests after each significant change.