What problem does it solve? Refactoring large legacy codebases is risky: without tests, rollback points, or a plan, one bad change can break everything. This Skill provides a structured, multi-session workflow that assesses codebase health, builds characterization tests as a safety net, and refactors one module at a time with verified rollback points. ## Core Features & Use Cases - Health Assessment (Autopsy): Scores the codebase 0-100 and builds a worst-first surgery queue of modules needing refactoring. - Safety Net (Safeguard): Generates characterization tests capturing current behavior and tags git rollback points before any surgery begins. - Incremental Surgery: Applies proven patterns (Strangler Fig, Branch by Abstraction, Expand-Migrate-Contract, Extract & Simplify) one module per session with a 5-file blast radius limit. - Cross-Session State Tracking: Maintains RESCUE-STATE.md so work can pause and resume across sessions without losing progress. - Use Case: You inherit a messy legacy project with no tests. Run the rescue workflow to get a health score, add characterization tests, then refactor the worst modules one at a time — each verified and committed with a rollback tag. ## Quick Start Ask the agent to rescue this legacy codebase by running a full health autopsy and starting the refactoring workflow.