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.
npx agentmods add skills/soulcodex/agentic/ddd-aggregate-modelingnpx skills add soulcodex/agentic --skill ddd-aggregate-modelinggit clone --depth 1 https://github.com/soulcodex/agenticWrote 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.
[](https://agentmods.dev/skills/soulcodex/agentic/ddd-aggregate-modeling)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00062 | $0.00678 |
| Opus 5 | $0.00031 | $0.00339 |
| Sonnet 5 | $0.00012 | $0.00136 |
| Haiku 4.5 | $0.00006 | $0.00068 |
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 3d 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.
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
- Identify the bounded context owning the behavior.
- Name entities, value objects, and commands using domain language.
- Reject generic names (
Manager,Helper,Data) unless they are domain terms.
Step 2 - Choose the Aggregate Root
- Pick one root that owns consistency for the invariant set.
- Ensure external callers reference only root IDs, not child internals.
- 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
- Validate on constructor/factory and on every mutating method.
- Keep aggregate state private; expose intent methods (
Create,Update,Delete,Verify). - Guard temporal ordering when needed (ignore/reject stale updates deterministically).
- Keep authorization outside entities; enforce in application handlers.
Step 5 - Model Snapshot/Primitives Boundaries
- Add explicit primitives/snapshot structures for adapter boundaries.
- Use
ToPrimitives/SnapshotandFromPrimitives/RestoreFromSnapshot. - Do not pass transport or ORM models directly into domain behavior.
- Keep mapping explicit; avoid reflection-based generic mappers.
Step 6 - Define Repository and Collection Contracts
- Define repository interfaces in domain/application, implementations in infrastructure.
- Split reader/writer contracts when beneficial.
- Return aggregates or domain collections, not adapter structs.
- Add domain collections when query semantics have domain meaning.
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.
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.
- 3d ago First seen · 84 lines · 62 tokens per session scan A f1dfe2c3aff6
ddd-aggregate-modeling is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 678 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
domain-modeling
DDD practical guide: Event Storming, Bounded Contexts, Aggregates and domain-driven design patterns.
improve-codebase-architecture
Use when surfacing architectural friction inside a single EVOKORE bounded context and proposing deepening refactors (shallow modules, leaky seams, low locality) that turn shallow modules into deep ones — informed by ADR-0005 bounded contexts and the project's domain language.
ddd
领域驱动设计(DDD)建模与架构指导。用于创建领域模型、设计限界上下文、实现聚合根、实体、值对象、领域服务和领域事件。支持战略设计(上下文映射、子域划分)和战术设计(聚合、仓储、工厂模式)。当用户需要进行领域建模、微服务划分、复杂业务逻辑设计时使用。.
design-impact-reporting
Communicate design's contribution to business and user outcomes in stakeholder language. Use when reporting results upward. For choosing the metrics in the first place, use metrics-definition (ux-strategy).
research-repository
Build a repository that makes findings findable, reusable, and cumulative across teams. Use when the same research keeps getting redone. For synthesising one study, use affinity-diagram.
survey-design
Design unbiased survey instruments — question wording, scales, and sampling — to measure attitudes at scale. Use when you need quantitative breadth. For behavioural experiments, use a-b-test-design (prototyping-testing).