ddd-aggregate-modeling

ddd-aggregate-modeling is a skill for Claude Code, Codex from soulcodex/agentic. It costs 62 tokens per session (678 once invoked), scanned A, original, MIT.

A guide for designing domain models using domain-driven design, a way to structure software around the rules and concepts of a business area. It focuses on aggregate roots, child entities, value objects, invariants, and repository interfaces.

In plain words
What is it for?
It supports modeling or refactoring domain entities and aggregates, including boundaries, validation rules, snapshots, specifications, criteria, and repository contracts.
Why use it?
It helps decide which objects belong together, where business rules should be enforced, and what persistence code should expose.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Good fit It supports modeling or refactoring domain entities and aggregates, including boundaries, validation rules, snapshots, specifications, criteria, and repository contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/soulcodex/agentic/ddd-aggregate-modeling
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add soulcodex/agentic --skill ddd-aggregate-modeling
Clone the repo
git clone --depth 1 https://github.com/soulcodex/agentic

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ddd-aggregate-modeling

README.md
[![agentmods](https://agentmods.dev/badge/skills/soulcodex/agentic/ddd-aggregate-modeling/github.svg)](https://agentmods.dev/skills/soulcodex/agentic/ddd-aggregate-modeling)
Your own site
<a href="https://agentmods.dev/skills/soulcodex/agentic/ddd-aggregate-modeling"><img src="https://agentmods.dev/badge/skills/soulcodex/agentic/ddd-aggregate-modeling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ddd-aggregate-modeling

Your own site · 80×15
<a href="https://agentmods.dev/skills/soulcodex/agentic/ddd-aggregate-modeling"><img src="https://agentmods.dev/badge/skills/soulcodex/agentic/ddd-aggregate-modeling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 678 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.00678
Opus 5.5 $0.00025 $0.00271
Sonnet 5.5 $0.00012 $0.00136
Haiku 4.5 $0.00006 $0.00068

Measured 1mo ago against content hash f1dfe2c3aff6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ddd-aggregate-modeling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backend/ddd-aggregate-modeling/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DDD Aggregate Modeling Skill

Step 1 - Define Context and Ubiquitous Language

  1. Identify the bounded context owning the behavior.
  2. Name entities, value objects, and commands using domain language.
  3. Reject generic names (Manager, Helper, Data) unless they are domain terms.

Step 2 - Choose the Aggregate Root

  1. Pick one root that owns consistency for the invariant set.
  2. Ensure external callers reference only root IDs, not child internals.
  3. Keep the aggregate small; if many transactions touch disjoint invariants, split aggregates.

Step 3 - Classify Members Correctly

Use this decision table:

Case Model as
Needs identity inside aggregate lifecycle Child Entity
Structural equality only, immutable meaning Value Object
External persistence detail Adapter DTO / Row Model (not domain)

Value object categories to model explicitly:

  • constrained strings (Email, Name, VatId)
  • bounded numbers/ranges (Lanes, Port, Quantity)
  • enumerations (Language, Role, SystemType)

Step 4 - Encode Invariants in Domain Behavior

  1. Validate on constructor/factory and on every mutating method.
  2. Keep aggregate state private; expose intent methods (Create, Update, Delete, Verify).
  3. Guard temporal ordering when needed (ignore/reject stale updates deterministically).
  4. Keep authorization outside entities; enforce in application handlers.

Step 5 - Model Snapshot/Primitives Boundaries

  1. Add explicit primitives/snapshot structures for adapter boundaries.
  2. Use ToPrimitives/Snapshot and FromPrimitives/RestoreFromSnapshot.
  3. Do not pass transport or ORM models directly into domain behavior.
  4. Keep mapping explicit; avoid reflection-based generic mappers.

Step 6 - Define Repository and Collection Contracts

  1. Define repository interfaces in domain/application, implementations in infrastructure.
  2. Split reader/writer contracts when beneficial.
  3. Return aggregates or domain collections, not adapter structs.
  4. Add domain collections when query semantics have domain meaning.

Read the full file on GitHub · 84 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 84 lines · 62 tokens per session scan A f1dfe2c3aff6

Subscribe to this mod's changes

ddd-aggregate-modeling is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed yesterday), licensed MIT. It adds 62 tokens to every session and 678 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

domain-modeling

DDD practical guide: Event Storming, Bounded Contexts, Aggregates and domain-driven design patterns.

camilooscargbaptista/cto-toolkit · 24 tokens

write-microflows

Microflow syntax reference in MDL — every activity type, control flow, expressions, and the mistakes that fail mxcli check. Use before writing any CREATE MICROFLOW, and when debugging a microflow syntax error.

mendixlabs/mxcli · 49 tokens

database-connections

Connect a Mendix app to an external database over JDBC with the External Database Connector, and define the queries microflows run against it. Use when the app must read or write Oracle, PostgreSQL, MySQL or SQL Server directly from a microflow.

mendixlabs/mxcli · 55 tokens

java-actions

Create and call custom Java actions — extending Mendix with server-side Java, and invoking those actions from microflows in MDL. Use when logic needs a Java library, an algorithm microflows cannot express, or an integration only available in Java.

mendixlabs/mxcli · 52 tokens

json-structures-and-mappings

Create and manage JSON structures, import mappings and export mappings in MDL, plus the domain-model shapes they map onto. Use when turning a JSON payload into entities, mapping a REST or queue response, or exporting objects as JSON.

mendixlabs/mxcli · 53 tokens

rest-client

Call external REST APIs from Mendix — the three approaches (inline REST CALL, consumed REST client document, generated from OpenAPI) and how to choose. Use when integrating with any external REST API, or when a published REST service's custom-authentication microflow reads a token from a header or the query string.

mendixlabs/mxcli · 66 tokens