Improves code quality and reduces technical debt through automated, test-driven refactoring cycles with built-in safety rollbacks.
The Refactor Code Skill provides a systematic, risk-aware approach to improving software architecture while strictly preserving behavioral correctness. By scanning for patterns such as long methods, complex conditionals, and code duplication, it applies incremental improvements followed by immediate automated test validation. This skill is essential for maintaining healthy codebases, allowing developers to choose between conservative and aggressive refactoring modes to ensure changes align with project risk tolerances while providing full traceability through change logs and quality metrics.
主要功能
01Test-driven validation after every incremental code change
02Automatic Git-based rollback to prevent regressions on test failure
03Risk-based prioritization ranging from P0 critical to P3 low-risk improvements
04Traceable logging of all changes with rationale and quality metrics comparison
050 GitHub stars
06Three aggressiveness levels: Conservative, Moderate, and Aggressive
使用场景
01Cleaning up legacy codebases by extracting methods and simplifying nested conditionals
02Standardizing code quality and removing duplication during peer reviews
03Systematically reducing technical debt after completing a major feature sprint