ddd-tactical-patterns
What it does
This tool helps organize your program's code by following design principles called 'DDD Tactical Patterns'. It focuses on how to structure the core parts of your program to make them easier to understand and maintain, especially when business rules are complex.
When to use it
- ✓When you need to translate business rules into code.
- ✓When deciding how to group different parts of your program.
- ✓When improving code that is confusing or lacks clear logic.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ddd-tactical-patterns/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Translate these business rules into code: [rules here]”
5 new skills a week. 1 minute to read.
How it works
The tool organizes your code into blocks called 'entities' and 'value objects', ensuring that important rules (invariants) are always respected. It also helps define how these blocks communicate and how to record significant changes.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
What are 'invariants'?
These are business rules that must always be true for a part of your program. For example, a bank account can never have a negative balance.
What are 'entities' and 'value objects'?
Entities are things with their own identity that change over time (like a 'User'). Value objects are things defined by their attributes, without their own identity (like an 'Address').
What are 'aggregates'?
These are groups of entities and value objects that work together and are treated as a single unit. They help maintain the consistency of business rules.
Details
Original description by the author
Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4348
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.