Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

architecture-paradigm-domain-driven

БесплатноБез исполняемых скриптовНе проверен

Models a business in its own language

atholaот athola285 установок в других каталогах

Об этом скилле

Night Market Skill: ported from claude-night-market/archetypes. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

The Domain-Driven Design Paradigm

Design for the future, build for now.

DDD is modeling a business in the business's own language. The goal is not to avoid structure. It is to avoid structure you cannot back out of, and to defer structure you do not yet need.

What DDD Is

Ubiquitous language, bounded contexts, and a model built by talking to the people who do the work. The measure of a domain model is whether a person in the business would recognize their own job in it.

What DDD Is Not

Clean Architecture. Mandatory layering. A mapper between every tier. A count of design patterns applied before the first line of business logic is written.

These are DDD-adjacent choices. Each has its own justification, and none of them is entailed by DDD. Wanting to decouple an API from the domain is a good reason to add a DTO. "This is what DDD requires" is not, because it does not.

Strategic Design Is The Core

The building blocks are not the point, and this is not the repo's opinion. Evans said so himself, ten years after the book, about the book:

"things like the entities and value objects [..] [People] come away thinking that that's really the core of DDD, whereas, in fact, it's really not."

"I really think that the way I arranged the book gives people the wrong emphasis, so that's the biggest part of what I do is rearrange those things."

Source: SE-Radio Episode 226, "Eric Evans on Domain-Driven Design at 10 Years" (video). Quotes as transcribed by The Core of Domain-Driven Design, which also cites his DDD Europe 2016 keynote criticizing the "over-emphasis on building blocks."

What the core actually is: discovering subdomains and drawing bounded contexts, in language the business already speaks. Entities, value objects, and aggregates are how a model reaches code once it exists. They are the translation, not the thing being translated.

Read the rest of this skill in that light. Every mechanism below is optional machinery serving a model you found by talking to people.

When To Use

  • The domain has business rules a domain expert could argue about.
  • The team can talk to the people who do the work being modeled.
  • The system is expected to grow into complexity you cannot yet name.

When NOT To Use

  • Domains with no meaningful business rules (CRUD over a form).
  • Single-actor tools with no business vocabulary to share.
  • Anything where the model would be a database schema with a new name.

Build For Now

Once a domain exists, create the data store and one concrete data object. Pass that object from the repository into the business layer. At the start of a project, pass it out to the view as well.

That is a legitimate starting state, not technical debt. One object moving through every layer is the cheapest thing that can work, and it is the shape the divergence protocol below is designed to split.

The Divergence Protocol

The DTO arrives at the moment of divergence, not in anticipation of it.

Trigger: the view's response shape must hold for contract reasons while the domain model needs to change.

Move: the old data object becomes the view DTO. The new domain object gains a translation into it. Where fields differ, a copy constructor maps them, in either direction as needed.

That is the whole mechanism. It works because the starting state (one shared object) is the same shape as the ending state's DTO, so the split costs one rename and one translation function. This is why "we might need a DTO later" is not a reason to build one now: later is cheap.

Shared-Type Options When Shapes Overlap

Ordered by cost:

  1. Same type in every layer. The default. If the objects look the same everywhere, use the same object.
  2. Builder, when different contexts select different subsets of one fixed field set.
  3. Shared base class with per-context subclasses (entity, DTO, domain object, JSON representation). Each context adds its own fields on top of a shared core. This reduces duplication when several contexts genuinely share that core.

Option 3 carries a cost worth stating plainly: inheritance couples the layers. Changing the base changes every context at once, which is the opposite of the flexibility the divergence protocol buys. It also feeds straight into the boundary hazard below. Reach for it when duplication is the larger present pain, and reach for it knowing what it trades away.

The IO Boundary Rule

Do not reuse a data type across a network or other IO boundary without validating that you are not sharing something you should not.

This is the one non-negotiable constraint in

Полный SKILL.md на ClawHub

Установить architecture-paradigm-domain-driven в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл architecture-paradigm-domain-driven?

Models a business in its own language

Как установить скилл architecture-paradigm-domain-driven?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл architecture-paradigm-domain-driven запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить architecture-paradigm-domain-driven с