domain-driven-design

Model software around business domains using bounded contexts, aggregates, and ubiquitous language.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/HafidJoss/Lummy --skill domain-driven-design-hafidjoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-driven-design
Source: https://github.com/HafidJoss/Lummy/tree/main/agent/skills/domain-driven-design
Command: npx skills add https://github.com/HafidJoss/Lummy --skill domain-driven-design-hafidjoss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Software systems often fail because the code does not reflect how the business actually works. This Skill provides a structured framework for aligning code with the business domain, preventing anemic models, bloated god-classes, and leaky integrations that cause expensive rework. ## Core Features & Use Cases - Strategic Design: Identify bounded contexts, classify Core vs Supporting vs Generic subdomains, and draw context maps with the nine mapping patterns including Anti-Corruption Layers. - Tactical Modeling: Design entities, value objects, aggregates, domain events, repositories, and factories with explicit consistency boundaries and invariant enforcement. - Ubiquitous Language: Build a shared vocabulary between developers and domain experts that is reflected directly in class names, methods, and events. - Use Case: When breaking a monolith into services, use this Skill to map existing contexts, define service boundaries along domain seams, and protect the new model from legacy schemas with translation layers. ## Quick Start Ask the AI to help you define bounded contexts and aggregates for your system using domain-driven design principles.

Frequently Asked Questions about domain-driven-design

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

FAQPage Schema
How do I define bounded contexts in a large system?

Identify boundaries through linguistic signals (the same term meaning different things to different teams), organizational structure, and technical needs like consistency requirements. Draw a context map showing each context, its owning team, and the mapping patterns between them.

What is the difference between an entity and a value object?

An entity is defined by identity that persists across attribute changes, like a bank account. A value object is defined entirely by its attributes and is immutable, like Money or Address. Prefer value objects; most domain concepts should be value objects.

How do I break a monolith into services using DDD?

Start by mapping the existing system as bounded contexts, labeling Big Balls of Mud explicitly. Build new functionality in clean contexts protected by Anti-Corruption Layers, then gradually extract functionality. A bounded context is a model boundary, not necessarily a microservice.

When should I use an Anti-Corruption Layer?

Use an Anti-Corruption Layer whenever integrating with a system whose model does not fit yours, such as legacy systems or third-party APIs. It translates external models into your domain language at the boundary, preventing foreign concepts from polluting your core domain.

Why do large aggregates cause concurrency problems?

Large aggregates create transaction contention because any change locks the entire cluster, causing conflicts when users edit different parts. Keep aggregates small with one root and minimal children, reference other aggregates by ID, and use domain events for eventual consistency.

Is a bounded context the same as a microservice?

No. A bounded context is a linguistic and model boundary, not a deployment unit. It may contain multiple services or exist as a module within a monolith. Treating them as equivalent leads to premature distribution and unnecessary operational complexity.