SkillAgentSearch skills...

domain-driven-design

Model software around the business domain using bounded contexts, aggregates, and ubiquitous language

Install / Use

npx skills add wondelai/skills --skill domain-driven-design

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

84/100

Supported Platforms

Universal

Our assessment of domain-driven-design

domain-driven-design scores 84/100 on our quality scale, 2878th of 4,698 Development & Engineering skills we index.

Its SKILL.md is 15 KB long, well organised into 14 sections and no code examples: a thorough specification that gives an agent plenty to work with.

With 2,248 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
13/20
Description
12/15
Adoption
14/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so domain-driven-design is actively maintained.
  • Our last check on 2026-11-05 found the source still online.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-01. Automated pattern scan on 2026-10-01. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

domain-driven-design compared with similar skills

All 4 of these similar skills score higher than domain-driven-design; compare them before choosing.

SkillScoreStarsUpdatedFormat
domain-driven-design (this skill)by wondelai842.2k2mo agoSKILL.md
taste-skillby Leonxlnx100116.8k8d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10072.1ktodayCLAUDE.md
claude-howtoby luongnv8910047.3k2d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.7k7d agoCLAUDE.md

Frequently asked questions

How do I install domain-driven-design?
Run npx skills add wondelai/skills --skill domain-driven-design. The install tabs above show the steps for each supported agent.
Which AI agents does domain-driven-design work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is domain-driven-design safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is domain-driven-design still maintained?
The repository was last updated about 2 months ago, so domain-driven-design is actively maintained.

name: domain-driven-design description: '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.' license: MIT metadata: author: wondelai version: "1.4.0"

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 (DataProcessor vs. 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(), not getByStatusCode(3)
  • Collection-oriented repositories mimic add/remove; persistence-oriented ones use save
  • 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 a

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars2.2k
CategoryDevelopment
Updated2mo ago
Forks228

Languages

Shell

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions