domain-driven-design

domain-driven-design is a skill for Claude Code from martineserios/thebrana. It costs 57 tokens per session (1,620 once invoked), scanned A, original, MIT.

A software design approach for modeling complicated business rules with clear concepts and boundaries. It uses named building blocks such as entities, value objects, aggregates, repositories, and bounded contexts.

In plain words
What is it for?
Use it when building rich domain models, protecting business rules, separating parts of a large system, and choosing Python or TypeScript structures for those models.
Why use it?
It helps keep business logic understandable and separate from technical details such as databases or user interfaces.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter; mentions Claude Code; installed under .agents/ (shared by several agents).

Good fit Use it when building rich domain models, protecting business rules, separating parts of a large system, and choosing Python or TypeScript structures for those models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/martineserios/thebrana/domain-driven-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add martineserios/thebrana --skill domain-driven-design
Clone the repo
git clone --depth 1 https://github.com/martineserios/thebrana

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for domain-driven-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/martineserios/thebrana/domain-driven-design/github.svg)](https://agentmods.dev/skills/martineserios/thebrana/domain-driven-design)
Your own site
<a href="https://agentmods.dev/skills/martineserios/thebrana/domain-driven-design"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/domain-driven-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for domain-driven-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/martineserios/thebrana/domain-driven-design"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/domain-driven-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,620 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01620
Opus 5 $0.00028 $0.00810
Sonnet 5 $0.00011 $0.00324
Haiku 4.5 $0.00006 $0.00162

Measured 10d ago against content hash 535229fb8892, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

domain-driven-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/entity-template.py, scripts/repository-template.py, scripts/value-object-template.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/domain-driven-design/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Domain-Driven Design Tactical Patterns

Model complex business domains with entities, value objects, and bounded contexts.

Overview

  • Modeling complex business logic
  • Separating domain from infrastructure
  • Establishing clear boundaries between subdomains
  • Building rich domain models with behavior
  • Implementing ubiquitous language in code

Building Blocks Overview

┌─────────────────────────────────────────────────────────────┐
│                    DDD Building Blocks                       │
├─────────────────────────────────────────────────────────────┤
│  ENTITIES           VALUE OBJECTS        AGGREGATES         │
│  Order (has ID)     Money (no ID)        [Order]→Items      │
│                                                              │
│  DOMAIN SERVICES    REPOSITORIES         DOMAIN EVENTS      │
│  PricingService     IOrderRepository     OrderSubmitted     │
│                                                              │
│  FACTORIES          SPECIFICATIONS       MODULES            │
│  OrderFactory       OverdueOrderSpec     orders/, payments/ │
└─────────────────────────────────────────────────────────────┘

Quick Reference

Entity (Has Identity)

from dataclasses import dataclass, field
from uuid import UUID
from uuid_utils import uuid7

@dataclass
class Order:
    """Entity: Has identity, mutable state, lifecycle."""
    id: UUID = field(default_factory=uuid7)
    customer_id: UUID = field(default=None)
    status: str = "draft"

    def __eq__(self, other: object) -> bool:
        if not isinstance(other, Order):
            return NotImplemented
        return self.id == other.id  # Identity equality

    def __hash__(self) -> int:
        return hash(self.id)

Load Read("${CLAUDE_SKILL_DIR}/references/entities-value-objects.md") for complete patterns.

Value Object (Immutable)

from dataclasses import dataclass
from decimal import Decimal

@dataclass(frozen=True)  # MUST be frozen!
class Money:
    """Value Object: Defined by attributes, not identity."""
    amount: Decimal
    currency: str

    def __add__(self, other: "Money") -> "Money":
        if self.currency != other.currency:
            raise ValueError("Cannot add different currencies")
        return Money(self.amount + other.amount, self.currency)

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 194 lines · 57 tokens per session scan A 535229fb8892

Subscribe to this mod's changes

domain-driven-design is a skill published in the GitHub repository martineserios/thebrana (3 stars, last pushed yesterday), licensed MIT. It adds 57 tokens to every session and 1,620 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

domain-driven-design

DDD tactical patterns for complex business modeling including entities, value objects, aggregates, domain services, repositories, specifications, and bounded contexts. Python dataclass implementations with TypeScript alternatives. Use when building rich domain models, enforcing invariants, or separating domain logic…

yonatangross/orchestkit · 57 tokens

python-patterns

Python backend patterns: layered architecture, async I/O, dependency injection, repository/service separation. TRIGGER when: creating routes, models, schemas, or services in a Python backend. SKIP: REST contract design (use api-design); schema/index tuning (use database-optimization). (Examples: FastAPI + SQLAlchemy +…

komluk/scaffolding · 73 tokens

modelcontextprotocol-python-sdk-context

Answers questions about the official Model Context Protocol (MCP) Python SDK (mcp package on PyPI, modelcontextprotocol/python-sdk on GitHub). Tracks the main branch (v2 pre-alpha — MCPServer/snakecase/constructor-on handlers). Use when working with MCP servers or clients in Python, debugging v1→v2 migrations, or…

nick-railsback/skill-engine · 116 tokens

python-best-practices

Python coding best practices. Use when writing or reviewing Python code. Covers type hints, error handling, and common patterns.

Taoidle/plan-cascade · 30 tokens

python-syntax-tutor

A Python syntax tutor that explains unfamiliar language features in the code where they appear. Python is a programming language; examples include decorators, async code, generators, and type hints.

SWHee/diffscope · 238 tokens

python-quality

A Python quality-check workflow using tests, type checking, linting, formatting, and import sorting. Type checking verifies that values are used with the expected kinds, while linting finds common code problems.

morodomi/dev-crew · 47 tokens