Skip to content
Skillpedia
APIs & servers (backend)48k · #4348

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.md

Copy 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

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ddd-tactical-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

  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 (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.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#4348
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills