ddd

Standardize Domain-Driven Design modeling in .NET with aggregate roots, value objects, and domain events.

4|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/zdanovichnick/dotnet-pilot --skill ddd-zdanovichnick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd
Source: https://github.com/zdanovichnick/dotnet-pilot/tree/main/skills/ddd
Command: npx skills add https://github.com/zdanovichnick/dotnet-pilot --skill ddd-zdanovichnick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid fragile domain designs by giving a practical, rule-based approach to modeling business logic in .NET with aggregates, value objects, and domain events.

Core Features & Use Cases

  • Tactical DDD building blocks: Aggregate roots with invariant-enforcing factory methods, immutable value objects, and strongly-typed IDs.
  • Correct domain event patterns: Raise events inside aggregates and publish them after persistence commits successfully.
  • Clean layering rules for DDD: Enforce dependency boundaries so Domain stays free of infrastructure concerns.

Quick Start

Tell your AI assistant: “Review my current .NET domain model and refactor it to use aggregate roots, immutable value objects, strongly-typed IDs, domain events raised in aggregates, and clear layer dependency rules.”

Frequently Asked Questions about ddd

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

FAQPage Schema
How do I implement aggregate roots and immutable value objects in .NET?

You implement aggregate roots and immutable value objects in .NET by defining factory methods that enforce invariants and using strongly-typed IDs. This ensures mutations occur only through the aggregate root, maintaining domain model robustness.

How do I handle domain events in .NET clean architecture?

Handling domain events in .NET clean architecture requires raising events inside aggregates and publishing them only after persistence commits successfully. This guarantees cross-aggregate consistency without coupling domain logic to infrastructure dependencies.

How do I enforce clean architecture dependency boundaries in a .NET domain layer?

Enforcing clean architecture dependency boundaries in a .NET domain layer involves restricting the domain from EF Core and other infrastructure dependencies. This keeps your business logic isolated and prevents fragile coupling to external frameworks.

What is the best way to refactor a .NET domain model for DDD?

The best way to refactor a .NET domain model for DDD is to standardize it using aggregate roots, immutable value objects, strongly-typed IDs, and domain events. This approach enforces invariants and establishes clean-architecture dependency boundaries.

Does DDD domain modeling work with EF Core for value conversions?

DDD domain modeling works with EF Core by using EF Core-friendly ID and value conversions. This allows strongly-typed IDs and immutable value objects to persist correctly while keeping EF Core infrastructure dependencies out of the domain layer.

Why does my domain layer have infrastructure dependencies in .NET?

Your domain layer has infrastructure dependencies in .NET because clean layering rules are not enforced. Restricting EF Core and other infrastructure dependencies from the domain layer ensures business logic remains isolated and robust.