Safe Code Refactor

•
350
•

Executes incremental, test-verified code refactors to reduce complexity and improve maintainability.

The Refactor skill provides a structured framework for Claude to perform complex code transformations with safety-first guardrails. It enforces a strict 'transform-test-commit' workflow, ensuring that no refactoring step breaks existing functionality. Whether targeting specific functions, performing project-wide complexity sweeps, or extracting 'god-files' into focused modules, this skill automates code cleanup while maintaining a green test suite at every step. It includes a comprehensive catalog of patterns such as method extraction, conditional simplification, and dead code removal.

Características Principales

01Sweep mode for identifying and fixing complexity hotspots project-wide
02Atomic transformation workflow with mandatory test verification before every commit
03Automated before-and-after metric reporting including cyclomatic complexity and nesting depth
04Extraction mode for splitting large files or methods into modular components
05Targeted refactoring for specific files, functions, or classes
06350 GitHub stars

Casos de Uso

01Breaking down monolithic 'god-files' into smaller, testable modules
02Systematically renaming variables and simplifying nested logic across a package
03Reducing cyclomatic complexity in legacy codebases to improve readability