ddd-entity-builder

Generate DDD entities, aggregates, and value objects with factories and tests.

Updated Dec 30, 2025
One-click install
npx skills add https://github.com/haginot/ddd-boilerplate --skill ddd-entity-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-entity-builder
Source: https://github.com/haginot/ddd-boilerplate/tree/main/.claude/skills/ddd-entity-builder
Command: npx skills add https://github.com/haginot/ddd-boilerplate --skill ddd-entity-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DDD-entity-builder automates the generation of entities, aggregates, and value objects following tactical patterns, reducing boilerplate and ensuring consistency across bounded contexts.

Core Features & Use Cases

  • Entity/Aggregate/VO generation: Generate Entity<T> / AggregateRoot<T> with IDs, state, behaviors, and domain event triggers.
  • Factory & Tests: Include factory methods and tests for invariant validation and event firing.
  • Architecture compliance: Verifies alignment with architecture-guardian rules and outputs metadata for bounded contexts.

Quick Start

Run the entity-builder with domain inputs to generate an Entity, AggregateRoot, VO, Factory, and tests for a sample domain like User or Order.

Frequently Asked Questions about ddd-entity-builder

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

FAQPage Schema
How do I scaffold DDD entities and aggregates in TypeScript?

To scaffold DDD entities and aggregates, you provide domain inputs to generate Entity<T> and AggregateRoot<T> structures with IDs, state, behaviors, and domain event triggers. This reduces boilerplate and ensures consistency across bounded contexts.

What is the best way to generate value objects for domain-driven design?

Generating value objects for domain-driven design involves creating structured types that enforce domain invariants. The generator outputs architecture-compliant TypeScript code and includes factory methods to ensure rapid and consistent domain model creation.

Can I generate test scaffolding for DDD aggregate invariants and events?

Yes, test scaffolding for DDD aggregate invariants and events is supported. The generator outputs factory methods alongside tests specifically designed for validating invariants and verifying that domain event triggers fire correctly.

Does this DDD code generation tool verify architecture compliance?

Yes, DDD code generation verifies architecture compliance by checking alignment with architecture-guardian rules. It outputs metadata for bounded contexts to ensure your generated TypeScript domain models remain structurally sound.

When do I need to generate domain models for bounded contexts?

You need to generate domain models for bounded contexts when building backend services that require rapid scaffolding of domain-driven design workflows. It automates entity, aggregate, and value object creation to reduce manual boilerplate.