Domain-Driven Design Strategic Guide

VerifiedSafe

Strategic DDD guide for splitting the domain into bounded contexts, defining ubiquitous language, and mapping context boundaries. Tactical patterns follow Clean Architecture.

Sby Skills Guide Bot
DevelopmentIntermediate
8/11/2026
Claude Code
#ddd#bounded-contexts#domain-modeling#architecture#ubiquitous-language

Recommended for

Automated summary

A strategic DDD guide for splitting a domain into Bounded Contexts, defining the Ubiquitous Language, and drawing context boundaries, while tactical patterns are left to Clean Architecture.

Strengths

  • Draws a clear scope line: only strategic DDD (contexts, language, context mapping), with tactical patterns explicitly delegated to Clean Architecture.
  • States checkable communication rules between contexts: import through the public `index.ts` API, call exposed Use Cases, never import internal files or share mutable entities.
  • Gives concrete signals for spotting a new Bounded Context (a term meaning different things, diverging business rules, a model growing too complex) backed by a full splitting example.

Limitations

  • Assumes a specific project layout and convention (`modules/<context>/`, `.claude/roles/architect.md`) and uses TypeScript examples, so it does not transfer as-is to other setups.
  • Only covers direct public-API integration: nothing on asynchronous messaging, domain events, or service-to-service contracts.
  • Provides no automated boundary enforcement; compliance relies on human review.
When to use it

Use it before creating a new business module, or when the same domain term appears to mean different things across teams.

When not to use it

Not useful for deciding the internal structure of an already-delimited module, nor for infrastructure and deployment choices.

Security analysis

Safe
Quality score82/100

The skill is pure prose guidance on strategic DDD: no bash, no network, no file writes, no credential handling, and no obfuscated or destructive instructions. The only external dependency is reading a local role profile, which is a normal documentation convention and not an execution risk.

Findings
  • •References an external persona file `.claude/roles/architect.md` to be read and followed — benign local read, but it defers behavior to a file not included in the skill
How this analysis is made

Examples

New billing module
I need to add recurring billing to the project. Is it a new Bounded Context or part of an existing module? Propose the split and the ubiquitous language for it.
Disambiguate a shared term
The word 'review' is used differently by the dashboard team and the tracking team. Help me clarify the ubiquitous language and the context boundaries between modules/review and modules/dashboard.
Audit cross-context imports
Check that modules/review only imports from the public API of modules/tracking, and list any forbidden internal imports you find.

name: ddd description: Strategic DDD guide for this project. Use to split the domain into bounded contexts, define ubiquitous language, create new business modules, or analyze context boundaries. Tactical patterns follow Clean Architecture (see architecture skill).

Domain-Driven Design - Strategic Guide

Persona

Read .claude/roles/architect.md — adopt this profile and follow all its rules.

Activation

This skill activates for high-level domain decisions:

  • Splitting into Bounded Contexts
  • Defining the Ubiquitous Language
  • Creating a new business module
  • Analyzing relationships between contexts

Important clarification

Clean Architecture definitions take precedence over DDD tactical definitions.

We use DDD only at the strategic level (domain splitting, language). Tactical patterns (Entities, Use Cases, Gateways, Presenters) follow Clean Architecture.

| What we take from DDD | What we do NOT take | |------------------------|---------------------| | Bounded Contexts | Aggregates | | Ubiquitous Language | Repositories (we have Gateways) | | Context Mapping | Domain Events | | Module splitting | Complex Value Objects |


Bounded Context

"A Bounded Context delimits the applicability of a particular model." — Eric Evans

A Bounded Context = a module in modules/<context-name>/

Each BC is an autonomous package with its own public API.

Identifying a Bounded Context

Signs that a new BC is needed:

  • The same term has different meanings depending on context
  • A different team could manage this part
  • The model is becoming too complex
  • Business rules are diverging

ReviewFlow example:

| Bounded Context | Responsibility | |-----------------|----------------| | review | Code review orchestration and result handling | | tracking | MR/PR assignment tracking and follow-up | | webhook | Inbound webhook processing (GitLab/GitHub) | | mcp | Model Context Protocol server and tools | | dashboard | Review statistics and visualization | | security | Secret detection and access control |


