ddd-aggregate
Scaffold an aggregate root with entity, value objects, repository interface, domain events, and test stubs. Use when adding a new aggregate to an existing bounded context, modeling a new business concept that owns invariants, or generating the boilerplate for an entity + repo + events triplet.
npx skills add ruvnet/ruflo --skill ddd-aggregate --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
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 5. **Create repository interface**: - File: `src/<context>/domain/repositories/<aggregate-name>.repository.ts` - Include: `findById`, `save`, `delete` methods - Use the aggregate ro
- Steps
What does the ddd-aggregate skill do?
Scaffold an aggregate root with entity, value objects, repository interface, domain events, and test stubs. Use when adding a new aggregate to an existing bounded context, modeling a new business concept that owns invariants, or generating the boilerplate for an entity + repo + events triplet.
How do I install it?
Run `npx skills add ruvnet/ruflo --skill ddd-aggregate --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ruvnet/ruflo, a repository with 67,015 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.