ddd-tactical-patterns
SKILL.md
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
- Identify invariants first and design aggregates around them.
- Model immutable value objects for validated concepts.
- Keep domain behavior in domain objects, not controllers.
- Emit domain events for meaningful state transitions.
- 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 (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.
Weekly Installs
35
Repository
sickn33/antigra…e-skillsGitHub Stars
21.0K
First Seen
Feb 20, 2026
Security Audits
Installed on
codex35
github-copilot34
kimi-cli34
gemini-cli34
amp34
cursor34