ddd-validate
Validate 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 skills add ruvnet/ruflo --skill ddd-validate --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.
Validate domain boundary integrity across all bounded contexts. ## Steps 1. **Discover contexts**: Scan `src/*/domain/` to find all bounded contexts. 2. **Check cross-boundary violations**: - For each context, scan all `.ts` files for import statements - Flag any import that reaches into another context's `domain/` directory directly - Allowed: importing from another context's public `index.ts` (application layer) - Violation: importing from `src/<other-context>/domain/entities/...` directly ```bash # Find cross-boundary imports for ctx in $(find src -maxdepth 2 -name "domain" -type d | sed 's|src/||;s|/domain||'); do grep -rn "from ['\"].*src/" "src/$ctx/" --include="*.ts" | grep -v "src/$ctx/" || true done ``` 3. **Check aggregate invariant enforcement**: - Scan aggregate root entities for public setters that bypass validation - Flag mutable public properties without invariant checks - Verify that child entities are not directly accessible (must go through aggregate root) 4. **Check event naming conventions**: - Domain events should be past-tense named (e.g., `OrderCreated`, not `CreateOrder`) - Events should be immutable (no public setters) - Events should carry the aggregate ID
- Steps
for ctx in $(find src -maxdepth 2 -name "domain" -type d | sed 's|src/||;s|/domain||'); do grep -rn "from ['\"].*src/" "src/$ctx/" --include="*.ts" | grep -v "src/$ctx/" || true done npx @claude-flow/cli@latest memory store --key "ddd-validation-TIMESTAMP" --value "RESULTS_SUMMARY" --namespace tasks npx @claude-flow/cli@latest hooks post-task --task-id "ddd-validate" --success true --store-results true
What does the ddd-validate skill do?
Validate 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.
How do I install it?
Run `npx skills add ruvnet/ruflo --skill ddd-validate --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.