What problem does it solve?
This Skill addresses the risk and complexity of refactoring code by breaking down large changes into small, manageable, and safe steps, ensuring the codebase remains stable throughout the process.
Core Features & Use Cases
- Incremental Refactoring: Applies proven patterns like Strangler Fig, Branch by Abstraction, and Expand-Migrate-Contract to refactor a single module per session.
- Safety First: Enforces strict rules like a 5-file blast radius, running tests after every single edit, and verifying safeguards before changes.
- Use Case: You need to refactor a large, complex module that is critical to your application. The
surgeon skill allows you to do this piece by piece, with each step being tested and committed, minimizing the risk of introducing regressions.
Quick Start
Use the surgeon skill to refactor the 'user-authentication' module using the Strangler Fig pattern.