Skip to content
Skillpedia
Misc48k · #2734

ddd-tactical-patterns

Helps your agent apply organization rules in code. It uses concepts like entities and events to ensure consistency.

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.

Example of what to ask your AI

“Translate these business rules into code: [rules here]”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ddd-tactical-patterns/SKILL.md

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

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill ddd-tactical-patterns

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/ddd-tactical-patterns/SKILL.md -o SKILL.md
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
#2734
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills