refactor-organizing-data
Installation
SKILL.md
Refactor: Organizing Data
Overview
These 15 techniques improve how data is represented, accessed, and managed. They address Primitive Obsession, Data Class, Data Clumps, and Temporary Field smells by introducing proper encapsulation, replacing type codes with polymorphism, and managing object associations correctly.
When to Use
- Primitives where value objects would be better (phone numbers as strings, money as floats)
- Type codes drive switch statements across the codebase
- Public fields accessed directly without control
- Data clumps (same group of variables passed around together)
- Classes with only fields and getters/setters but no behavior
- Fields only set under certain conditions (Temporary Field)