ruvnet avatar

Ddd Aggregate

Generates a complete DDD aggregate root with all the surrounding infrastructure: entity class with invariant validation, value objects including an ID type, repository interface, domain events for creation and updates, and test stubs. It wires everything into your bounded context's folder structure and updates barrel exports. The skill also hooks into Claude Flow's memory and neural training system to track what it built. Useful when you're working in a structured DDD codebase and want to skip the boilerplate of setting up a new aggregate by hand. It assumes you already have a bounded context scaffolded under src and follows strict naming conventions.

skills.sh installs
751
GitHub stars
81.4K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/ruvnet/ruflo
Categories
Testing & QA, Automation & Workflows
First seen
Jun 3, 2026

More from ruvnet/ruflo

All 236
1daymade avatarterraform-skilldaymade/claude-code-skillsOperational traps for Terraform provisioners, multi-environment isolation, and zero-to-deployment reliability. Use when writing null_resource / remote-exec / lo746skills.sh installs
2hamelsmu avatarvalidate-evaluatorhamelsmu/evals-skillsCalibrate an LLM judge against human labels using data splits, TPR/TNR, and bias correction. Use after writing a judge prompt (write-judge-prompt) when you need739skills.sh installs
3alirezarezvani avatardemo-videoalirezarezvani/claude-skillsUse when the user asks to create a demo video, product walkthrough, feature showcase, animated presentation, marketing video, or GIF from screenshots or scene d736skills.sh installs
4alirezarezvani avatarrevenue-operationsalirezarezvani/claude-skillsAnalyzes sales pipeline health, revenue forecasting accuracy, and go-to-market efficiency metrics for SaaS revenue optimization. Use when analyzing sales pipeli733skills.sh installs
5joellewis avatarforward-riskjoellewis/finance_skillsEstimate potential future losses using VaR, Expected Shortfall, Monte Carlo simulation, and stress testing. Use when the user asks about Value-at-Risk, CVaR, Ex733skills.sh installs
6mblode avatarui-auditmblode/agent-skillsAudits built React and Next.js frontends for user-facing defects in code and rendered UI: state gaps, data loss, double submits, focus and keyboard failures, ro733skills.sh installs