What problem does it solve? Developers often introduce design patterns prematurely, producing over-engineered code, or miss the moment when a real smell justifies a pattern. This Skill provides Joshua Kerievsky's discipline for deciding when a pattern earns its complexity cost and when it should be inlined. ## Core Features & Use Cases - Smell-to-Pattern Mapping: Match concrete code smells (duplicated logic, type-switching conditionals, scattered null checks) to the right pattern destination such as Strategy, State, Null Object, or Composite. - Named Refactoring Moves: Apply specific refactorings like Replace Conditional Logic with Strategy, Introduce Null Object, and Form Template Method, each with before/after code examples. - Refactoring Away from Patterns: Recognize speculative pattern over-engineering and safely inline Singletons, unused Strategy hierarchies, and single-implementation abstractions. - Use Case: When reviewing a method with a growing switch statement on loan types, use this Skill to decide whether Replace Conditional Logic with Strategy is economically justified, then execute it in small tested steps. ## Quick Start Ask Claude to review a class with conditional type logic and recommend whether to refactor it toward a design pattern.