What problem does it solve?
Large-scale refactors are risky because small changes can introduce type errors, break tests, or leave broken imports across many files; this Skill enforces safety by planning, verifying, and reverting refactors so behavior remains unchanged.
Core Features & Use Cases
- Baseline Verification: Establishes typecheck and test baselines before any edits to detect pre-existing issues and prevent new regressions.
- Planned, File-by-File Execution: Produces a concrete plan, creates targets, updates importers, and applies minimal edits in an order that minimizes intermediate breakage.
- Automated Fix & Revert Workflow: Runs verification, attempts up to two automated fixes for new errors, and performs a full git revert if verification still fails.
- Use Case: Rename a core exported symbol, extract authentication logic into a new module, or move and split files while ensuring all imports and tests remain valid.
Quick Start
Invoke the refactor skill with a clear target, for example: /refactor extract the auth logic into a separate module.