What problem does it solve? Legacy and rushed code accumulates structural problems—long methods, duplicated logic, tangled conditionals, and misplaced responsibilities—that slow down every future change. This Skill provides a disciplined, smell-driven approach to identifying structural problems and applying the correct named refactoring safely, with tests as a guard at every step. ## Core Features & Use Cases - Smell-Driven Diagnosis: Identify code smells across five families (Bloaters, OO Abusers, Change Preventers, Dispensables, Couplers) and map each to its prescribed refactoring. - Named Transformation Catalogs: Step-by-step mechanics for Composing Methods, Moving Features Between Objects, Organizing Data, and Simplifying Conditional Logic, each with before/after code examples. - Safe Workflow Discipline: Enforce the green-to-green refactoring cycle, the Two Hats rule, the Rule of Three, and large-scale strategies like Branch by Abstraction and Parallel Change. - Use Case: You inherit a 500-line God class with a switch statement duplicated in four methods. Use this Skill to name the smells (Large Class, Switch Statements), then apply Extract Class and Replace Conditional with Polymorphism in small, test-verified steps. ## Quick Start Ask the AI to review this messy function, name the code smells it contains, and refactor it step by step while keeping the tests green.