AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Domain Driven Design

skill-mb-mal-claudecode-dev-skills-domain-driven-design · by mb-mal

Design software architecture around business domain models. Use when starting a new project, creating module structure, defining entities and their relationships, or when the user mentions DDD, domain model, bounded context, aggregates, or business logic architecture.

No reviews yet
0 installs
34 views
0.0% view→install

Install

$ agentstack add skill-mb-mal-claudecode-dev-skills-domain-driven-design

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-mb-mal-claudecode-dev-skills-domain-driven-design)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
8mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Domain Driven Design? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Domain-Driven Design

Apply DDD principles to create architecture that reflects business reality.

Workflow

  1. Gather domain context: Ask the user to describe key business entities, their relationships, and core business rules
  2. Define bounded contexts: Identify distinct subdomains and their boundaries
  3. Model entities and value objects: Create domain classes that encapsulate business logic
  4. Establish aggregates: Group related entities with clear aggregate roots
  5. Generate project structure: Create directories and files reflecting the domain model

Prompting for context

When user provides incomplete domain information, ask:

  • What are the main entities in your domain? (e.g., Order, Customer, Product)
  • What states or statuses do these entities have?
  • What business rules govern transitions between states?
  • How do entities relate to each other?

Output structure

src/
├── domain/
│   ├── entities/
│   │   └── [entity_name].py
│   ├── value_objects/
│   │   └── [value_object_name].py
│   ├── aggregates/
│   │   └── [aggregate_name].py
│   └── services/
│       └── [domain_service].py
├── application/
│   └── use_cases/
└── infrastructure/
    └── repositories/

Example prompt

User: "Create architecture for an e-commerce system"

Response approach:

  1. Ask about key entities (Order, Customer, Product, Cart)
  2. Clarify business rules (order lifecycle, inventory management)
  3. Generate domain model with entities, value objects, and services
  4. Create project structure reflecting bounded contexts

Entity template

from dataclasses import dataclass
from enum import Enum
from typing import List
from datetime import datetime

class OrderStatus(Enum):
    DRAFT = "draft"
    CONFIRMED = "confirmed"
    SHIPPED = "shipped"
    DELIVERED = "delivered"

@dataclass
class Order:
    id: str
    customer_id: str
    items: List["OrderItem"]
    status: OrderStatus
    created_at: datetime
    
    def confirm(self) -> None:
        if self.status != OrderStatus.DRAFT:
            raise ValueError("Only draft orders can be confirmed")
        if not self.items:
            raise ValueError("Cannot confirm empty order")
        self.status = OrderStatus.CONFIRMED
    
    def ship(self) -> None:
        if self.status != OrderStatus.CONFIRMED:
            raise ValueError("Only confirmed orders can be shipped")
        self.status = OrderStatus.SHIPPED

Key principles

  • Ubiquitous language: Use business terms in code (not technical jargon)
  • Rich domain model: Entities contain business logic, not just data
  • Aggregate boundaries: Protect invariants within aggregate roots
  • Domain events: Capture significant business occurrences

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.