ddd-domain-model-first

ddd-domain-model-first is a skill for Claude Code, Codex from amadeus-dlc/amadeus. It costs 72 tokens per session (308 once invoked), scanned A, original, Apache-2.0.

A software development approach that models business rules first and tests them before adding databases, web frameworks, or other infrastructure. DDD means domain-driven design, which structures code around the real concepts and rules of a business; TDD means test-driven development, writing tests before implementation.

In plain words
What is it for?
Use it to design value objects, entities, aggregate roots, domain services, use cases, in-memory repositories, and application interfaces before connecting real persistence or delivery systems.
Why use it?
It keeps business behavior independent from technical tools, making it faster to test and reducing the risk that database or API details distort the model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design value objects, entities, aggregate roots, domain services, use cases, in-memory repositories, and application interfaces before connecting real persistence or delivery systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amadeus-dlc/amadeus/ddd-domain-model-first
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 amadeus-dlc/amadeus --skill ddd-domain-model-first
Clone the repo
git clone --depth 1 https://github.com/amadeus-dlc/amadeus

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-domain-model-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/amadeus-dlc/amadeus/ddd-domain-model-first/github.svg)](https://agentmods.dev/skills/amadeus-dlc/amadeus/ddd-domain-model-first)
Your own site
<a href="https://agentmods.dev/skills/amadeus-dlc/amadeus/ddd-domain-model-first"><img src="https://agentmods.dev/badge/skills/amadeus-dlc/amadeus/ddd-domain-model-first/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-domain-model-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/amadeus-dlc/amadeus/ddd-domain-model-first"><img src="https://agentmods.dev/badge/skills/amadeus-dlc/amadeus/ddd-domain-model-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 308 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.00072 $0.00308
Opus 5 $0.00036 $0.00154
Sonnet 5 $0.00014 $0.00062
Haiku 4.5 $0.00007 $0.00031

Measured 9d ago against content hash d5b2d8cc2881, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ddd-domain-model-first 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 9d 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.

amadeus/spaces/default/knowledge/amadeus-shared/software-design/ddd-domain-model-first/SKILL.md · 40 lines

What it actually says

Domain Model First Development

Start with domain behavior you can test without infrastructure. Add delivery and persistence after the model earns them.

Workflow

  1. Write domain examples as tests using ubiquitous language.

  2. Implement value objects, entities, aggregates, and domain services until the domain tests pass.

  3. Add in-memory repositories for use-case tests.

  4. Implement use cases as application orchestration over aggregate roots and ports.

  5. Add infrastructure adapters last and verify they satisfy the same port contracts.

Rules

  • Do not let ORM annotations or API DTOs define the domain model.

  • Use factories and constructors to protect invariants.

  • Keep repository interfaces at the application boundary, not inside aggregates.

  • Prefer fast tests until the domain behavior is stable.

Detailed Reference

For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.

Output

Return the implementation order, tests to write, domain API sketch, repository contract, and adapter plan.

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. 9d ago First seen · 40 lines · 72 tokens per session scan A d5b2d8cc2881

Subscribe to this mod's changes

ddd-domain-model-first is a skill published in the GitHub repository amadeus-dlc/amadeus (8 stars, last pushed 19d ago), licensed Apache-2.0. It adds 72 tokens to every session and 308 once invoked, about $0.0004 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.