ddd-modeling

Decomposes features into bounded contexts and aggregates using strategic and tactical DDD.

4|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/gabriellst/codm --skill ddd-modeling-gabriellst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-modeling
Source: https://github.com/gabriellst/codm/tree/main/.claude/skills/ddd-modeling
Command: npx skills add https://github.com/gabriellst/codm --skill ddd-modeling-gabriellst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a feature introduces new entities, teams often struggle to decide where domain boundaries lie, resulting in god-contexts, bloated aggregates, or over-modeled value objects. This Skill provides a structured method for decomposing a feature into bounded contexts and aggregates using Domain-Driven Design principles. ## Core Features & Use Cases - Strategic Context Discovery: Extracts candidate entities from user stories, groups them by language boundary, and analyzes lifecycles and consistency boundaries to produce a context map with relationship types (Shared Kernel, Customer-Supplier, Conformist, Anti-Corruption Layer). - Tactical Aggregate Design: Enforces aggregate rules such as one root per consistency boundary, cross-aggregate references by ID only, and keeping junction tables out of the domain model, with TypeScript/Zod code templates. - Split Heuristics and Anti-Patterns: Provides measurable thresholds for splitting contexts and worked examples of god-context and over-modeling traps, plus a bad-practices section covering god aggregates and direct cross-aggregate references. - Use Case: When planning a Kanban feature with Board and Card entities, use this Skill to determine they belong in two separate contexts due to different lifecycles and invariants, rather than one catch-all kanban context. ## Quick Start Ask the AI to apply the ddd-modeling skill to decompose your feature's user stories into bounded contexts and aggregate boundaries before implementation.

Frequently Asked Questions about ddd-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide bounded contexts for a new feature?

Extract nouns from user stories as candidate entities, group them by shared ubiquitous language, then analyze lifecycles and consistency boundaries. Groups with no shared invariants and different lifecycles become separate contexts, documented in a context map with relationship types.

How to design aggregate boundaries in DDD?

Assign one aggregate root per consistency boundary, compose children as value objects or ID arrays, and reference other aggregates by ID only. Keep aggregates small and prefer eventual consistency between them rather than large transactional clusters.

When should I split a bounded context?

Split when a context exceeds roughly five entities or ten use cases, when entity groups share no invariants, or when they have different lifecycles, rates of change, or team ownership. Do not split entities that share transactional invariants.

What is the difference between a value object and an aggregate?

A value object has no independent lifecycle, no invariants of its own, and is only accessed through its parent, so it gets no repository, controller, or events. Promote a concept to its own aggregate only when it changes on its own timeline and enforces its own rules.

When should I not use DDD modeling?

Skip this process for frontend-only changes or backend changes unrelated to entity operations. It is designed for features introducing new entities or new domain areas, not for simple CRUD or presentation-layer work.