# Domain Driven Design

> Apply Domain-Driven Design tactical and strategic patterns to model complex business domains clearly. Use when building complex business logic, defining bounded contexts, aggregates, or ubiquitous language.

- Skill: `itsual/domain-driven-design` (Agent Skill)
- Install (CLI): `npx skillmds@latest add itsual/domain-driven-design`
- Raw SKILL.md: https://api.skillmd.com/api/skills/itsual/domain-driven-design/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: itsual (https://skillmd.com/u/itsual)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/itsual/domain-driven-design

---


# Domain-Driven Design

## Overview

DDD helps manage complexity by aligning the code model with the business domain and explicitly defining boundaries.

## When to Use

- Complex business domains with rich rules
- Multiple teams working on related but distinct areas
- When the existing model is becoming a “big ball of mud”

## Key Concepts

- **Ubiquitous Language** – Shared language between domain experts and developers
- **Bounded Contexts** – Explicit boundaries where a model applies
- **Aggregates** – Consistency boundaries
- **Entities vs Value Objects**
- **Domain Events**
- **Anti-Corruption Layers** when integrating with other systems

## Practical Guidance

- Start with the domain, not the database or framework
- Keep aggregates small
- Prefer eventual consistency across aggregates when appropriate
- Use context maps to understand relationships between bounded contexts
- Don’t force full DDD on simple CRUD areas

## Verification

- Core domain logic is expressed in domain terms
- Boundaries between contexts are clear
- Invariants are protected inside aggregates

