What problem does it solve? Codebases accumulate unclear names, oversized functions, and dead code that slow down development, but careless cleanup risks breaking working behavior. This Skill enforces a disciplined refactoring workflow that improves code structure while keeping behavior identical and verified by tests. ## Core Features & Use Cases - Test-first safety net: Runs existing tests before changing anything, and adds characterization tests when the target code has no coverage. - Small behavior-preserving steps: Applies one refactoring at a time (extract function, rename, inline, introduce parameter object) with test runs and commits between steps. - Scope discipline: Prevents scope creep, premature abstraction, and mixing refactors with bug fixes or new features. - Use Case: Ask to clean up a tangled 200-line function; the Skill reads all callers, confirms tests pass, extracts well-named helper functions one at a time, and verifies the suite stays green after each step. ## Quick Start Refactor the payment processing function in checkout.py to make it cleaner without changing its behavior.