ddd

Apply Domain-Driven Design to structure .NET domain models with aggregates and value objects.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/shahdanish/vibepos --skill ddd-shahdanish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd
Source: https://github.com/shahdanish/vibepos/tree/main/skills/ddd
Command: npx skills add https://github.com/shahdanish/vibepos --skill ddd-shahdanish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Domain-Driven Design helps you model complex business rules clearly so invariants stay consistent and side effects remain decoupled as your .NET system grows.

Core Features & Use Cases

  • Aggregates and aggregate roots for consistency boundaries: Enforce rules within a single transactional unit and avoid cross-aggregate invariants becoming fragile.
  • Value objects for validation and correct equality: Replace primitive obsession with immutable records like Money, EmailAddress, and OrderNumber.
  • Domain events to decouple side effects: Raise events in the domain model and handle integration/side effects externally without polluting core business logic.
  • Strongly-typed IDs for safety across entities: Prevent mixing identifiers by using strongly-typed structs with EF Core conversions.

Quick Start

Load the skill when designing aggregates and value objects for a DDD + Clean Architecture .NET codebase, then implement a small aggregate root with validated value objects and domain events to capture meaningful state changes.

Frequently Asked Questions about ddd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce aggregate consistency boundaries in a .NET Domain-Driven Design model?

To enforce aggregate consistency boundaries in Domain-Driven Design, structure your .NET domain models so aggregate roots serve as the only entry point, validating invariants strictly inside the aggregate within a single transactional unit.

What is the best way to map strongly-typed IDs using EF Core in Clean Architecture?

Mapping strongly-typed IDs using EF Core in Clean Architecture requires translating strongly-typed structs through EF Core conversions, preventing identifier mixing across entities while maintaining persistence decisions within bounded contexts.

How do domain events decouple side effects in a .NET aggregate root?

Domain events decouple side effects in a .NET aggregate root by allowing you to raise events in the domain model and handle integration or side effects externally, avoiding pollution of core business logic.

When do I need value objects in Domain-Driven Design for .NET?

You need value objects in Domain-Driven Design to replace primitive obsession with immutable records like Money, EmailAddress, and OrderNumber, ensuring correct equality and validation within your .NET domain models.

Should I use one repository per aggregate root in Clean Architecture?

Yes, you should persist aggregates via one repository per aggregate root in Clean Architecture. This Domain-Driven Design approach maintains consistency boundaries and prevents cross-aggregate invariants from becoming fragile.