SKILL

ddd-best-practices

Domain-Driven Design guidance for modeling complex domains. Use when designing Bounded Contexts or Subdomains, discovering Aggregate boundaries from invariants and transactions, defining Aggregate Roots, designing Domain Events, typed domain failures, or repository contracts, choosing exception vs Result/Either/Option semantics, choosing Repository vs DAO/query service/gateway, splitting oversized Aggregates, coordinating cross-Aggregate consistency, applying Context Mapping patterns, implementing CQRS or Event Sourcing, building a Ubiquitous Language, applying Hexagonal Architecture, or reviewing layer ownership.

Target: Design & content creation. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • DDD Best Practices
  • Working Style
  • Design Workflow
  • Heuristics
  • Bounded Context
  • Aggregate
  • Entity vs Value Object
  • Domain Service

Use this skill when the main question is how to model a domain, where to draw boundaries, or how to structure collaboration between subdomains. 1. Start from the domain problem, not from technical constructs. 2. Build a Ubiquitous Language before writing any code. 3. Keep Aggregates small — consistency boundary, not convenience grouping. 4. Prefer Value Objects when a domain concept has value semantics, not as a blanket wrapper for every primitive. 5. Let Domain Events tell the story of what happened, not what to do next. 6. Never let infrastructure concerns leak into the domain model. 1. Discover the domain. Who are the domain experts? What language do they use? What are the core subdomains (Core, Supporting, Generic)? Where does the most complex business logic live? 2. Draw Bounded Contexts. One model per context — resist the urge to share models across contexts. Name each context after a team or capability, not a technical layer. Define context relationships explicitly (Partnership, Customer-Supplier, Anti-Corruption Layer, etc.). 3. Design Aggregates. Start from one business command and state the invariants it must preserve. Include only state that must commit or reject atomica

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
OKHP3/skillz
Source file
community/ddd-best-practices/SKILL.md
Fixed revision
7b187777d42ab7bc7bab1e5f2c940cd3139ecebf
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: OKHP3/skillz · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T10:00:54.154Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.