What problem does it solve?
Refactoring code can be risky and introduce new bugs if not done systematically, leading to instability and increased technical debt. This Skill provides expert guidance for safe, incremental refactoring that improves code quality without altering behavior, minimizing risk.
Core Features & Use Cases
- Code Analysis & Planning: Generates detailed analysis documents for code smells and creates step-by-step implementation plans before refactoring.
- Common Refactoring Patterns: Guides through proven patterns like "Extract Method," "Replace Conditional with Polymorphism," and "Simplify Conditional."
- Safe Refactoring Steps: Enforces a rigorous process: ensure tests pass, make one small change, run tests, commit, and repeat, preventing regressions.
- Use Case: When encountering a "Long Method" code smell, use this skill to analyze the method, generate a plan to "Extract Method" into smaller, more focused functions, and guide the refactoring process step-by-step.
Quick Start
Analyze the file 'src/utils/dataProcessor.ts' for refactoring opportunities and generate a plan