/ruflo-ddd:ddd-aggregate <context> <aggregate-name>from ruflo-ddd
Scaffolds a DDD aggregate root with entity, value objects, repository interface, domain events, and test stubs. Use when adding a new aggregate to an existing bounded context.
Ships in ruflo-ddd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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/.
Validate: Confirm src/<context>/domain/ exists. If not, suggest running /ddd-context <context> first.
Pre-task hook: npx @claude-flow/cli@latest hooks pre-task --description "DDD aggregate: <aggregate-name> in <context>"
Create aggregate root entity:
src/<context>/domain/entities/<aggregate-name>.entity.tsequals() based on identityAggregateRoot interfaceCreate value objects:
src/<context>/domain/value-objects/<aggregate-name>-id.value-object.tsCreate repository interface:
src/<context>/domain/repositories/<aggregate-name>.repository.tsfindById, save, delete methodsCreate domain events:
src/<context>/domain/events/<aggregate-name>-created.event.tssrc/<context>/domain/events/<aggregate-name>-updated.event.tsCreate unit test stubs:
src/<context>/domain/entities/<aggregate-name>.entity.test.tsdescribe/it with should [behavior] when [condition] namesUpdate barrel exports: Add new files to the relevant index.ts barrel files.
Store in domain model graph:
mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store({ key: "domain/context-<context>/aggregate-<aggregate-name>", value: "Aggregate <aggregate-name> (parent: context-<context>)", tier: "semantic" })
mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge({ sourceId: "entity:context-<context>", targetId: "entity:aggregate-<aggregate-name>", relation: "contains" })
mcp__plugin_ruflo-core_ruflo__memory_store({ key: "ddd-aggregate-<context>-<aggregate-name>", value: "AGGREGATE_SUMMARY", namespace: "tasks" })
Post-task hook: npx @claude-flow/cli@latest hooks post-task --task-id "ddd-aggregate-<aggregate-name>" --success true
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ddd, aggregate-root, domain-driven-design, scaffolding, entity, value-object
3 skills in this plugin
/ddd-contextCreate and manage a DDD bounded context with standard directory structure. Use when starting a new subdomain, splitting a monolith into bounded contexts, or scaffolding the domain/application/infrastructure layout for a fresh module./ddd-validateValidate domain boundaries -- detect cross-context import violations and aggregate invariant issues. Use when auditing a DDD codebase for leaks between bounded contexts, before merging cross-cutting changes, or as a CI gate to catch boundary erosion early.npx claudepluginhub ruvnet/ruflo --plugin ruflo-dddOther plugins' skills for the same job