create-domain-aggregate

Generate DDD Aggregate Root structures with repository interfaces and domain events for .NET.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/yeeehaooo/WorkSpace --skill create-domain-aggregate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-domain-aggregate
Source: https://github.com/yeeehaooo/WorkSpace/tree/main/skills/dotnet/generators/create-domain-aggregate
Command: npx skills add https://github.com/yeeehaooo/WorkSpace --skill create-domain-aggregate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate a complete DDD Aggregate Root structure along with a Repository Interface, ValueObject, and Domain Event to accelerate domain-driven design in .NET projects.

Core Features & Use Cases

  • Create Aggregate Root class: Enforces identity and business invariants within the Domain Layer.
  • Create Repository Interface: Defines persistence contracts for aggregates.
  • Create ValueObject (optional): Build immutable value objects to model invariants.
  • Create Domain Event (optional): Represent important domain facts for event sourcing or integration.
  • Scaffold Domain Errors (optional): Provide domain-specific exceptions to handle invariants and rules.

Quick Start

Provide the entity name and optional components to scaffold a new domain aggregate.

Frequently Asked Questions about create-domain-aggregate

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

FAQPage Schema
How do I scaffold a DDD aggregate root in C#?

Scaffolding a DDD aggregate root requires defining an entity name to generate the class structure, enforcing identity and business invariants while avoiding infrastructure coupling in the Domain layer.

What is included in a generated domain-driven design aggregate?

A generated DDD aggregate includes the aggregate root class, repository interface, and optional value objects, domain events, and domain error exceptions to enforce business rules.

Can I use this scaffolding for a Clean Architecture .NET project?

Yes, this scaffolding fits Clean Architecture .NET setups by generating domain layer models and repository contracts that maintain separation from infrastructure concerns.

How do I generate value objects and domain events for my .NET project?

You generate value objects and domain events by requesting these optional components during aggregate scaffolding, producing immutable value models and domain facts for your architecture.

Does the generated DDD aggregate repository interface include infrastructure dependencies?

No, the generated repository interface defines persistence contracts within the Domain layer without infrastructure coupling, ensuring clean separation for your DDD project.