The Safe Refactor skill provides a rigorous, step-by-step workflow for improving code quality through atomic transformations. By enforcing a strict 'Transform -> Test -> Commit' cycle, it ensures that codebases remain stable and functional during structural changes. Whether targeting specific functions, sweeping entire directories for complexity hotspots, or extracting logic into new modules, this skill automates the analysis of cyclomatic complexity and maintains a detailed log of improvements, making it an essential tool for managing technical debt in professional software projects.
주요 기능
01Multiple Refactor Modes: Supports targeted file/function refactoring, broad sweeps, and specific logic extraction.
02Automated Metric Tracking: Compares cyclomatic complexity, lines of code, and nesting depth before and after changes.
03Safety Guardrails: Automatically halts on test failures and reverts changes to maintain a 'green' baseline.
04350 GitHub stars
05Atomic Transformation Workflow: Enforces a strict one-change-one-test cycle to prevent regressions.
06Complexity Hotspot Detection: Scans projects to identify and prioritize high-complexity areas for refactoring.
사용 사례
01Improving code readability and naming conventions in legacy systems without risking functional regressions.
02Decomposing 'God Files' into modular, focused components using Extract Mode.
03Systematically reducing technical debt across a large repository by targeting high-complexity functions.