Command Palette

Search for a command to run...

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

dotnet-ddd

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

Domain-Driven Design best practices for .NET 10 domain code. Use when creating or reviewing entities, value objects, aggregates, aggregate roots…

fmflurryот fmflurry★ 173 звезды на GitHub

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

dotnet-ddd

Domain-Driven Design guidance for .NET domain code. Makes DDD principles explicit and enforceable for the coder and code-reviewer agents.

When to Activate

  • Creating or modifying domain models (entities, value objects, aggregates)
  • Adding repositories, factories, or domain services
  • Defining or refactoring bounded contexts
  • Reviewing domain code for DDD compliance
  • Refactoring anemic models toward rich behavior
  • Enforcing aggregate invariants or encapsulation rules

Provenance

Content is synthesized from established DDD literature:

  • Eric Evans, Domain-Driven Design: Tackling Complexity in the Heart of Software (2003) — "Blue Book"
  • Vaughn Vernon, Implementing Domain-Driven Design (2013) — "Red Book"
  • Microsoft .NET Architecture guidance (eShop, microservices e-book, CQRS docs)
  • Martin Fowler, bliki articles on Anemic Domain Model, Domain Event, etc.

This is a practitioner synthesis, not a verbatim reproduction. Where sources disagree, the Red Book's pragmatic guidance takes precedence for implementation details.

Core Principles

  1. The domain model is the software. Business logic lives in domain objects, not in services or controllers. (Evans, ch. 1)
  2. Ubiquitous Language. Code names match the domain expert's vocabulary. No translation layer between business and code. (Evans, ch. 2) In this project the ubiquitous language is English: one canonical English term per domain concept (anchor: docs/architecture/ubiquitous-language.md), no synonyms within a bounded context.
  3. Bounded Contexts define boundaries. Each context owns its model. Shared types across contexts are a design smell. (Evans, ch. 14)
  4. Aggregates enforce invariants. All mutations go through the aggregate root. External code never reaches inside. (Vernon, ch. 10)
  5. Value Objects are immutable and identity-free. They describe characteristics, not things. (Evans, ch. 5)
  6. Repositories return aggregates, not tables. Persistence is an infrastructure concern. (Vernon, ch. 12)

Tactical Patterns (summary)

Pattern One-liner Reference
Entity Has identity; equality by ID, not attributes tactical-patterns.md § Entity
Value Object No identity; immutable; equality by attributes tactical-patterns.md § Value Object
Aggregate + Root Consistency boundary; root is sole entry point tactical-patterns.md § Aggregate
Repository Collection-like abstraction over aggregates tactical-patterns.md § Repository
Factory Encapsulates complex creation logic tactical-patterns.md § Factory
Specification Reusable, composable query/predicate logic tactical-patterns.md § Specification
Domain Service Stateless logic that doesn't belong to an entity tactical-patterns.md § Domain Service
Rich vs Anemic Behavior lives with data, not in external services tactical-patterns.md § Rich vs Anemic

Full definitions, GOOD/BAD examples, and per-pattern checklist lines: tactical-patterns.md

Strategic Design (summary)

Concept One-liner Reference
Bounded Context Explicit boundary around a model + language strategic-design.md § Bounded Context
Ubiquitous Language Shared vocabulary within a context strategic-design.md § Ubiquitous Language
Anti-Corruption Layer Translation boundary shielding your model from external models strategic-design.md § ACL
Context Mapping Relationships between contexts (Shared Kernel, Customer/Supplier, etc.) strategic-design.md § Context Mapping
Domain Events Immutable record of something that happened in the domain strategic-design.md § Domain Events
CQRS Separate read/write models (deep enforcement defers to dotnet-cop) strategic-design.md § CQRS

Full definitions, GOOD/BAD examples, and per-concept checklist lines: strategic-design.md

Review Checklist

The code-reviewer agent applies review-checklist.md when reviewing domain code. It is a terse, file:line-oriented list — one item per pattern/concept. Load it on demand during review.

Relationship to Other Skills

Skill Relationship
dotnet-clean-architecture Provides hexagonal layering (ports/adapters, module isolation). This skill provides the domain-mode
Полный SKILL.md на GitHub

Установить dotnet-ddd в Claude Code и Claude Desktop

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

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

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

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

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

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

Вложенные файлы

review-checklist.mdstrategic-design.mdtactical-patterns.md

FAQ

Что делает скилл dotnet-ddd?

Domain-Driven Design best practices for .NET 10 domain code. Use when creating or reviewing entities, value objects, aggregates, aggregate roots, repositories, domain services, bounded contexts, or domain events in C#. Use when refactoring anemic models toward rich domain logic, enforcing aggregate invariants, or checking bounded-context boundaries. Provides tactical-pattern guidance, strategic-design rules, and a file:line review checklist. Complements dotnet-clean-architecture (hexagonal layering) and dotnet-cop (pre-merge review enforcement).

Как установить скилл dotnet-ddd?

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

Скилл dotnet-ddd запускает скрипты?

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

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

Сравнить dotnet-ddd с