Skip to content
Skillv1.0.0

ddd-tactical-patterns

Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants.

by aiskillstore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from aiskillstore/marketplace (skills/sickn33/ddd-tactical-patterns/SKILL.md). Install upstream with npx skills add aiskillstore/marketplace --skill ddd-tactical-patterns. Copyright stays with the author.

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.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/aiskillstore-marketplace-ddd-tactical-patterns/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

aiskillstore-marketplace-ddd-tactical-patterns.ocm.jsonjson
{
  "ocm": "1",
  "id": "aiskillstore-marketplace-ddd-tactical-patterns",
  "kind": "skill",
  "name": "ddd-tactical-patterns",
  "description": "Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants.",
  "publisher": "aiskillstore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "ddd",
      "tactical",
      "aggregates",
      "value-objects",
      "domain-events",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/aiskillstore/marketplace",
      "path": "skills/sickn33/ddd-tactical-patterns/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/aiskillstore/marketplace/blob/HEAD/skills/sickn33/ddd-tactical-patterns/SKILL.md",
      "key": "aiskillstore/marketplace/skills/sickn33/ddd-tactical-patterns/SKILL.md"
    }
  },
  "instructions": "# DDD Tactical Patterns\n\n## Use this skill when\n\n- Translating domain rules into code structures.\n- Designing aggregate boundaries and invariants.\n- Refactoring an anemic model into behavior-rich domain objects.\n- Defining repository contracts and domain event boundaries.\n\n## Do not use this skill when\n\n- You are still defining strategic boundaries.\n- The task is only API documentation or UI layout.\n- Full DDD complexity is not justified.\n\n## Instructions\n\n1. Identify invariants first and design aggregates around them.\n2. Model immutable value objects for validated concepts.\n3. Keep domain beh",
  "cost": {
    "context_tokens": 336
  }
}

Fetch it by URL: GET /api/v1/registry/aiskillstore-marketplace-ddd-tactical-patterns/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.