refactoring/organizing-data

Community

Transform primitives into resilient domain objects

Authorjohnnystefan
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill tackles primitive obsession and exposed mutable state by guiding you through encapsulating fields and collections, swapping magic numbers for symbolic constants, and modeling type codes with dedicated objects so your data structures become clearer and safer.

Core Features & Use Cases

  • Encapsulate Fields, Collections, and Access: Move public data into private members with getters, setters, and controlled collection modifiers to prevent external mutation.
  • Replace Primitives with Domain Objects: Promote strings, numbers, or arrays that carry behavior into meaningful classes that can validate, format, or enrich their contents.
  • Manage Type Codes and Identities: Turn raw type codes into classes or polymorphic hierarchies and centralize shared reference instances to avoid duplication.
  • Use Case: Refactor a customer order aggregate where primitive IDs, collections, and status codes are leaking through services, replacing them with value objects and read-only lists for safer semantics.

Quick Start

Ask the agent to refactor a class with primitive fields by encapsulating collections and replacing magic numbers with symbolic constants.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: refactoring/organizing-data
Download link: https://github.com/johnnystefan/test-saas-business/archive/main.zip#refactoring-organizing-data

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.