Skip to content
Development
Skill

/ddd-analysis

- git installed: !`which git 2>/dev/null || echo "not installed"` - CLAUDE.md: !`find . -maxdepth 1 -name "CLAUDE.md" -type f` - project-discovery.md: !`find . -maxdepth 3 -name "project-discovery.md" -type f` - personal config directory: !`bash

From plugin
han
35047 skills31 agents

Claude Code

$ npx -y skills add testdouble/han --skill ddd-analysis --agent claude-code

SKILL.md

ddd-analysis.SKILL.md
name: "ddd-analysis"
description:
  "Analyzes an existing codebase using strategic Domain-Driven Design to discover bounded contexts, surface
  ubiquitous language and semantic collisions, find places where code boundaries diverge from domain boundaries,
  and produce an evidence-backed domain and context map. Use when the goal is DDD-specific: bounded context
  discovery, ubiquitous language analysis, domain model discovery, or mapping contested ownership and
  responsibility. The entire repository is a valid scope; no module or directory must be named first. Does not
  assess architectural coupling, cohesion, or technical debt — use architectural-analysis. Does not design
  service communication, integration patterns, or deployment topology — use architectural-analysis or
  plan-a-feature. Does not refactor code, diagnose bugs, or review code quality — use refactor, investigate,
  or code-review."
arguments: size
argument-hint: "[size: small | medium | large] [focus area: module or directory to restrict analysis to]"
allowed-tools: Read, Glob, Grep, Agent, Write, Bash(find *), Bash(date *), Bash(mkdir *), Bash(bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh")

Project Context

  • git installed: !`which git 2>/dev/null || echo "not installed"`
  • CLAUDE.md: !`find . -maxdepth 1 -name "CLAUDE.md" -type f`
  • project-discovery.md: !`find . -maxdepth 3 -name "project-discovery.md" -type f`
  • personal config directory: !`bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"`
  • project .han/config.md: !`cat .han/config.md 2>/dev/null || echo ""`

As your first action, use the Read tool on `.han/config.md` inside the `personal config directory` path above. A read that returns no file is no personal configuration: continue silently. When that file or the `project .han/config.md` probe supplies content, apply it per [config-rule.md](../../references/config-rule.md), which governs precedence between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.

Operating Principles

Read these before dispatching anything. They constrain every step below.

  • **The entire repository is a valid scope.** No focus area is required. If the user names a module or directory,

restrict the analysis to it; otherwise, scope is the full repository. Do not ask for a focus area when none was given.

  • **Discovery and context model only. No migration plans.** This skill characterizes what the domain structure is.

It does not produce recommendations for service splits, migration steps, or refactoring work. When the context model surfaces a decision the team wants to act on, the right next step is `han-planning:plan-a-feature` (to specify a change) or `han-coding:architectural-analysis` (for a code-level view of a specific module). The context model informs those steps; it does not replace them.

  • **Analysis surface partitions organize agent work, not context proposals.** The inventory step identifies

tractable areas for structural and behavioral analysis. These partitions are analytical conveniences — they must never be mentioned in any agent brief as context candidates or suggested boundaries.

  • **The agents own the judgment; the skill orchestrates.** The skill resolves scope, surveys the surface, classifies

depth, briefs the agents, collects their output, and renders the report. It does not produce DL#, CAP#, OWN#, S#, B#, or BCM# findings itself.

  • **Negative results are valuable.** A module with no domain events and only CRUD operations is evidence, not a gap.

Agents must not fabricate findings to fill sections.

  • **Exactly one revision loop.** The skill dispatches bounded-context-modeler, then bounded-context-critic, then

bounded-context-modeler once more with the critique. The loop is closed after the revision pass. The skill does not self-escalate or repeat this cycle.

  • **The report template lives at

[references/ddd-analysis-report-template.md](./references/ddd-analysis-report-template.md).** The skill renders that template by synthesizing agent output into each section following the template's placeholder instructions. It does not invent a structure inline.

  • **The synthesized prose is written for a named reader.** As the skill writes each section, it invokes

`han-communication:readability-guidance` and applies the shared standard, holding one audience above the writing: the engineer or product manager reading the context model and deciding what to do next.

Run a DDD Analysis

Step 1: Resolve Scope and Load Project Context

**Bind `$size`.** If the user passed `small`, `medium`, or `large` as the first positional argument, bind `$size` to it. If `$size` is `none provided` and the project config supplies a `default-swarm-size` value via `config-rule.md`, adopt that value as `$size` and note the config as the source. If no value is available from either source, set `$size` to `medium`.

**Resolve the focus area.** Take the remaining argument and conversation context as the focus area. If a focus area was supplied, confirm it resolves to real files using Glob and Read. If it does not resolve to actual files, stop and ask the user to clarify before proceeding. If no focus area was supplied, the scope is the entire repository — do not ask for one.

**Resolve project context.** If `CLAUDE.md` is present (see Project Context), read its `## Project Discovery` section for language, framework, and convention signals. Fall back to `project-discovery.md` if present. If neither exists, discovery agents will infer from surrounding code — note this in every agent brief.

**Note git availability.** Read the `git installed` value from Project Context. If it is empty or reads `not installed`, git is unavailable: note this in the agent briefs and in the report.

**State the driving concern, if any.** If the user named a concern ("I think billing and subscriptions overlap", "we need to underst

Read more
@testdouble
Ships withhan

Han is a suite of AI skills and agents for solo (or small-team) product engineers.

35047 skills31 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
350
Star history of testdouble/han on GitHub, a chart by star-history.com

Other skills on han.

han-release

han-release

Cut a Han release: update CHANGELOG.md with the changes since the last release, bump and tag every plugin that changed as…

@testdouble@testdoubleInstall Skill
han-update-documentation

han-update-documentati…

Update Han plugin documentation so every skill, agent, guidance doc, index, and cross-reference is current and accurate. On a…

@testdouble@testdoubleInstall Skill
code-overview-to-confluence

code-overview-to-confl…

Produces a progressive-disclosure overview of unfamiliar code or a pull request's changes with code-overview and publishes the…

@testdouble@testdoubleInstall Skill
investigate-to-confluence

investigate-to-conflue…

Runs an evidence-based investigation of a bug, failure, or unexpected behavior with investigate and publishes the resulting…

@testdouble@testdoubleInstall Skill
markdown-to-confluence

markdown-to-confluence

Publishes a local Markdown file to a user-specified Confluence location, creating a new page or updating an existing one through…

@testdouble@testdoubleInstall Skill
plan-a-feature-to-confluence

plan-a-feature-to-conf…

Builds a feature specification from scratch with plan-a-feature and publishes it to a user-specified Confluence location, posting…

@testdouble@testdoubleInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about ddd-analysis.

Which coding agents can use ddd-analysis?
ddd-analysis installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.