[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7531GXH2GKP2DMPMPBV940Y":3,"skill-same:01M7531GXH2GKP2DMPMPBV940Y":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7531GXH2GKP2DMPMPBV940Y","understand-domain",null,"Extract business domain knowledge from a codebase and generate an interactive domain flow graph. Works standalone (lightweight scan) or derives from an existing \u002Funderstand knowledge graph.","longhang2004\u002FTenvyr","longhang2004","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F149140492?v=4","01M752YHWXV1V7TNHCK1P2SNK3","Hàng Nhựt Long","01M752YHYMBBTCMQ391XSES647",0,"MIT","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Funderstand-domain\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: understand-domain\ndescription: Extract business domain knowledge from a codebase and generate an interactive domain flow graph. Works standalone (lightweight scan) or derives from an existing \u002Funderstand knowledge graph.\nargument-hint: \"[--full]\"\n---\n\n# \u002Funderstand-domain\n\nExtracts business domain knowledge — domains, business flows, and process steps — from a codebase and produces an interactive horizontal flow graph in the dashboard.\n\n## How It Works\n\n- If a knowledge graph already exists (`.ua\u002Fknowledge-graph.json`, or the legacy `.understand-anything\u002Fknowledge-graph.json` when that directory is present), derives domain knowledge from it (cheap, no file scanning)\n- If no knowledge graph exists, performs a lightweight scan: file tree + entry point detection + sampled files\n- Use `--full` flag to force a fresh scan even if a knowledge graph exists\n\n## Instructions\n\n### Phase 0: Resolve `PROJECT_ROOT`\n\nSet `PROJECT_ROOT` to the current working directory.\n\n**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 — the data directory (`.ua\u002F`, or legacy `.understand-anything\u002F`) 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.\n\n```bash\nCOMMON_DIR=$(git -C \"$PROJECT_ROOT\" rev-parse --git-common-dir 2>\u002Fdev\u002Fnull)\nGIT_DIR=$(git -C \"$PROJECT_ROOT\" rev-parse --git-dir 2>\u002Fdev\u002Fnull)\nif [ -n \"$COMMON_DIR\" ] && [ -n \"$GIT_DIR\" ]; then\n  COMMON_ABS=$(cd \"$PROJECT_ROOT\" && cd \"$COMMON_DIR\" 2>\u002Fdev\u002Fnull && pwd -P)\n  GIT_ABS=$(cd \"$PROJECT_ROOT\" && cd \"$GIT_DIR\" 2>\u002Fdev\u002Fnull && pwd -P)\n  if [ -n \"$COMMON_ABS\" ] && [ \"$COMMON_ABS\" != \"$GIT_ABS\" ]; then\n    MAIN_ROOT=$(dirname \"$COMMON_ABS\")\n    if [ -d \"$MAIN_ROOT\" ] && [ \"${UNDERSTAND_NO_WORKTREE_REDIRECT:-0}\" != \"1\" ]; then\n      echo \"[understand-domain] Detected git worktree at $PROJECT_ROOT\"\n      echo \"[understand-domain] Redirecting output to main repo root: $MAIN_ROOT\"\n      echo \"[understand-domain] (Set UNDERSTAND_NO_WORKTREE_REDIRECT=1 to keep PROJECT_ROOT as the worktree.)\"\n      PROJECT_ROOT=\"$MAIN_ROOT\"\n    fi\n  fi\nfi\n```\n\nUse `$PROJECT_ROOT` (not the bare CWD) for every reference to \"the current project\" \u002F `\u003Cproject-root>` in subsequent phases.\n\n**Resolve the data directory `$UA_DIR`.** All Understand-Anything artifacts live in the project's data directory. Resolve it once, now that `$PROJECT_ROOT` is known, and reuse `$UA_DIR` for every read and write in later phases:\n```bash\nUA_DIR=\"$PROJECT_ROOT\u002F$([ -d \"$PROJECT_ROOT\u002F.understand-anything\" ] && echo .understand-anything || echo .ua)\"\n```\nThis keeps the legacy `.understand-anything\u002F` directory when it already exists (existing projects keep working with no migration) and uses the new `.ua\u002F` otherwise. Because each phase may run in a fresh shell, carry `$UA_DIR` forward like `$PROJECT_ROOT`, re-resolving it with the line above if a later command block needs it.\n\n**Important:** do **not** assume the plugin root is simply two directories above the skill path string. In many installations `~\u002F.agents\u002Fskills\u002Funderstand-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.\n\nResolve the plugin root like this:\n\n```bash\nSKILL_REAL=$(realpath ~\u002F.agents\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || readlink -f ~\u002F.agents\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || echo \"\")\nSELF_RELATIVE=$([ -n \"$SKILL_REAL\" ] && cd \"$SKILL_REAL\u002F..\u002F..\" 2>\u002Fdev\u002Fnull && pwd || echo \"\")\nCOPILOT_SKILL_REAL=$(realpath ~\u002F.copilot\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || readlink -f ~\u002F.copilot\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || echo \"\")\nCOPILOT_SELF_RELATIVE=$([ -n \"$COPILOT_SKILL_REAL\" ] && cd \"$COPILOT_SKILL_REAL\u002F..\u002F..\" 2>\u002Fdev\u002Fnull && pwd || echo \"\")\n\nPLUGIN_ROOT=\"\"\nfor candidate in \\\n  \"${CLAUDE_PLUGIN_ROOT}\" \\\n  \"$HOME\u002F.understand-anything-plugin\" \\\n  \"$SELF_RELATIVE\" \\\n  \"$COPILOT_SELF_RELATIVE\" \\\n  \"$HOME\u002F.codex\u002Funderstand-anything\u002Funderstand-anything-plugin\" \\\n  \"$HOME\u002F.opencode\u002Funderstand-anything\u002Funderstand-anything-plugin\" \\\n  \"$HOME\u002F.pi\u002Funderstand-anything\u002Funderstand-anything-plugin\" \\\n  \"$HOME\u002Funderstand-anything\u002Funderstand-anything-plugin\"; do\n  if [ -n \"$candidate\" ] && [ -f \"$candidate\u002Fpackage.json\" ] && [ -f \"$candidate\u002Fpnpm-workspace.yaml\" ]; then\n    PLUGIN_ROOT=\"$candidate\"\n    break\n  fi\ndone\n\nif [ -z \"$PLUGIN_ROOT\" ]; then\n  echo \"Error: Cannot find the understand-anything plugin root.\"\n  echo \"Checked:\"\n  echo \"  - ${CLAUDE_PLUGIN_ROOT:-\u003Cunset CLAUDE_PLUGIN_ROOT>}\"\n  echo \"  - $HOME\u002F.understand-anything-plugin\"\n  echo \"  - ${SELF_RELATIVE:-\u003Cunresolved path derived from ~\u002F.agents\u002Fskills\u002Funderstand-domain>}\"\n  echo \"  - ${COPILOT_SELF_RELATIVE:-\u003Cunresolved path derived from ~\u002F.copilot\u002Fskills\u002Funderstand-domain>}\"\n  echo \"  - $HOME\u002F.codex\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"  - $HOME\u002F.opencode\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"  - $HOME\u002F.pi\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"  - $HOME\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"Make sure the plugin is installed correctly.\"\n  exit 1\nfi\n```\n\nUse `$PLUGIN_ROOT` for every reference to agent definitions in subsequent phases.\n\n### Phase 1: Detect Existing Graph\n\n1. Check if `$UA_DIR\u002Fknowledge-graph.json` exists\n2. If it exists AND `--full` was NOT passed, check freshness before deriving from it:\n   - Read `project.gitCommitHash` from the graph metadata as `GRAPH_COMMIT_RAW`. Change to `$PROJECT_ROOT`, resolve it as a commit before using it in any Git diff, compare the resolved commit with `git rev-parse HEAD`, and inspect project-scoped committed and working-tree changes:\n     ```bash\n     GRAPH_COMMIT=$(git rev-parse --verify --end-of-options \"${GRAPH_COMMIT_RAW}^{commit}\" 2>\u002Fdev\u002Fnull)\n     git rev-parse HEAD\n     git diff --name-only \"$GRAPH_COMMIT\" HEAD -- .\n     git diff --cached --name-only -- .\n     git diff --name-only -- .\n     git ls-files --others --exclude-standard -- .\n     ```\n   - The `-- .` pathspec is required: commits that only touch a sibling monorepo project must not make this graph stale. A hash mismatch alone is not stale when the project diff is empty.\n   - Ignore the selected data directory (`.ua\u002F` or legacy `.understand-anything\u002F`) in every command's output because it contains generated graph artifacts, not project source drift.\n   - If the committed diff or any working-tree command reports project files, warn that domain extraction may omit those changes. Suggest: Run `\u002Funderstand` to refresh the knowledge graph.\n   - Run the commit diff only when `GRAPH_COMMIT_RAW` resolves successfully. If the graph commit or Git metadata is missing, invalid, or unavailable, give a brief best-effort warning and continue instead of blocking.\n3. After that preflight, proceed to Phase 3 (derive from graph).\n4. Otherwise, proceed to Phase 2 (lightweight scan). When `--full` is used, skip this preflight because the command performs a fresh scan instead of consuming the existing graph.\n\n### Phase 2: Lightweight Scan (Path 1)\n\nThe preprocessing script does NOT produce a domain graph — it produces **raw material** (file tree, entry points, exports\u002Fimports) 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.\n\n1. Run the preprocessing script bundled with this skill, passing `$PROJECT_ROOT` from Phase 0:\n   ```\n   python .\u002Fextract-domain-context.py \"$PROJECT_ROOT\"\n   ```\n   This outputs `$UA_DIR\u002Fintermediate\u002Fdomain-context.json` containing:\n   - File tree (respecting `.gitignore`)\n   - Detected entry points (HTTP routes, CLI commands, event handlers, cron jobs, exported handlers)\n   - File signatures (exports, imports per file)\n   - Code snippets for each entry point (signature + first few lines)\n   - Project metadata (package.json, README, etc.)\n2. Read the generated `domain-context.json` as context for Phase 4\n3. Proceed to Phase 4\n\n### Phase 3: Derive from Existing Graph (Path 2)\n\n1. Read `$UA_DIR\u002Fknowledge-graph.json`\n2. Format the graph data as structured context:\n   - All nodes with their types, names, summaries, and tags\n   - All edges with their types (especially `calls`, `imports`, `contains`)\n   - All layers with their descriptions\n   - Tour steps if available\n3. This is the context for the domain analyzer — no file reading needed\n4. Proceed to Phase 4\n\n### Phase 4: Domain Analysis\n\n1. Read the domain-analyzer agent prompt from `$PLUGIN_ROOT\u002Fagents\u002Fdomain-analyzer.md`\n2. Dispatch a subagent with the domain-analyzer prompt + the context from Phase 2 or 3\n3. The agent writes its output to `$UA_DIR\u002Fintermediate\u002Fdomain-analysis.json`\n\n### Phase 5: Validate and Save\n\n1. Read the domain analysis output\n2. Validate using the standard graph validation pipeline (the schema now supports domain\u002Fflow\u002Fstep types)\n3. If validation fails, log warnings but save what's valid (error tolerance)\n4. Save to `$UA_DIR\u002Fdomain-graph.json`\n5. Clean up `$UA_DIR\u002Fintermediate\u002Fdomain-analysis.json` and `$UA_DIR\u002Fintermediate\u002Fdomain-context.json`\n\n### Phase 6: Launch Dashboard\n\n1. Auto-trigger `\u002Funderstand-dashboard` to visualize the domain graph\n2. The dashboard will detect `domain-graph.json` and show the domain view by default\n","# \u002Funderstand-domain\n\nExtracts business domain knowledge — domains, business flows, and process steps — from a codebase and produces an interactive horizontal flow graph in the dashboard.\n\n## How It Works\n\n- If a knowledge graph already exists (`.ua\u002Fknowledge-graph.json`, or the legacy `.understand-anything\u002Fknowledge-graph.json` when that directory is present), derives domain knowledge from it (cheap, no file scanning)\n- If no knowledge graph exists, performs a lightweight scan: file tree + entry point detection + sampled files\n- Use `--full` flag to force a fresh scan even if a knowledge graph exists\n\n## Instructions\n\n### Phase 0: Resolve `PROJECT_ROOT`\n\nSet `PROJECT_ROOT` to the current working directory.\n\n**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 — the data directory (`.ua\u002F`, or legacy `.understand-anything\u002F`) 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.\n\n```bash\nCOMMON_DIR=$(git -C \"$PROJECT_ROOT\" rev-parse --git-common-dir 2>\u002Fdev\u002Fnull)\nGIT_DIR=$(git -C \"$PROJECT_ROOT\" rev-parse --git-dir 2>\u002Fdev\u002Fnull)\nif [ -n \"$COMMON_DIR\" ] && [ -n \"$GIT_DIR\" ]; then\n  COMMON_ABS=$(cd \"$PROJECT_ROOT\" && cd \"$COMMON_DIR\" 2>\u002Fdev\u002Fnull && pwd -P)\n  GIT_ABS=$(cd \"$PROJECT_ROOT\" && cd \"$GIT_DIR\" 2>\u002Fdev\u002Fnull && pwd -P)\n  if [ -n \"$COMMON_ABS\" ] && [ \"$COMMON_ABS\" != \"$GIT_ABS\" ]; then\n    MAIN_ROOT=$(dirname \"$COMMON_ABS\")\n    if [ -d \"$MAIN_ROOT\" ] && [ \"${UNDERSTAND_NO_WORKTREE_REDIRECT:-0}\" != \"1\" ]; then\n      echo \"[understand-domain] Detected git worktree at $PROJECT_ROOT\"\n      echo \"[understand-domain] Redirecting output to main repo root: $MAIN_ROOT\"\n      echo \"[understand-domain] (Set UNDERSTAND_NO_WORKTREE_REDIRECT=1 to keep PROJECT_ROOT as the worktree.)\"\n      PROJECT_ROOT=\"$MAIN_ROOT\"\n    fi\n  fi\nfi\n```\n\nUse `$PROJECT_ROOT` (not the bare CWD) for every reference to \"the current project\" \u002F `\u003Cproject-root>` in subsequent phases.\n\n**Resolve the data directory `$UA_DIR`.** All Understand-Anything artifacts live in the project's data directory. Resolve it once, now that `$PROJECT_ROOT` is known, and reuse `$UA_DIR` for every read and write in later phases:\n```bash\nUA_DIR=\"$PROJECT_ROOT\u002F$([ -d \"$PROJECT_ROOT\u002F.understand-anything\" ] && echo .understand-anything || echo .ua)\"\n```\nThis keeps the legacy `.understand-anything\u002F` directory when it already exists (existing projects keep working with no migration) and uses the new `.ua\u002F` otherwise. Because each phase may run in a fresh shell, carry `$UA_DIR` forward like `$PROJECT_ROOT`, re-resolving it with the line above if a later command block needs it.\n\n**Important:** do **not** assume the plugin root is simply two directories above the skill path string. In many installations `~\u002F.agents\u002Fskills\u002Funderstand-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.\n\nResolve the plugin root like this:\n\n```bash\nSKILL_REAL=$(realpath ~\u002F.agents\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || readlink -f ~\u002F.agents\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || echo \"\")\nSELF_RELATIVE=$([ -n \"$SKILL_REAL\" ] && cd \"$SKILL_REAL\u002F..\u002F..\" 2>\u002Fdev\u002Fnull && pwd || echo \"\")\nCOPILOT_SKILL_REAL=$(realpath ~\u002F.copilot\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || readlink -f ~\u002F.copilot\u002Fskills\u002Funderstand-domain 2>\u002Fdev\u002Fnull || echo \"\")\nCOPILOT_SELF_RELATIVE=$([ -n \"$COPILOT_SKILL_REAL\" ] && cd \"$COPILOT_SKILL_REAL\u002F..\u002F..\" 2>\u002Fdev\u002Fnull && pwd || echo \"\")\n\nPLUGIN_ROOT=\"\"\nfor candidate in \\\n  \"${CLAUDE_PLUGIN_ROOT}\" \\\n  \"$HOME\u002F.understand-anything-plugin\" \\\n  \"$SELF_RELATIVE\" \\\n  \"$COPILOT_SELF_RELATIVE\" \\\n  \"$HOME\u002F.codex\u002Funderstand-anything\u002Funderstand-anything-plugin\" \\\n  \"$HOME\u002F.opencode\u002Funderstand-anything\u002Funderstand-anything-plugin\" \\\n  \"$HOME\u002F.pi\u002Funderstand-anything\u002Funderstand-anything-plugin\" \\\n  \"$HOME\u002Funderstand-anything\u002Funderstand-anything-plugin\"; do\n  if [ -n \"$candidate\" ] && [ -f \"$candidate\u002Fpackage.json\" ] && [ -f \"$candidate\u002Fpnpm-workspace.yaml\" ]; then\n    PLUGIN_ROOT=\"$candidate\"\n    break\n  fi\ndone\n\nif [ -z \"$PLUGIN_ROOT\" ]; then\n  echo \"Error: Cannot find the understand-anything plugin root.\"\n  echo \"Checked:\"\n  echo \"  - ${CLAUDE_PLUGIN_ROOT:-\u003Cunset CLAUDE_PLUGIN_ROOT>}\"\n  echo \"  - $HOME\u002F.understand-anything-plugin\"\n  echo \"  - ${SELF_RELATIVE:-\u003Cunresolved path derived from ~\u002F.agents\u002Fskills\u002Funderstand-domain>}\"\n  echo \"  - ${COPILOT_SELF_RELATIVE:-\u003Cunresolved path derived from ~\u002F.copilot\u002Fskills\u002Funderstand-domain>}\"\n  echo \"  - $HOME\u002F.codex\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"  - $HOME\u002F.opencode\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"  - $HOME\u002F.pi\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"  - $HOME\u002Funderstand-anything\u002Funderstand-anything-plugin\"\n  echo \"Make sure the plugin is installed correctly.\"\n  exit 1\nfi\n```\n\nUse `$PLUGIN_ROOT` for every reference to agent definitions in subsequent phases.\n\n### Phase 1: Detect Existing Graph\n\n1. Check if `$UA_DIR\u002Fknowledge-graph.json` exists\n2. If it exists AND `--full` was NOT passed, check freshness before deriving from it:\n   - Read `project.gitCommitHash` from the graph metadata as `GRAPH_COMMIT_RAW`. Change to `$PROJECT_ROOT`, resolve it as a commit before using it in any Git diff, compare the resolved commit with `git rev-parse HEAD`, and inspect project-scoped committed and working-tree changes:\n     ```bash\n     GRAPH_COMMIT=$(git rev-parse --verify --end-of-options \"${GRAPH_COMMIT_RAW}^{commit}\" 2>\u002Fdev\u002Fnull)\n     git rev-parse HEAD\n     git diff --name-only \"$GRAPH_COMMIT\" HEAD -- .\n     git diff --cached --name-only -- .\n     git diff --name-only -- .\n     git ls-files --others --exclude-standard -- .\n     ```\n   - The `-- .` pathspec is required: commits that only touch a sibling monorepo project must not make this graph stale. A hash mismatch alone is not stale when the project diff is empty.\n   - Ignore the selected data directory (`.ua\u002F` or legacy `.understand-anything\u002F`) in every command's output because it contains generated graph artifacts, not project source drift.\n   - If the committed diff or any working-tree command reports project files, warn that domain extraction may omit those changes. Suggest: Run `\u002Funderstand` to refresh the knowledge graph.\n   - Run the commit diff only when `GRAPH_COMMIT_RAW` resolves successfully. If the graph commit or Git metadata is missing, invalid, or unavailable, give a brief best-effort warning and continue instead of blocking.\n3. After that preflight, proceed to Phase 3 (derive from graph).\n4. Otherwise, proceed to Phase 2 (lightweight scan). When `--full` is used, skip this preflight because the command performs a fresh scan instead of consuming the existing graph.\n\n### Phase 2: Lightweight Scan (Path 1)\n\nThe preprocessing script does NOT produce a domain graph — it produces **raw material** (file tree, entry points, exports\u002Fimports) 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.\n\n1. Run the preprocessing script bundled with this skill, passing `$PROJECT_ROOT` from Phase 0:\n   ```\n   python .\u002Fextract-domain-context.py \"$PROJECT_ROOT\"\n   ```\n   This outputs `$UA_DIR\u002Fintermediate\u002Fdomain-context.json` containing:\n   - File tree (respecting `.gitignore`)\n   - Detected entry points (HTTP routes, CLI commands, event handlers, cron jobs, exported handlers)\n   - File signatures (exports, imports per file)\n   - Code snippets for each entry point (signature + first few lines)\n   - Project metadata (package.json, README, etc.)\n2. Read the generated `domain-context.json` as context for Phase 4\n3. Proceed to Phase 4\n\n### Phase 3: Derive from Existing Graph (Path 2)\n\n1. Read `$UA_DIR\u002Fknowledge-graph.json`\n2. Format the graph data as structured context:\n   - All nodes with their types, names, summaries, and tags\n   - All edges with their types (especially `calls`, `imports`, `contains`)\n   - All layers with their descriptions\n   - Tour steps if available\n3. This is the context for the domain analyzer — no file reading needed\n4. Proceed to Phase 4\n\n### Phase 4: Domain Analysis\n\n1. Read the domain-analyzer agent prompt from `$PLUGIN_ROOT\u002Fagents\u002Fdomain-analyzer.md`\n2. Dispatch a subagent with the domain-analyzer prompt + the context from Phase 2 or 3\n3. The agent writes its output to `$UA_DIR\u002Fintermediate\u002Fdomain-analysis.json`\n\n### Phase 5: Validate and Save\n\n1. Read the domain analysis output\n2. Validate using the standard graph validation pipeline (the schema now supports domain\u002Fflow\u002Fstep types)\n3. If validation fails, log warnings but save what's valid (error tolerance)\n4. Save to `$UA_DIR\u002Fdomain-graph.json`\n5. Clean up `$UA_DIR\u002Fintermediate\u002Fdomain-analysis.json` and `$UA_DIR\u002Fintermediate\u002Fdomain-context.json`\n\n### Phase 6: Launch Dashboard\n\n1. Auto-trigger `\u002Funderstand-dashboard` to visualize the domain graph\n2. The dashboard will detect `domain-graph.json` and show the domain view by default\n",{"name":5,"description":7,"argument-hint":24},"[--full]","main","fa33bab5e066f61f678d15d8654b7f16fcb5aef0",".agents\u002Fskills\u002Funderstand-domain","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr","https:\u002F\u002Fgithub.com\u002Flonghang2004","https:\u002F\u002Flonghang2004.github.io\u002Fportfolio-website\u002F","2026-10-17 00:52:25",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add longhang2004\u002FTenvyr --skill understand-domain",{"tool":38,"command":39},"bunx","bunx skills add longhang2004\u002FTenvyr --skill understand-domain",{"tool":41,"command":42},"pnpm","pnpm dlx skills add longhang2004\u002FTenvyr --skill understand-domain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Funderstand-domain\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"extract-domain-context.py","SCRIPT","脚本",16273,"https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Funderstand-domain\u002Fextract-domain-context.py",[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M75368XG3WHG7S884RH1FQEG","wowerpoint","Turn one document into a kawaii NotebookLM slide-deck PDF. Use for \"wowerpoint this\", \"make a deck about \u003Cfile>\", \"turn this report into slides\", or any request to render a single document as shareable narrative slides.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fwowerpoint\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7536783K0EKKQ66A56RJ262","what-the","What the? Use when the user wants a plain-English breakdown of something technical — the who, what, where, why, and when.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fwhat-the\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M75362M917THP79D9APYRKTE","weekly-digests","Generate a serial week-by-week narrative digest of a project's full claude-mem timeline. Splits the timeline into per-ISO-week files, then runs one consecutive subagent per week — each receiving the prior week's carry-forward block — to produce one chapter per ISO week of data. Use when asked for \"weekly digests\", \"week-by-week story\", \"serial timeline\", or \"narrative chapters\" of a project's history.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fweekly-digests\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7535ZRATN41PZHPPWZEBM8E","version-bump","Automated semantic versioning and release workflow for Claude Code plugins. Handles version increments across package.json, marketplace.json, plugin.json manifests, build verification, git tagging, GitHub releases, and changelog generation. NPM publishing (so `npx claude-mem@X.Y.Z` resolves) is handed off to the human maintainer, who raised npm security.","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Fversion-bump\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7535VQDD9MXAYXH6N2E8FFJ","understand","Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Funderstand\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7535T2XNDGZP1GD2AD8VHEW","understand-onboard","Use when you need to generate an onboarding guide for new team members joining a project","https:\u002F\u002Fgithub.com\u002Flonghang2004\u002FTenvyr\u002Fblob\u002Fmain\u002Fskills\u002Funderstand-onboard\u002FSKILL.md",[],[]]