Agent skill · research science · lum1104

understand-domain

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.

Why this skill is useful

Generates an interactive domain flow graph from codebase analysis, providing insights that the AI wouldn't reliably infer on its own.

What it needs

Requires git installed locally. About 5k tokens when loaded. Last updated 2026-07-30. 77,791 stars on the source repository.

What this skill does

/understand-domain Extracts business domain knowledge — domains, business flows, and process steps — from a codebase and produces an interactive horizontal flow graph in the dashboard. How It Works If a knowledge graph already exists (.ua/knowledge-graph.json, or the legacy .understand-anything/knowledge-graph.json when that directory is present), derives domain knowledge from it (cheap, no file scanning) If no knowledge graph exists, performs a lightweight scan: file tree + entry point detection + sampled files Use --full flag to force a fresh scan even if a knowledge graph exists Instructions Phase 0: Resolve PROJECTROOT Set PROJECTROOT to the current working directory. Worktree redirect. If PROJECTROOT is inside a git worktree (not the main checkout), redirect output to the main repository root. Worktrees managed by Claude Code are ephemeral — the data directory (.ua/, or legacy .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. Use $PROJECTROOT (not the bare CWD) for every reference to "the current project" / <project-root> in subsequent phases. Resolve the data directory $UADIR. All Understand-Anything artifacts live in the project's data directory. Resolve it once, now that $PROJECTROOT is known, and reuse $UADIR for every read and write in later phases: This keeps the legacy .understand-anything/ directory when it already exists (existing projects keep working with no migration) and uses the new .ua/ otherwise. Because each phase may run in a fresh shell, carry $UADIR forward like $PROJECTROOT, re-resolving it with the line above if a later command block needs it. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills lum1104/understand-domain

View the source on GitHub

Browse the @skills marketplace