Communication between Bounded Contexts

BCs communicate via their public APIs, like two independent packages.

// modules/tracking/index.ts (public API)
export { TrackAssignmentUseCase } from "./application/usecases/trackAssignment.usecase"
export { createTrackedMr } from "./domain/factories/trackedMrFactory"
export type { TrackingGateway } from "./application/ports/gateways/trackingGateway"

// modules/review/ imports from the public API
import { TrackAssignmentUseCase } from "@/modules/tracking"

Communication rules

| Allowed | Forbidden | |---------|-----------| | Import from another BC's index.ts | Directly import an internal file | | Pass data (DTO, primitives) | Share mutable entities | | Call an exposed Use Case | Access internal state |

Concrete example

// modules/review/application/usecases/triggerReview.usecase.ts
import { TrackAssignmentUseCase } from "@/modules/tracking"  // Public API

export const triggerReview = async (data) => {
  const trackAssignment = new TrackAssignmentUseCase(trackingGateway);
  // ...
}
// FORBIDDEN - internal import
import { parseTrackingData } from "@/modules/tracking/domain/validators/trackingValidator"

Ubiquitous Language

"Use the model as the backbone of a language." — Eric Evans

Business vocabulary must be:

  • Consistent: same term = same concept within a given context
  • Explicit: no ambiguity
  • Shared: understood by devs AND business stakeholders

In code

// Ubiquitous Language respected
class ReviewContext { ... }
class TrackedMr { ... }
function triggerReview() { ... }
function trackAssignment() { ... }

// Technical or ambiguous vocabulary
class Data { ... }           // "Data" is not a business term
class ReviewRequest { }      // "Request" vs "ReviewContext"?
function doReview() { }      // "do" vs "trigger"?

Language documentation

Each BC maintains its glossary in /docs/business/glossary/<context>.md

# Glossary - Review

| Term | Definition |
|------|------------|
| ReviewContext | The full context for a code review (diff, MR metadata, threads) |
| TrackedMr | A merge request being tracked for review assignments |
| ReviewAction | An action to perform on the platform (comment, resolve, reply) |
| DiffMetadata | Parsed metadata from a merge request diff |

Workflow: Creating a new Bounded Context

Step 1: Identify the domain

DDD - Identification

New domain identified: [name]

Questions to validate:
1. What business problem does it solve?
2. What are the specific terms?
3. What are the main entities?
4. Which existing BCs will use it?

Shall we explore these questions?

Step 2: Define the language

DDD - Ubiquitous Language

Proposed glossary for [context]:

| Term | Definition |
|------|------------|
| ... | ... |

Are these terms aligned with the business vocabulary?

Step 3: Define the public API

DDD - Public API

Planned exports for [context]:

Entities: [list]
Use Cases: [list]
Types: [list]

Which other BCs will consume this API?

Step 4: Create the structure

DDD - Structure

I will create:
modules/[context]/
├── index.ts           # Public API
├── entities/
├── use-cases/
├── interface-adapters/
└── testing/

+ Glossary: docs/business/glossary/[context].md

Shall we create this structure?

After validation -> Switch to the Architecture skill for tactical details.


Anti-patterns to avoid

  • A single catch-all "domain" module
  • Mixing vocabulary from multiple contexts
  • Circular dependencies between contexts
  • Importing internal files from another BC
  • Naming modules by technical aspect ("services", "models")

References

  • Domain-Driven Design (Eric Evans, 2003) - Chapters 1-4 (strategic)
  • For tactical patterns -> see architecture skill (Clean Architecture)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/domain-driven-design-strategic-guide-mso6xfhv/download' --output '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md.part' && mv '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md.part' '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md' && test -s '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ddd' && cp -R '.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv' '.claude/skills/ddd'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/domain-driven-design-strategic-guide-mso6xfhv'

openskills read 'domain-driven-design-strategic-guide-mso6xfhv'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/domain-driven-design-strategic-guide-mso6xfhv/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills