What problem does it solve? Legacy and rushed code accumulates structural problems—long methods, duplicated logic, tangled conditionals—that slow down every future change. This Skill provides a disciplined, catalog-driven approach to identifying code smells and applying the exact named refactoring that fixes each one, all while keeping tests green so behavior never changes. ## Core Features & Use Cases - Smell-Driven Diagnosis: Maps the five code smell families (Bloaters, OO Abusers, Change Preventers, Dispensables, Couplers) to their prescribed refactorings, so you fix root causes instead of guessing. - Full Refactoring Catalog: Covers Composing Methods, Moving Features Between Objects, Organizing Data, and Simplifying Conditional Logic with step-by-step mechanics and before/after code examples. - Safe Workflow Discipline: Enforces the green-test → small change → green-test → commit cycle, plus large-scale strategies like Branch by Abstraction and Parallel Change for production systems. - Use Case: You inherit a 500-line Order class with a switch statement on customer type repeated in four methods. The Skill identifies Feature Envy and Switch Statements smells, then walks you through Move Method and Replace Conditional with Polymorphism, one tested step at a time. ## Quick Start Ask the assistant to review this messy function, name the code smells it contains, and refactor it step by step without changing its behavior.