refactor-code
SKILL.md
Refactor Code Skill
Purpose
Safely improve code quality through automated refactoring while maintaining behavioral correctness. This skill identifies refactoring opportunities from quality findings and applies them incrementally with continuous test validation.
Core Capabilities:
- Test-driven refactoring (run tests after each change)
- Automatic rollback on test failures
- Risk-based prioritization (P0-P3, Low/Medium/High risk)
- Incremental application (one refactoring at a time)
- Full traceability (log all changes with rationale)
- Quality metrics tracking (before/after comparison)
Key Innovation: Safety-first approach ensures refactorings never break functionality. Each change is validated with tests before proceeding.