Creator · wondelai
Last updated · Sep 3, 2026
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
Creator · wondelai
Last updated · Sep 3, 2026
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
Creator · wondelai
Last updated · Sep 3, 2026
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
Creator · wondelai
Last updated · Sep 3, 2026
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
Sandbox only
Install targets
Codex install prompt
Install the "domain-driven-design" agent skill from https://github.com/wondelai/skills/tree/main/domain-driven-design. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"wondelai-domain-driven-design","task":"Install domain-driven-design","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Database and SQL
I need my agent to inspect database schemas, write SQL, and explain query results.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add wondelai/skills --skill domain-driven-design
Maintenance
fresh
7d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
2.1K
80/100 Quality · 75/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
2.1K GitHub stars
Repo activity
2.1K stars, 215 forks
Maintenance
7d since push
License
MIT
Install
npx skills add wondelai/skills --skill domain-driven-design
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add wondelai/skills --skill domain-driven-designDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/wondelai-domain-driven-design/install
Agent should check
Copy prompt
Task: Use domain-driven-design in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install
Install command: npx skills add wondelai/skills --skill domain-driven-design
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/wondelai-domain-driven-design/install
LLM text format
/api/skills/wondelai-domain-driven-design/install?format=text
Find alternatives
/api/skills/search?q=domain-driven-design&limit=3
Agent prompt
Use domain-driven-design for this task. Review https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install, then install with: npx skills add wondelai/skills --skill domain-driven-designRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/wondelai-domain-driven-design
LLM text
/api/registry/manifest/wondelai-domain-driven-design?format=text
Install alias
/api/registry/install/wondelai-domain-driven-design
Recommend
/api/registry/recommend?task=Use%20domain-driven-design%20in%20an%20agent%20workflow&limit=3
Agent fit
Database and SQL
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Database and SQL
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS2.1K GitHub stars
Stars/forks activity
INFO2.1K stars, 215 forks; issue activity unavailable in current metadata
Recent maintenance
PASS7d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Work with data stores
I need my agent to inspect database schemas, write SQL, and explain query results.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- 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](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](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](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](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](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
Source provenance
Decision snapshot
2,089 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for domain-driven-design, ready for a manual X post.
domain-driven-design: Model software around the business domain using bounded contexts, aggregates, and ubiquitous... 2.1K stars https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x
Listing + install path for domain-driven-design: https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x Install: npx skills add wondelai/skills --skill domain-driven-design
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to wondelai but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design/audit)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)wondelai
@wondelai
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsSandbox only
Install targets
Codex install prompt
Install the "domain-driven-design" agent skill from https://github.com/wondelai/skills/tree/main/domain-driven-design. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"wondelai-domain-driven-design","task":"Install domain-driven-design","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Database and SQL
I need my agent to inspect database schemas, write SQL, and explain query results.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add wondelai/skills --skill domain-driven-design
Maintenance
fresh
7d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
2.1K
80/100 Quality · 75/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
2.1K GitHub stars
Repo activity
2.1K stars, 215 forks
Maintenance
7d since push
License
MIT
Install
npx skills add wondelai/skills --skill domain-driven-design
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add wondelai/skills --skill domain-driven-designDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/wondelai-domain-driven-design/install
Agent should check
Copy prompt
Task: Use domain-driven-design in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install
Install command: npx skills add wondelai/skills --skill domain-driven-design
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/wondelai-domain-driven-design/install
LLM text format
/api/skills/wondelai-domain-driven-design/install?format=text
Find alternatives
/api/skills/search?q=domain-driven-design&limit=3
Agent prompt
Use domain-driven-design for this task. Review https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install, then install with: npx skills add wondelai/skills --skill domain-driven-designRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/wondelai-domain-driven-design
LLM text
/api/registry/manifest/wondelai-domain-driven-design?format=text
Install alias
/api/registry/install/wondelai-domain-driven-design
Recommend
/api/registry/recommend?task=Use%20domain-driven-design%20in%20an%20agent%20workflow&limit=3
Agent fit
Database and SQL
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Database and SQL
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS2.1K GitHub stars
Stars/forks activity
INFO2.1K stars, 215 forks; issue activity unavailable in current metadata
Recent maintenance
PASS7d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Work with data stores
I need my agent to inspect database schemas, write SQL, and explain query results.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- 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](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](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](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](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](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
Source provenance
Decision snapshot
2,089 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for domain-driven-design, ready for a manual X post.
domain-driven-design: Model software around the business domain using bounded contexts, aggregates, and ubiquitous... 2.1K stars https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x
Listing + install path for domain-driven-design: https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x Install: npx skills add wondelai/skills --skill domain-driven-design
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to wondelai but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design/audit)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)wondelai
@wondelai
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsSandbox only
Install targets
Codex install prompt
Install the "domain-driven-design" agent skill from https://github.com/wondelai/skills/tree/main/domain-driven-design. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"wondelai-domain-driven-design","task":"Install domain-driven-design","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Database and SQL
I need my agent to inspect database schemas, write SQL, and explain query results.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add wondelai/skills --skill domain-driven-design
Maintenance
fresh
7d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
2.1K
80/100 Quality · 75/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
2.1K GitHub stars
Repo activity
2.1K stars, 215 forks
Maintenance
7d since push
License
MIT
Install
npx skills add wondelai/skills --skill domain-driven-design
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add wondelai/skills --skill domain-driven-designDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/wondelai-domain-driven-design/install
Agent should check
Copy prompt
Task: Use domain-driven-design in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install
Install command: npx skills add wondelai/skills --skill domain-driven-design
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/wondelai-domain-driven-design/install
LLM text format
/api/skills/wondelai-domain-driven-design/install?format=text
Find alternatives
/api/skills/search?q=domain-driven-design&limit=3
Agent prompt
Use domain-driven-design for this task. Review https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install, then install with: npx skills add wondelai/skills --skill domain-driven-designRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/wondelai-domain-driven-design
LLM text
/api/registry/manifest/wondelai-domain-driven-design?format=text
Install alias
/api/registry/install/wondelai-domain-driven-design
Recommend
/api/registry/recommend?task=Use%20domain-driven-design%20in%20an%20agent%20workflow&limit=3
Agent fit
Database and SQL
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Database and SQL
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS2.1K GitHub stars
Stars/forks activity
INFO2.1K stars, 215 forks; issue activity unavailable in current metadata
Recent maintenance
PASS7d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Work with data stores
I need my agent to inspect database schemas, write SQL, and explain query results.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- 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](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](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](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](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](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
Source provenance
Decision snapshot
2,089 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for domain-driven-design, ready for a manual X post.
domain-driven-design: Model software around the business domain using bounded contexts, aggregates, and ubiquitous... 2.1K stars https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x
Listing + install path for domain-driven-design: https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x Install: npx skills add wondelai/skills --skill domain-driven-design
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to wondelai but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design/audit)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)wondelai
@wondelai
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsSandbox only
Install targets
Codex install prompt
Install the "domain-driven-design" agent skill from https://github.com/wondelai/skills/tree/main/domain-driven-design. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"wondelai-domain-driven-design","task":"Install domain-driven-design","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Database and SQL
I need my agent to inspect database schemas, write SQL, and explain query results.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add wondelai/skills --skill domain-driven-design
Maintenance
fresh
7d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
2.1K
80/100 Quality · 75/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
2.1K GitHub stars
Repo activity
2.1K stars, 215 forks
Maintenance
7d since push
License
MIT
Install
npx skills add wondelai/skills --skill domain-driven-design
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add wondelai/skills --skill domain-driven-designDo not use when
Alternative
174.6K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.6K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
1.8K Stars
npx skills add Alisa0808/vox-director --skill vox-director
Alternative
174.6K Stars
npx skills add anthropics/skills --skill canvas-design
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/wondelai-domain-driven-design/install
Agent should check
Copy prompt
Task: Use domain-driven-design in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20domain-driven-design%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install
Install command: npx skills add wondelai/skills --skill domain-driven-design
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/wondelai-domain-driven-design/install
LLM text format
/api/skills/wondelai-domain-driven-design/install?format=text
Find alternatives
/api/skills/search?q=domain-driven-design&limit=3
Agent prompt
Use domain-driven-design for this task. Review https://www.openagentskill.com/api/skills/wondelai-domain-driven-design/install, then install with: npx skills add wondelai/skills --skill domain-driven-designRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/wondelai-domain-driven-design
LLM text
/api/registry/manifest/wondelai-domain-driven-design?format=text
Install alias
/api/registry/install/wondelai-domain-driven-design
Recommend
/api/registry/recommend?task=Use%20domain-driven-design%20in%20an%20agent%20workflow&limit=3
Agent fit
Database and SQL
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Database and SQL
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS2.1K GitHub stars
Stars/forks activity
INFO2.1K stars, 215 forks; issue activity unavailable in current metadata
Recent maintenance
PASS7d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Work with data stores
I need my agent to inspect database schemas, write SQL, and explain query results.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
--- 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](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](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](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](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](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
Source provenance
Decision snapshot
2,089 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for domain-driven-design, ready for a manual X post.
domain-driven-design: Model software around the business domain using bounded contexts, aggregates, and ubiquitous... 2.1K stars https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x
Listing + install path for domain-driven-design: https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=x Install: npx skills add wondelai/skills --skill domain-driven-design
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to wondelai but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design/audit)
[](https://www.openagentskill.com/skills/wondelai-domain-driven-design?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)wondelai
@wondelai
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.6K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.6K StarsVox Director
Turn one topic into a narrated Vox-style paper-collage explainer or ad video, from script through captions.
1.8K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.6K StarsPermission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness