What problem does it solve? Codebases accumulate structural debt — long methods, duplicated logic, primitive obsession — that slows every future change. This Skill gives Claude a disciplined, test-backed method for improving code structure in small, safe steps instead of risky big-bang rewrites. ## Core Features & Use Cases - Code Smell Diagnosis: Maps 25+ recognized smells (Long Function, Feature Envy, Shotgun Surgery, Data Clumps) to the specific refactorings that resolve them. - Named Refactorings Catalog: Provides mechanics for Extract Function, Move Method, Replace Conditional with Polymorphism, Introduce Parameter Object, and dozens more, each as a sequence of reversible micro-steps. - Discipline Guardrails: Enforces the two-hats rule (never mix feature work with refactoring), the Rule of Three, and explicit when-NOT-to-refactor criteria. - Use Case: Ask Claude to clean up a 200-line method before adding a feature. It identifies the smells, applies Extract Function and Decompose Conditional step by step, and keeps the test suite green after every move. ## Quick Start Ask Claude to refactor a long method in your current file using Fowler's catalog while keeping all tests passing.