Skip to content
ruvnet avatar

Ddd Validate

Validates bounded-context boundaries by flagging cross-context imports, aggregate invariant gaps, and repository misplacement.

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

Own this skill? Claim it

What it does

  • Covers a DDD audit in seven steps: context discovery, boundary import checks, aggregate invariants, event naming, repository placement, reporting, and result storage
  • Flags cross-context imports that reach into another context's domain/ directory instead of its public index.ts, using a grep-based bash scan
  • Reports findings in a table tagged BOUNDARY, INVARIANT, EVENT, or REPOSITORY, with file path, line number, and suggested fix
  • Designed for auditing DDD codebases before cross-cutting merges or as a CI gate against boundary erosion

Install

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

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

Files

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
    # 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)

Details

Repository
github.com/ruvnet/ruflo
Categories
Code Review & Quality, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the ddd-validate skill check in a codebase?

The ddd-validate skill checks domain boundary integrity across bounded contexts. It detects cross-context import violations, aggregate invariant issues, event naming problems and repository placement errors, then reports them in a table by category.

How do I install the ddd-validate skill?

Run this command in your project: npx -y skills add ruvnet/ruflo --skill ddd-validate -y. Once installed, the agent can audit your code for boundary leaks between bounded contexts.

When should I use ddd-validate?

Use it 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. It is aimed at teams that keep bounded contexts separate.

Where does ddd-validate sit among code review skills?

It is in the Code Review and Quality category on Claude Marketplaces, alongside improve-codebase-architecture, codebase-design and code-review. Where those cover general architecture or review, this one focuses on domain boundary checks in DDD code.

Does ddd-validate store its results anywhere?

Yes, the skill stores a results summary in memory under the tasks namespace and records the run with a post-task hook. Its allowed tools include Bash, Read, Grep and Glob.

More from ruvnet/ruflo

All 236

Similar to Ddd Validate

More Code Review & Quality