What problem does it solve? Cleaning up duplicated, deeply nested, or overly complex code is risky because even small edits can silently change behavior. This Skill enforces a disciplined, audit-first refactoring workflow that restructures code without altering its public API, outputs, error handling, or side effects. ## Core Features & Use Cases - Audit-before-edit workflow: Produces a structured refactoring audit with exact duplicate locations, risk analysis, and verification plans before any code is changed. - Behavior-preserving transformations: Consolidates duplicated logic, applies guard clauses, and extracts narrowly scoped helpers while preserving validation order, error paths, and async semantics. - Incremental verification: Runs the repository's existing tests, linters, and type checks after each change block and reports residual risk at handoff. - Use Case: You notice the same validation logic copied across three API handlers. The Skill audits all occurrences, confirms their contracts are identical, extracts a shared helper, and proves equivalence with the existing test suite. ## Quick Start Ask the assistant to refactor the duplicated logic in a specific file or module while keeping its behavior and public API unchanged.