domain-entity-generator

Generate DDD-aligned domain entities with factory methods and domain events.

69|13|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill domain-entity-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-entity-generator
Source: https://github.com/ronnythedev/dotnet-clean-architecture-skills/tree/main/sample/POS/.claude/skills/04-domain-entity-generator
Command: npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill domain-entity-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of DDD-aligned domain entities and related artifacts.

Core Features & Use Cases

  • Entity scaffolding: Generates aggregate root and child entities with private setters, factory methods, and domain events.
  • Value Objects: Provides immutable value object templates with validation and basic operations.
  • Domain events: Includes events for create/update/deactivate and event wiring in entities.
  • Repository interfaces: Produces per-aggregate repositories to satisfy persistence boundaries.
  • Use case scenarios: Ideal for .NET projects adopting clean architecture, DDD patterns.

Quick Start

Create a new domain-entity-generator scaffold for your Customer aggregate and customize by editing generated templates.

Frequently Asked Questions about domain-entity-generator

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

FAQPage Schema
How do I generate DDD aggregate roots and value objects in a .NET project?

To generate DDD aggregate roots and value objects in .NET, use this skill to scaffold entities with private setters, factory methods, domain events, and repository interfaces for clean architecture.

What is the best way to enforce invariants in domain entities using domain-driven design?

Enforcing invariants in domain-driven design entities is best achieved by generating factory methods and private setters, ensuring valid state upon creation while wiring domain events for state transitions.

Does this domain entity generator work with clean architecture and .NET projects?

Yes, this domain entity generator works directly with .NET projects adopting clean architecture, scaffolding domain-driven design artifacts like aggregates, value objects, and repositories.

Can I scaffold both domain events and repository interfaces for my aggregates?

Yes, you can scaffold both domain events and per-aggregate repository interfaces simultaneously, ensuring clear persistence boundaries and event wiring for create, update, and deactivate operations.

When should I use a domain entity generator for domain-driven design?

Use a domain entity generator when you need to rapidly scaffold immutable value objects with validation and aggregate roots, ensuring DDD discipline without manually coding boilerplate patterns.

How do I create a Customer aggregate with domain events and a repository?

Create a Customer aggregate by running the scaffold command and customizing generated templates, which produces the aggregate root, child entities, domain events, and repository interfaces.

Related Skills