ddd

Guide Domain-Driven Design tactical patterns with TypeScript code examples.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/0r0loo/my-claude-code-toolkit --skill ddd-0r0loo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd
Source: https://github.com/0r0loo/my-claude-code-toolkit/tree/main/.claude/skills/DDD
Command: npx skills add https://github.com/0r0loo/my-claude-code-toolkit --skill ddd-0r0loo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to Domain-Driven Design's tactical patterns, helping developers build robust, maintainable, and domain-centric software by clarifying complex modeling concepts.

Core Features & Use Cases

  • Domain Modeling Guidance: Offers clear definitions and best practices for Entities, Value Objects, Aggregates, Repositories, Domain Services, and Domain Events.
  • Code Examples: Illustrates good and bad practices with TypeScript code snippets for each pattern.
  • Layered Architecture Principles: Explains the dependency rules and responsibilities of Domain, Application, Infrastructure, and Presentation layers.
  • Use Case: When designing a new feature for an e-commerce platform, use this Skill to ensure the Order aggregate is correctly modeled, its invariants are protected, and interactions with Customer and Product are managed via ID references.

Quick Start

Consult the DDD skill for guidance on modeling a Product entity with Value Objects for Price and Dimensions.

Frequently Asked Questions about ddd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Domain-Driven Design tactical patterns in TypeScript?

Implement Domain-Driven Design tactical patterns in TypeScript by following detailed best practices and code examples for Aggregates, Entities, Value Objects, and Repositories. The guide ensures robust object modeling and state management within a layered architecture.

What is the best way to model an Aggregate and protect its invariants?

Modeling an Aggregate requires defining clear rules to protect its invariants and manage state. Best practices dictate referencing other aggregates like Customer or Product by ID, ensuring boundaries are respected and inter-aggregate communication is handled via Domain Events.

When do I use a Value Object versus an Entity in domain modeling?

Use a Value Object for domain concepts without identity, like Price or Dimensions, and an Entity for objects with distinct lifecycles. The guide clarifies these Domain-Driven Design modeling concepts with TypeScript code snippets illustrating good and bad practices.

How does inter-aggregate communication work with Domain Events and Domain Services?

Inter-aggregate communication uses Domain Events for asynchronous notifications and Domain Services for stateless business logic. This approach maintains clear boundaries and decouples aggregates, ensuring maintainable, domain-centric software design.

What are the dependency rules for a DDD layered architecture?

A DDD layered architecture enforces dependency rules flowing from Presentation and Infrastructure towards the Application and Domain layers. This structure isolates domain logic, keeping the core business model maintainable and independent from infrastructure concerns.