value-object-patterns
CommunityCraft robust domain models with Value Objects.
Software Engineering#type safety#design patterns#domain modeling#DDD#immutability#Value Object#primitive obsession
Authordaishiman
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides expert guidance on designing and implementing Value Objects in Domain-Driven Design (DDD), solving common issues like primitive obsession, inconsistent validation, and unclear domain logic. It helps you build more type-safe, immutable, and expressive domain models.
Core Features & Use Cases
- Core Concepts: Explains the fundamentals of Value Objects, their immutability, equality, and self-validation, distinguishing them from Entities.
- Design & Implementation Patterns: Offers common patterns for various Value Objects (e.g., Money, EmailAddress, DateRange) and strategies for validation.
- Primitive Obsession Detection: Includes a script to identify areas in your codebase where primitive types could be replaced by Value Objects.
- Use Case: When refactoring a legacy codebase, use this skill to identify
stringornumberparameters that represent domain concepts (likeemail,amount,userId). Then, apply the provided templates and patterns to create dedicated Value Objects, improving type safety and encapsulating domain logic.
Quick Start
Use the value-object-patterns skill to detect primitive obsession in the 'src/domain/' directory. Suggest suitable Value Object patterns for the identified issues. Provide a template for a simple Value Object for an 'EmailAddress'.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferencesassets
💻 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: value-object-patterns Download link: https://github.com/daishiman/AIWorkflowOrchestrator/archive/main.zip#value-object-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.