What problem does it solve? Changing code structure safely is hard when there is no proof that behavior stayed the same. This Skill enforces a disciplined refactoring workflow where every structural change is guarded by tests, applied one step at a time, and never mixed with feature changes in the same diff. ## Core Features & Use Cases - Test-guarded step-by-step refactoring: Apply one refactoring technique per commit, run tests after each step, and revert on failure. - Legacy code handling: Build characterization tests that pin current behavior before touching untested legacy code, with explicit stop conditions when safety cannot be established. - Code smell catalog and technique mapping: Identify 20 named code smells (long methods, duplication, embedded business rules, N+1 iteration) and map each to a concrete refactoring technique with applicability conditions. - Language-specific guidance: Dedicated references for Python, JavaScript, TypeScript, and PHP covering exhaustiveness checking, immutability, schema validation, and bulk operations. - Use Case: When cleaning up a 300-line function after a feature is implemented, use this Skill to extract methods one at a time, keep tests green after each step, and split renames into separate commits so reviewers can verify each change mechanically. ## Quick Start Ask the AI to refactor the specified module using the refactoring skill, keeping behavior unchanged and committing one safe step at a time under existing tests.