domain-driven-design
Skill2.3k starsChanged 5 months agoMITView on GitHub
Model software around the business domain using bounded contexts, aggregates, and ubiquitous language. Use when the user mentions "domain modeling", "bounded context", "aggregate root", "ubiquitous language", "anti-corruption layer", "context mapping", "domain events", "strategic design", "the code doesnt match the business", or "how do we split this big system". Also trigger when breaking a monolith into services, defining service boundaries, or aligning code structure with business processes. Covers entities vs value objects, domain events, and context mapping strategies. For architecture layers, see clean-architecture. For complexity, see software-design-philosophy.
16 other projects use a version of this.
Trending
More talk lately.thin dataabout the whole repository
Most recently taken up by
- novatic-cu/nova-skillstheir own version, first seen Sep 20, 2026
- zaffnet/whetstonetheir own version, first seen Sep 17, 2026
- ciembor/agent-rules-bookstheir own version, first seen Sep 9, 2026
- techygarg/latticetheir own version, first seen Sep 3, 2026
- eralmansouri/skillstheir own version, first seen Aug 20, 2026
- rrezartprebreza/spring-boot-skillstheir own version, first seen Aug 7, 2026
Who's talking about wondelai/skills
- jeremylongshore/tons-of-skills-marketplace“feat: add wondelai/skills — 25 agent skills for business, design & marketing”GitHub · Feb 16, 2026 · 1 reactions
- sudosubin/agents.nix“kiro-powers.github.wondelai.skills: init at 1.8.0”GitHub · Oct 4, 2026
- sudosubin/agents.nix“codex-plugins.github.wondelai.skills: init at 1.8.0”GitHub · Oct 4, 2026
- sudosubin/agents.nix“codex-marketplaces.github.wondelai.skills: init at 1.8.0”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-plugins.github.wondelai.skills: init at 1.8.0”GitHub · Oct 4, 2026
The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 14
Talked about on GitHub (14 times).
On GitHub · 14
- Feb 16, 2026feat: add wondelai/skills — 25 agent skills for business, design & marketing — jeremylongshore/tons-of-skills-marketplace1 reaction · 5 comments
- Oct 4, 2026kiro-powers.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-plugins.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-marketplaces.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
9 more on GitHub
- Oct 4, 2026claude-code-marketplaces.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-plugins.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.wondelai.skills: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Sep 12, 2026Research digest 2026-09-11: the skill-generation neighborhood, and four fenced candidates (description triggering first) — Autogenetica/agent-lens0 reactions · 1 comment
- Jul 10, 2026feat(scripts): census-watch --enforce — local enforcement of the 2026-07-22 census delist deadline [skip auto-bump] — jeremylongshore/tons-of-skills-marketplace0 reactions
- Apr 3, 2026Add skills: wondelai/skills — 9 business strategy, marketing, and engineering skills — VoltAgent/awesome-agent-skills0 reactions · 1 comment
- Feb 16, 2026Add wondelai/skills — 25 business & product skills — keyuyuan/skillhub-awesome-skills0 reactions
- Feb 16, 2026Add wondelai/skills to Featured Skill Collections — Kamalnrf/claude-plugins0 reactions · 2 comments
- Feb 16, 2026[Resource]: wondelai/skills — hesreallyhim/awesome-claude-code0 reactions · 1 comment
Used with
Projects with it also use hexagonal-architecture.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
gabrielgianesiniSkillhexagonal-architecture
Ports & Adapters architecture. Activated when user asks where to put code, which layer, folder structure, or discusses separation between domain, application, and infrastructure.
Also in 3 projects that use this
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- ciembor/agent-rules-books★ 2.9ksame name
- rrezartprebreza/spring-boot-skills★ 293same name
- techygarg/lattice★ 197same name
- booklib-ai/booklib★ 38same name
- fatonh/symfony-skills★ 35same name
- eralmansouri/skills★ 9same name
- joabgonzalez/ai-agents-skills★ 9same name
- dekoza/oh-my-slop★ 4same name
- EvanOman/claude-skills-public★ 4same name
- AntonioMellies/claude-code-skills★ 2same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository66 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- 37signals-waySkill
- architecture-optimizationSkill
- blue-ocean-strategySkill
- clean-architectureSkill
- clean-codeSkill
- cold-start-problemSkill
- contagiousSkill
- continuous-discoverySkill
- conversion-optimizationSkill
- create-appSkill
- create-businessSkill
- create-websiteSkill
- cro-methodologySkill
- crossing-the-chasmSkill
- ddia-systemsSkill
- design-code-architectureSkill
- design-everyday-thingsSkill
- design-sprintSkill
- drive-motivationSkill
- good-strategy-bad-strategySkill
- grow-appSkill
- grow-businessSkill
- grow-websiteSkill
- high-output-managementSkill
- high-perf-browserSkill
- hooked-uxSkill
- hundred-million-offersSkill
- improve-appSkill
- improve-businessSkill
- improve-code-qualitySkill
- improve-retentionSkill
- improve-websiteSkill
- influence-psychologySkill
- inspired-productSkill
- ios-hig-designSkill
- jobs-to-be-doneSkill
- lean-analyticsSkill
- lean-startupSkill
- lean-uxSkill
- made-to-stickSkill
- microinteractionsSkill
- mom-testSkill
- monetizing-innovationSkill
- negotiationSkill
- obviously-awesomeSkill
- one-page-marketingSkill
- pragmatic-programmerSkill
- predictable-revenueSkill
- refactoring-patternsSkill
- refactoring-uiSkill
- release-itSkill
- remove-technical-debtSkill
- scorecard-marketingSkill
- software-design-philosophySkill
- steve-jobs-design-reviewSkill
- storybrand-messagingSkill
- system-designSkill
- team-topologiesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
If a concept is hard to name, the model is likely wrong -- naming difficulty is a design signal
- Distinctive: line 58
Start by mapping what exists (Big Ball of Mud), then define target boundaries
- Distinctive: line 80
Keep aggregates small (one root plus a minimal cluster).
- Distinctive: line 105
Not every state change deserves an event -- only publish what the domain cares about
- Distinctive: line 142
Core concept: Not all parts of a system are equally important.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Domain-Driven Design Framework
Framework for tackling software complexity by modeling code around the business domain. The greatest risk in software is not technical failure -- it is building a model that does not reflect how the business actually works.
Core Principle
The model is the code; the code is the model. Software should embody a deep, shared understanding of the business domain. When domain experts and developers speak the same language and that language is directly expressed in the codebase, complexity becomes manageable and the system evolves gracefully as the business changes.
Scoring
Goal: 10/10. Score a domain model by awarding 1 point per satisfied row of the Quick Diagnostic (7 rows) plus up to 3 points for depth: +1 if the Core Domain has a genuinely rich model (not just CRUD), +1 if invariants live inside aggregates rather than in services, +1 if the ubiquitous language is consistent across conversation, code, and tests. Bands: 9-10 = expert-readable names, explicit context boundaries with ACLs, small aggregates, behavior-rich entities, events for cross-aggregate flow, an identified Core Domain; 5-6 = some domain language but leaky boundaries or anemic objects; <=3 = technical naming, one model for everything, logic scattered in services. Report the score and the specific diagnostic rows failing.
Framework
1. Ubiquitous Language
Core concept: A shared, rigorous language between developers and domain experts, used consistently in conversation, documentation, and code. When the language changes, the code changes -- and awkward naming in code feeds back into refining the language.
Why it works: Ambiguity is the root cause of most modeling failures. When a developer says "order" and an expert means "purchase request," bugs are inevitable; a ubiquitous language forces every name in code to map to a concept the business recognizes and validates.
Key insights:
- The language emerges from deep collaboration, not a glossary bolted on after the fact
- If a concept is hard to name, the model is likely wrong -- naming difficulty is a design signal
- Technical jargon (
DataProcessorvs.ClaimAdjudicator) hides domain logic from the experts who could correct it - Different bounded contexts may use the same word with different meanings -- and that is fine
Code applications:
| Context | Pattern | Example |
| Class/method naming | Name after domain concepts and verbs | LoanApplication, policy.underwrite() -- not RequestHandler, process() |
| Module structure | Organize by domain concept | shipping/, billing/ -- not controllers/, services/ |
| Code review | Reject technical-only names | Flag Manager, Helper, Processor, Utils as naming smells |
See: references/ubiquitous-language.md when running modeling sessions or maintaining a glossary -- covers how the language evolves and feeds back into code.
2. Bounded Contexts and Context Mapping
Core concept: A bounded context is an explicit boundary within which a particular domain model applies. The same word ("Customer") can mean different things in different contexts; context maps define the relationships and translation strategies between them.
Why it works: Large systems that try to maintain a single unified model inevitably collapse into inconsistency. Bounded contexts accept that different parts of the business need different models; context maps manage the integration between them.
Key insights:
- A bounded context is not a microservice -- it is a linguistic and model boundary that may contain multiple services
- Context boundaries often align with team boundaries (Conway's Law)
- The nine context mapping patterns describe political and technical relationships between teams
- Anti-Corruption Layer is the most important defensive pattern -- never let a foreign model leak into your core domain
- Shared Kernel couples two teams; keep it small and explicitly governed
- Start by mapping what exists (Big Ball of Mud), then define target boundaries
Code applications:
| Context | Pattern | Example |
| Service integration | Anti-Corruption Layer | Translate external API responses into your domain objects at the boundary |
| Legacy migration | Conformist / ACL | Wrap the legacy system behind an adapter that speaks your domain language |
| API design | Open Host Service + Published Language | Expose a well-documented REST API with a canonical schema |
See: references/bounded-contexts.md for the nine mapping patterns and integration strategies.
3. Entities, Value Objects, and Aggregates
Core concept: Entities have identity that persists across state changes. Value Objects are defined entirely by their attributes and are immutable. Aggregates are clusters of entities and value objects with a single root that enforces consistency boundaries.
Why it works: Without these distinctions, everything becomes a mutable, identity-bearing object -- tangled state, inconsistent updates, fragile concurrency. Aggregates draw the line: everything inside is guaranteed consistent; everything outside is eventually consistent.
Key insights:
- Entity test: "Am I the same thing even if all my attributes change?" (a person changes name and address -- still the same person)
- Value Object test: "Am I defined only by my attributes?" (any $10 bill is interchangeable with another)
- Most things should be Value Objects, not Entities -- prefer immutability
- Keep aggregates small (one root plus a minimal cluster); reference other aggregates by ID, not object reference
- Immediate consistency only within an aggregate; design for eventual consistency between aggregates
Code applications:
| Context | Pattern | Example |
| Identity tracking | Entity with ID | Order identified by orderId, survives state changes |
| Immutable attributes | Value Object | Address(street, city, zip) -- replace, never mutate |
| Consistency boundary | Aggregate Root | Order is root; OrderLine items exist only through it |
| Concurrency control | Optimistic locking on root | Version field on Order; conflict if two edits race |
See: references/building-blocks.md for aggregate design rules and consistency boundaries.
4. Domain Events
Core concept: A domain event captures something that happened in the domain that experts care about, named in past tense (OrderPlaced, PaymentReceived) -- a fact that has already occurred.
Why it works: Domain events decouple cause from effect. When OrderPlaced is published, shipping, billing, and notifications each react independently without the ordering context knowing about them -- less coupling, eventual consistency, a natural audit trail.
Key insights:
- Events are immutable facts -- once published, they cannot be changed or retracted
- Domain events are internal to a bounded context; integration events cross boundaries
- Events enable temporal decoupling: the producer does not wait for the consumer
- Event sourcing stores the full event history as the source of truth, deriving current state by replay
- Not every state change deserves an event -- only publish what the domain cares about
Code applications:
| Context | Pattern | Example |
| State transitions | Raise event on domain action | order.place() raises OrderPlaced |
| Cross-context integration | Publish integration event | OrderPlaced triggers ShippingLabelRequested in shipping context |
| Eventual consistency | Async event handlers | Inventory handler updates stock asynchronously after OrderPlaced |
See: references/domain-events.md for event naming, event sourcing, and integration events.
5. Repositories and Factories
Core concept: Repositories provide the illusion of an in-memory collection of domain objects, hiding persistence. Factories encapsulate complex creation logic so aggregates are always born in a valid state.
Why it works: When persistence and assembly details leak into domain code, every storage change ripples through business rules and aggregates can be constructed in half-valid states. Repositories confine SQL/ORM concerns to infrastructure so the domain stays testable in memory; factories make the only path to an aggregate one that enforces its invariants, so an invalid instance is unrepresentable.
Key insights:
- The Repository interface belongs in the domain layer; its implementation belongs in infrastructure
- Repository methods speak the ubiquitous language:
findPendingOrders(), notgetByStatusCode(3) - Collection-oriented repositories mimic
add/remove; persistence-oriented ones usesave - Factories are warranted for complex rules or multi-part assembly; a two-field Value Object just needs a constructor
- The Specification pattern encapsulates query criteria as domain objects:
OverdueInvoiceSpecification
Code applications:
| Context | Pattern | Example |
| Data access abstraction | Repository interface | OrderRepository.findByCustomer(customerId) in domain; PostgresOrderRepository in infrastructure |
| Complex creation | Factory method | Order.createFromQuote(quote) validates and assembles from a Quote aggregate |
| Query encapsulation | Specification | spec = OverdueBy(days=30); repo.findMatching(spec) |
See: references/repositories-factories.md for Repository, Factory, and Specification patterns.
6. Strategic Design and Distillation
Core concept: Not all parts of a system are equally important. Strategic design identifies the Core Domain -- where competitive advantage lives -- and distinguishes it from Supporting Subdomains (necessary, not differentiating) and Generic Subdomains (commodity).
Why it works: Applying the same rigor everywhere spreads your best talent thin and over-engineers commodity functionality. Identifying the Core Domain concentrates the best developers and deepest modeling where they matter most.
Key insights:
- Core Domain: invest your best people and deepest modeling; Supporting: build, but don't over-engineer; Generic (auth, email, payments): buy or use open-source
- Distillation extracts and highlights the Core Domain from surrounding complexity
- A Domain Vision Statement is a one-page description of the Core Domain's value proposition
- Revisit what is "core" as the business evolves -- today's differentiator may become tomorrow's commodity
Code applications:
| Context | Pattern | Example |
| Build vs. buy | Classify subdomain type | Build custom pricing engine (core); use Stripe for payments (generic) |
| Team allocation | Best developers on Core Domain | Seniors model underwriting rules; juniors integrate the email service |
| Code organization | Separate core from generic | domain/pricing/ (deep model) vs. infrastructure/email/ (thin adapter) |
See: references/strategic-design.md when deciding where to invest engineering effort -- subdomain classification and distillation techniques.
Common Mistakes
| Mistake | Why It Fails | Fix |
| Technical names instead of domain language | Logic hidden behind DataManager; experts can't validate the model | Rename to domain terms (ClaimAdjudicator); if no domain term exists, the concept may be wrong |
| One model to rule them all | A single Customer class for billing, shipping, and marketing becomes bloated and contradictory | Bounded contexts: each gets its own Customer with only the attributes it needs |
| Giant aggregates | Concurrency conflicts, slow loads, transactional bottlenecks | Keep aggregates small; reference by ID; eventual consistency between them |
| Anemic domain model | Objects are data bags; rules scatter across services and duplicate | Move behavior into entities and value objects; services orchestrate only |
| No Anti-Corruption Layer | Foreign models leak in; code couples to external schemas | Wrap every external system behind a translation layer |
| Bounded context = microservice | Premature extraction; distributed complexity without benefit | A context is a model boundary, not a deployment unit; start with modules in a monolith |
| Skipping domain experts | Developers invent a model that doesn't match reality; expensive rework | Regular modeling sessions until experts say "yes, that is how it works" |
Quick Diagnostic
| Question | If No | Action |
| Can a domain expert read your class names and understand them? | Technical jargon hides the model | Rename classes, methods, events to ubiquitous language |
| Are bounded context boundaries explicitly defined? | Models bleed; same term means different things | Draw a context map; define boundaries and translations |
| Are aggregates small (one root + minimal cluster)? | Slow loads, concurrency issues | Split aggregates; reference by ID; accept eventual consistency |
| Do domain objects contain behavior, not just data? | Anemic model; logic scattered in services | Move business rules into entities and value objects |
| Are domain events used for cross-aggregate communication? | Tight coupling, synchronous chains | Introduce events; let aggregates react asynchronously |
| Is there an Anti-Corruption Layer at every external integration? | Foreign models pollute your domain | Add a translation layer at each boundary |
| Have you identified which subdomain is core? | Best talent spread thin | Classify subdomains; focus deep modeling on the Core Domain |
Further Reading
For the complete methodology, patterns, and deeper insights:
About the Author
Eric Evans is a software design consultant and the originator of Domain-Driven Design, developed through work on large-scale systems in finance, insurance, and logistics. His 2003 book Domain-Driven Design: Tackling Complexity in the Heart of Software is one of the most influential software architecture books ever written, and he continues to evolve DDD through his consultancy, Domain Language.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

