Skip to content
ruvnet avatar

Ddd Aggregate

Scaffolds an aggregate root with entity, value objects, repository interface, domain events, and tests.

CCM score
58 of 100
skills.sh installs
751
GitHub stars
82.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full aggregate scaffold inside an existing bounded context, from entity through unit test stubs
  • Creates an entity, an ID value object, a repository interface, created and updated domain events, and a test file
  • Updates barrel exports and records the aggregate and its context in the domain model graph
  • Designed for adding a new business concept that owns invariants to a bounded context under src/

Install

$ npx -y skills add ruvnet/ruflo --skill ddd-aggregate -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Scaffold a complete aggregate root inside a bounded context.

Parse $ARGUMENTS as <context-name> <aggregate-name> (both kebab-case). The context must already exist under src/.

Steps

  1. Validate: Confirm src/<context>/domain/ exists. If not, suggest running /ddd-context <context> first.

  2. Pre-task hook: npx @claude-flow/cli@latest hooks pre-task --description "DDD aggregate: <aggregate-name> in <context>"

  3. Create aggregate root entity:

    • File: src/<context>/domain/entities/<aggregate-name>.entity.ts
    • Include: unique ID field, constructor with invariant validation, domain methods that enforce business rules, equals() based on identity
    • Export a TypeScript class extending or implementing a base AggregateRoot interface
  4. Create value objects:

    • File: src/<context>/domain/value-objects/<aggregate-name>-id.value-object.ts
    • Include: immutable ID value object with factory method and validation
    • Add additional value objects as properties of the aggregate suggest them

Details

Repository
github.com/ruvnet/ruflo
Category
Backend & APIs
First seen
Jun 3, 2026

Questions

What does the ddd-aggregate skill do?

ddd-aggregate scaffolds an aggregate root inside an existing bounded context, with an entity, value objects, a repository interface, domain events and unit test stubs. It fits when you add a new aggregate that owns business invariants, or when you need the entity, repository and events boilerplate generated in one pass.

How do I install the ddd-aggregate skill?

Run npx -y skills add ruvnet/ruflo --skill ddd-aggregate -y in your project to install ddd-aggregate. Once installed, ddd-aggregate takes the arguments context and aggregate name in kebab-case, and the context folder under src must already exist.

Where does ddd-aggregate sit in the Backend & APIs category?

ddd-aggregate is listed under Backend & APIs on Claude Marketplaces, alongside entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Its distinct focus is generating the domain layer of a bounded context rather than wiring up a specific cloud service.

Does ddd-aggregate need any tools or accounts?

ddd-aggregate's SKILL.md lists allowed tools including Bash, Read, Write, Edit, Grep and Glob, plus ruflo memory and hooks tools for storing the aggregate in a domain model graph. It also expects Node tooling, since its hook steps run through npx @claude-flow/cli.

More from ruvnet/ruflo

All 236

Similar to Ddd Aggregate

More Backend & APIs