What problem does it solve?
This Skill helps you improve existing code structure without changing its behavior by applying well-known, named refactoring transformations—guided by code smells and protected by a test-first workflow.
Core Features & Use Cases
- Smell-driven refactoring: Map common code smells (like Long Method, Feature Envy, Duplicate Code, and complex conditionals) to specific mechanical refactorings.
- Composable method improvements: Break large or confusing logic into smaller, intention-revealing methods while keeping behavior identical.
- Data and conditional simplification: Improve design by replacing primitive data representations and deconstructing complex conditionals into clearer structures.
- Safe workflow discipline: Use the refactoring loop (test → small change → test) to ensure changes remain behavior-preserving.
Quick Start
Use the refactoring-patterns skill to identify the main code smell in the snippet you provide, propose the smallest behavior-preserving refactoring step to apply first, and explain how to verify it with tests.