Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extract business domain knowledge from a codebase and generate an interactive domain flow graph. Works standalone (lightweight scan) or derives from an existing /understand knowledge graph.
.claude/skills/bilal140202-understand-domain/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 359% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 55% | 0% |
Extracts business domain knowledge — domains, business flows, and process steps — from a codebase and produces an interactive horizontal flow graph in the dashboard.
.understand-anything/knowledge-graph.json), derives domain knowledge from it (cheap, no file scanning)--full flag to force a fresh scan even if a knowledge graph existsPROJECT_ROOTSet PROJECT_ROOT to the current working directory.
Worktree redirect. If PROJECT_ROOT is inside a git worktree (not the main checkout), redirect output to the main repository root. Worktrees managed by Claude Code are ephemeral — .understand-anything/ written there is destroyed when the session ends, taking the domain graph with it (issue #133). Detect a worktree by comparing git rev-parse --git-dir against git rev-parse --git-common-dir; in a normal checkout or submodule they resolve to the same path, in a worktree they differ and the parent of --git-common-dir is the main repo root.
bashCOMMON_DIR=$(git -C "$PROJECT_ROOT" rev-parse --git-common-dir 2>/dev/null) GIT_DIR=$(git -C "$PROJECT_ROOT" rev-parse --git-dir 2>/dev/null) if [ -n "$COMMON_DIR" ] && [ -n "$GIT_DIR" ]; then COMMON_ABS=$(cd "$PROJECT_ROOT" && cd "$COMMON_DIR" 2>/dev/null && pwd -P) GIT_ABS=$(cd "$PROJECT_ROOT" && cd "$GIT_DIR" 2>/dev/null && pwd -P) if [ -n "$COMMON_ABS" ] && [ "$COMMON_ABS" != "$GIT_ABS" ]; then MAIN_ROOT=$(dirname "$COMMON_ABS") if [ -d "$MAIN_ROOT" ] && [ "${UNDERSTAND_NO_WORKTREE_REDIRECT:-0}" != "1" ]; then echo "[understand-domain] Detected git worktree at $PROJECT_ROOT" echo "[understand-domain] Redirecting output to main repo root: $MAIN_ROOT" echo "[understand-domain] (Set UNDERSTAND_NO_WORKTREE_REDIRECT=1 to keep PROJECT_ROOT as the worktree.)" PROJECT_ROOT="$MAIN_ROOT" fi fi fi
Use $PROJECT_ROOT (not the bare CWD) for every reference to "the current project" / <project-root> in subsequent phases.
Important: do not assume the plugin root is simply two directories above the skill path string. In many installations ~/.agents/skills/understand-domain is a symlink into the real plugin checkout. Prefer runtime-provided plugin roots first (for Claude), then fall back to universal symlinks, skill symlink resolution, and common clone-based install paths.
Resolve the plugin root like this:
bashSKILL_REAL=$(realpath ~/.agents/skills/understand-domain 2>/dev/null || readlink -f ~/.agents/skills/understand-domain 2>/dev/null || echo "") SELF_RELATIVE=$([ -n "$SKILL_REAL" ] && cd "$SKILL_REAL/../.." 2>/dev/null && pwd || echo "") COPILOT_SKILL_REAL=$(realpath ~/.copilot/skills/understand-domain 2>/dev/null || readlink -f ~/.copilot/skills/understand-domain 2>/dev/null || echo "") COPILOT_SELF_RELATIVE=$([ -n "$COPILOT_SKILL_REAL" ] && cd "$COPILOT_SKILL_REAL/../.." 2>/dev/null && pwd || echo "") PLUGIN_ROOT="" for candidate in \ "${CLAUDE_PLUGIN_ROOT}" \ "$HOME/.understand-anything-plugin" \ "$SELF_RELATIVE" \ "$COPILOT_SELF_RELATIVE" \ "$HOME/.codex/understand-anything/understand-anything-plugin" \ "$HOME/.opencode/understand-anything/understand-anything-plugin" \ "$HOME/.pi/understand-anything/understand-anything-plugin" \ "$HOME/understand-anything/understand-anything-plugin"; do if [ -n "$candidate" ] && [ -f "$candidate/package.json" ] && [ -f "$candidate/pnpm-workspace.yaml" ]; then PLUGIN_ROOT="$candidate" break fi done if [ -z "$PLUGIN_ROOT" ]; then echo "Error: Cannot find the understand-anything plugin root." echo "Checked:" echo " - ${CLAUDE_PLUGIN_ROOT:-<unset CLAUDE_PLUGIN_ROOT>}" echo " - $HOME/.understand-anything-plugin" echo " - ${SELF_RELATIVE:-<unresolved path derived from ~/.agents/skills/understand-domain>}" echo " - ${COPILOT_SELF_RELATIVE:-<unresolved path derived from ~/.copilot/skills/understand-domain>}" echo " - $HOME/.codex/understand-anything/understand-anything-plugin" echo " - $HOME/.opencode/understand-anything/understand-anything-plugin" echo " - $HOME/.pi/understand-anything/understand-anything-plugin" echo " - $HOME/understand-anything/understand-anything-plugin" echo "Make sure the plugin is installed correctly." exit 1 fi
Use $PLUGIN_ROOT for every reference to agent definitions in subsequent phases.
$PROJECT_ROOT/.understand-anything/knowledge-graph.json exists--full was NOT passed → proceed to Phase 3 (derive from graph)The preprocessing script does NOT produce a domain graph — it produces raw material (file tree, entry points, exports/imports) so the domain-analyzer agent can focus on the actual domain analysis instead of spending dozens of tool calls exploring the codebase. Think of it as a cheat sheet: cheap Python preprocessing → expensive LLM gets a clean, small input → better results for less cost.
$PROJECT_ROOT from Phase 0: python ./extract-domain-context.py "$PROJECT_ROOT" This outputs $PROJECT_ROOT/.understand-anything/intermediate/domain-context.json containing:
.gitignore)domain-context.json as context for Phase 4$PROJECT_ROOT/.understand-anything/knowledge-graph.jsoncalls, imports, contains)$PLUGIN_ROOT/agents/domain-analyzer.md$PROJECT_ROOT/.understand-anything/intermediate/domain-analysis.json$PROJECT_ROOT/.understand-anything/domain-graph.json$PROJECT_ROOT/.understand-anything/intermediate/domain-analysis.json and $PROJECT_ROOT/.understand-anything/intermediate/domain-context.json/understand-dashboard to visualize the domain graphdomain-graph.json and show the domain view by default| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | 10,928 | 1,849 | -83% | 1 | 1 | 0% | 2,028 | 2,390 | +18% | 0 | 0 | — |
case-01 | fail→fail | 8,187 | 11,731 | +43% | 1 | 1 | 0% | 1,405 | 2,836 | +102% | 0 | 0 | — |
case-02 | fail→fail | 9,699 | 12,460 | +28% | 1 | 1 | 0% | 1,650 | 2,879 | +74% | 0 | 0 | — |
case-03 | fail→fail | 3,517 | 12,583 | +258% | 1 | 1 | 0% | 294 | 2,791 | +849% | 0 | 0 | — |
case-04 | fail→pass | 12,776 | 5,186 | -59% | 1 | 1 | 0% | 2,439 | 3,366 | +38% | 0 | 0 | — |
case-05 | fail→pass | 15,850 | 2,256 | -86% | 1 | 1 | 0% | 3,124 | 2,530 | -19% | 0 | 0 | — |
case-07 | pass→pass | 2,874 | 1,861 | -35% | 1 | 1 | 0% | 493 | 2,353 | +377% | 0 | 0 | — |
case-08 | fail→pass | 3,220 | 1,973 | -39% | 1 | 1 | 0% | 505 | 2,317 | +359% | 0 | 0 | — |
case-09 | fail→pass | 7,524 | 1,310 | -83% | 1 | 1 | 0% | 1,442 | 2,231 | +55% | 0 | 0 | — |
case-10 | fail→pass | 8,586 | 2,382 | -72% | 1 | 1 | 0% | 1,738 | 2,449 | +41% | 0 | 0 | — |
case-11 | fail→pass | 9,627 | 1,516 | -84% | 1 | 1 | 0% | 1,670 | 2,217 | +33% | 0 | 0 | — |
case-12 | fail→pass | 4,228 | 2,374 | -44% | 1 | 1 | 0% | 769 | 2,418 | +214% | 0 | 0 | — |
case-13 | fail→pass | 17,395 | 1,912 | -89% | 1 | 1 | 0% | 1,030 | 2,326 | +126% | 0 | 0 | — |
case-14 | fail→fail | 5,834 | 1,191 | -80% | 1 | 1 | 0% | 1,070 | 2,206 | +106% | 0 | 0 | — |
case-15 | fail→pass | 9,511 | 1,041 | -89% | 1 | 1 | 0% | 1,748 | 2,150 | +23% | 0 | 0 | — |
case-16 | pass→pass | 8,748 | 2,056 | -76% | 1 | 1 | 0% | 1,719 | 2,406 | +40% | 0 | 0 | — |
case-17 | fail→pass | 11,831 | 2,990 | -75% | 1 | 1 | 0% | 1,984 | 2,572 | +30% | 0 | 0 | — |
case-18 | pass→pass | 6,899 | 2,805 | -59% | 1 | 1 | 0% | 1,079 | 2,548 | +136% | 0 | 0 | — |
case-23 | pass→pass | 7,895 | 4,231 | -46% | 1 | 1 | 0% | 1,536 | 2,710 | +76% | 0 | 0 | — |
case-19 | pass→pass | 12,756 | 5,712 | -55% | 1 | 1 | 0% | 2,595 | 3,245 | +25% | 0 | 0 | — |
case-20 | fail→fail | 11,533 | 4,821 | -58% | 1 | 1 | 0% | 2,334 | 2,271 | -3% | 0 | 0 | — |
case-21 | fail→fail | 9,502 | 6,975 | -27% | 1 | 1 | 0% | 1,911 | 2,532 | +32% | 0 | 0 | — |
case-22 | fail→pass | 5,753 | 5,383 | -6% | 1 | 1 | 0% | 989 | 2,822 | +185% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 17 counted toward the lift figure. The other 6 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +52 percentage points is the difference between those two pass rates over the 17 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.