What problem does it solve? Refactoring without tests or mixing structural changes with bug fixes makes code changes risky, hard to review, and difficult to revert. This Skill enforces a disciplined process so every refactoring preserves behavior and stays verifiable. ## Core Features & Use Cases - Three Iron Laws: Enforces tests before refactoring, one change at a time, and never mixing refactoring with bug fixes or features. - Step-by-Step Process: Provides a repeatable workflow of verifying tests, making one structural change, running the suite, and committing. - Bug Discovery Protocol: Defines exactly how to stash refactoring work, fix a discovered bug in a separate commit, and resume. - Use Case: While extracting methods from a 300-line function, you discover a validation bug. The Skill directs you to stash the refactoring, write a failing test, fix and commit the bug separately, then continue the extraction incrementally. ## Quick Start Ask the AI to help refactor a function using the refactoring-safely skill, extracting one method at a time with tests run after each change.