What problem does it solve? Refactoring often drifts into uncontrolled editing: behavior changes sneak in, tests get "fixed" to match new output, and big-bang rewrites break working code. This Skill enforces a disciplined, behavior-preserving refactoring process so structural improvements never alter what the code does. ## Core Features & Use Cases - Golden rules enforcement: Preserves behavior, mandates small verifiable steps, requires a green test baseline, and forbids mixing refactoring with bug fixes or features. - Structured workflow: Guides you through understanding intent, establishing a test baseline (including characterization tests for uncovered code), batching coherent changes, and committing only green states. - Technique catalog: Provides a reference table of common techniques such as extract function, move class, rename, inline, and replace conditional with polymorphism, mapped to the problems they solve. - Use Case: When asked to "clean up" a tangled 300-line function, the Skill directs extracting methods in small batches, running the test suite after each batch, and committing only when green. ## Quick Start Ask the assistant to refactor a specific module or function to improve readability without changing its behavior, and it will apply this disciplined step-by-step process.