ddd-tactical-patterns – Coding skill for AI agents
Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants.
Install the ddd-tactical-patterns skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/ddd-tactical-patterns-4ef20.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /ddd-tactical-patterns – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/ddd-tactical-patterns-4ef20.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $ddd-tactical-patterns – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/ddd-tactical-patterns-4ef20.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /ddd-tactical-patterns – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/ddd-tactical-patterns-4ef20.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /ddd-tactical-patterns – then describe the task you want done.
SKILL.md content
DDD Tactical Patterns
Use this skill when
- Translating domain rules into code structures.
- Designing aggregate boundaries and invariants.
- Refactoring an anemic model into behavior-rich domain objects.
- Defining repository contracts and domain event boundaries.
Do not use this skill when
- You are still defining strategic boundaries.
- The task is only API documentation or UI layout.
- Full DDD complexity is not justified.
Instructions
1. Identify invariants first and design aggregates around them.
2. Model immutable value objects for validated concepts.
3. Keep domain behavior in domain objects, not controllers.
4. Emit domain events for meaningful state transitions.
5. Keep repositories at aggregate root boundaries.
If detailed checklists are needed, open references/tactical-checklist.md.
Example
class Order {
private status: "draft" | "submitted" = "draft";
submit(itemsCount: number): void {
if (!Number.isInteger(itemsCount) || itemsCount <= 0) throw new Error("Order cannot be submitted empty");
if (this.status !== "draft") throw new Error("Order already submitted");
this.status = "submitted";
}
}Limitations
- This skill does not define deployment architecture.
- It does not choose databases or transport protocols.
- It should be paired with testing patterns for invariant coverage.
Related skills
- monorepo-navigator – Navigate, manage, and optimize monorepos. Covers Turborepo, Nx, pnpm workspaces, and…
- debate-review – Two-model debate review of a GitHub PR, GitLab MR, Azure DevOps PR, or local working…
- debug-buttercup – All pods run in namespace crs. Use when pods in the crs namespace are in…
- debugger – Debugging specialist for errors, test failures, and unexpected behavior. Use proactively…
- debugging-and-error-recovery – Guides systematic root-cause debugging. Use when tests fail, builds break, behavior…
- debugging-code – Interactively debug source code — set breakpoints, step through execution line by line…
- debugging-strategies – Transform debugging from frustrating guesswork into systematic problem-solving with…
- debugging-toolkit – Use when working with debugging toolkit smart debug (Alias for…