understand-chat
Skill1 starsChanged 5 days agoMITView on GitHub
Answer questions about a codebase from its Understand map (the knowledge graph /understand saved in ~/.claude/understand). Use when the user types /understand-chat, or asks to answer a question about a codebase using its knowledge graph.
5 other projects use a version of this, 5 of them edited.
Adopted by
Most recently taken up by
- zhengyanxiong/skillsedited, first seen Nov 29, 2026
- pwizzang/claude-skillsedited, first seen Nov 16, 2026
- Pdbjork/hermosskills-siteedited, first seen Jul 8, 2026
- MovGP0/Skillsedited, first seen Jun 30, 2026
- karanmrn/claude-skillsedited, first seen Jun 28, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- MovGP0/Skills★ 174% same
- zhengyanxiong/skills★ 174% same
- karanmrn/claude-skills★ 074% same
- Pdbjork/hermosskills-site★ 074% same
- pwizzang/claude-skills★ 074% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- godeyeSkill
- understand-dashboardSkill
- understand-diffSkill
- understand-domainSkill
- understand-explainSkill
- understand-figmaSkill
- understand-knowledgeSkill
- understand-onboardSkill
- understandSkill
The file
We split this skill into the rules it gives an agent
9 rules. 3 are common, 1 is distinctive, and 5 are very specific to this project.
3
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 30
Use Grep to search within the JSON for relevant entries BEFORE reading the full file
- Common: line 31
Only read sections you need.
- Very specific: line 73
If the committed diff or any working-tree command reports project files, warn before answering that graph-derived context may omit those …
- Distinctive: line 83
Never read the guide file yourself or paste its text.
- Very specific: line 85
Search for relevant nodes: use Grep to search $DATA/knowledge-graph.json for the user's query keywords: "$ARGUMENTS"
- Very specific: line 86
Search "name" fields: grep -i "query_keyword" in the graph file
- Very specific: line 87
Search "summary" fields for semantic matches
- Very specific: line 88
Search "tags" arrays for topic matches
- Common: line 102
If the query doesn't match any nodes, say so and suggest related terms from the graph
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/understand-chat
Answer questions about this codebase using the knowledge graph in the project's data folder $DATA (~/.claude/understand/<key>/knowledge-graph.json, made by /understand and resolved in step 1). The map is shown on the Understand page of claude-dashboard (http://127.0.0.1:3737/understand).
Nothing is written inside the project. Adapted from Understand Anything's /understand-chat skill (MIT, see {{CLAUDE_DASHBOARD}}/src/understand/LICENSE-understand-anything).
Graph Structure Reference
The knowledge graph JSON has this structure:
kind(optional, top level):"knowledge"for a wiki map (/understand-knowledge),"design"for a Figma map; absent or anything else is a code mapproject: {name, description, languages, frameworks, analyzedAt, gitCommitHash}nodes[]: each has {id, type, name, filePath?, summary, tags[], complexity, languageNotes?}- Code node types: file, function, class, module, concept
- Non-code node types: config, document, service, table, endpoint, pipeline, schema, resource
- Domain/knowledge node types: domain, flow, step, article, entity, topic, claim, source
- IDs use the node type as prefix, e.g.
file:path,function:path:name,config:path,article:path
edges[]: each has {source, target, type, direction, weight}- Key types: imports, contains, calls, depends_on, configures, documents, deploys, triggers, contains_flow, flow_step, related, cites
layers[]: each has {id, name, description, nodeIds[]}tour[]: each has {order, title, description, nodeIds[]}
How to Read Efficiently
- Use Grep to search within the JSON for relevant entries BEFORE reading the full file
- Only read sections you need; don't dump the entire graph into context
- Node names and summaries are the most useful fields for understanding
- Edges tell you how components connect; follow imports and calls for dependency chains
Instructions
- Resolve the data folder
$DATA. The map is not inside the project:/understandsaves it in~/.claude/understand/<key>/, keyed by the project's real path. Run this from the project root (the current working directory). Like/understand, it redirects a git worktree to its main checkout, whose map the worktree shares (setUNDERSTAND_NO_WORKTREE_REDIRECT=1to keep the worktree itself):PROJECT_ROOT=$(pwd -P) COMMON_DIR=$(git -C "$PROJECT_ROOT" rev-parse --git-common-dir 2>/dev/null) OWN_GIT_DIR=$(git -C "$PROJECT_ROOT" rev-parse --git-dir 2>/dev/null) if [ -n "$COMMON_DIR" ] && [ -n "$OWN_GIT_DIR" ]; then COMMON_ABS=$(cd "$PROJECT_ROOT" && cd "$COMMON_DIR" 2>/dev/null && pwd -P) OWN_ABS=$(cd "$PROJECT_ROOT" && cd "$OWN_GIT_DIR" 2>/dev/null && pwd -P) if [ -n "$COMMON_ABS" ] && [ "$COMMON_ABS" != "$OWN_ABS" ]; then MAIN_ROOT=$(dirname "$COMMON_ABS") if [ -d "$MAIN_ROOT" ] && [ "${UNDERSTAND_NO_WORKTREE_REDIRECT:-0}" != "1" ]; then echo "[understand] Detected git worktree at $PROJECT_ROOT" echo "[understand] Using the main repo's map: $MAIN_ROOT" PROJECT_ROOT="$MAIN_ROOT" fi fi fi node {{CLAUDE_DASHBOARD}}/src/understand/scripts/data-dir.mjs "$PROJECT_ROOT" \ | node -e 'const fs=require("fs"),j=JSON.parse(fs.readFileSync(0,"utf8")),f=j.dataDir+"/knowledge-graph.json";let g=null;try{g=JSON.parse(fs.readFileSync(f,"utf8"))}catch{}console.log("DATA="+j.dataDir);console.log("KEY="+j.key);console.log("PROJECT_ROOT="+j.projectRoot);console.log("GRAPH="+(g?f:fs.existsSync(f)?"unreadable":"missing"));if(g){const p=g.project||{};console.log("KIND="+(g.kind||"code"));console.log("GRAPH_COMMIT_RAW="+(p.gitCommitHash||""));console.log("PROJECT="+JSON.stringify({name:p.name,description:p.description,languages:p.languages,frameworks:p.frameworks,analyzedAt:p.analyzedAt,nodes:(g.nodes||[]).length,edges:(g.edges||[]).length,layers:(g.layers||[]).length,tour:(g.tour||[]).length}))}'data-dir.mjsprints one JSON line{"key","dataDir","projectRoot"}(it creates the empty folder when the project has none yet); thenode -epart parses it and peeks at the map. If the command fails, report its stderr and STOP. Carry the printed values forward and substitute them in later commands, which may run in a fresh shell:$DATA,$KEY(for the page link),PROJECT_ROOT(the real path the map is keyed by),KIND,GRAPH_COMMIT_RAWandPROJECT. IfGRAPHismissingorunreadable, tell the user to run/understandfirst and STOP. - Check graph freshness before using graph-derived context:
GRAPH_COMMIT_RAW(from step 1) isproject.gitCommitHashfrom the graph metadata. Resolve it as a commit before using it in any Git diff, then compare it withHEADand inspect project-scoped committed and working-tree changes of the project root:PROJECT_ROOT="<PROJECT_ROOT>"; GRAPH_COMMIT_RAW="<GRAPH_COMMIT_RAW>" GRAPH_COMMIT=$(git -C "$PROJECT_ROOT" rev-parse --verify --end-of-options "${GRAPH_COMMIT_RAW}^{commit}" 2>/dev/null) echo "graph commit: ${GRAPH_COMMIT:-unresolved}" echo "HEAD: $(git -C "$PROJECT_ROOT" rev-parse --verify -q HEAD || echo unavailable)" if [ -n "$GRAPH_COMMIT" ]; then echo "--- committed since the graph:"; git -C "$PROJECT_ROOT" diff --name-only "$GRAPH_COMMIT" HEAD -- .; fi echo "--- staged:"; git -C "$PROJECT_ROOT" diff --cached --name-only -- . echo "--- unstaged:"; git -C "$PROJECT_ROOT" diff --name-only -- . echo "--- untracked:"; git -C "$PROJECT_ROOT" ls-files --others --exclude-standard -- .- 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. - The map lives outside the project, so every file these commands list is project source drift; there is no generated data folder to ignore.
- If the committed diff or any working-tree command reports project files, warn before answering that graph-derived context may omit those changes. Suggest: Run
/understandto refresh the graph. - The commit diff runs only when
GRAPH_COMMIT_RAWresolves successfully. If the graph commit or Git metadata is missing, invalid, or unavailable, give a brief best-effort warning and continue instead of blocking.
Read project metadata only: the
PROJECTline from step 1 already holds the"project"section (name, description, languages, frameworks) plus the node, edge, layer and tour counts. Never read the whole file.Wiki maps. If
KINDisknowledge(a wiki map made by/understand-knowledge, with articles, entities, topics, claims and sources instead of files and functions), the knowledge-graph guide answers instead of steps 4 to 7. Call the Agent tool withsubagent_type: "general-purpose",description: "understand-chat: knowledge-graph-guide", and apromptthat starts with the lineRead ~/.claude/skills/understand/agents/knowledge-graph-guide.md completely and follow it as your instructions., followed by these inputs, with the values substituted:Map:
$DATA/knowledge-graph.json(metadata in$DATA/meta.json). Wiki root:$PROJECT_ROOT. Question: "$ARGUMENTS" Answer the question from this map. Grep the map first and never load the whole file. Match node names, summaries and tags, follow the matched nodes' 1-hop edges in both directions, say which layers (index categories) they belong to and why, and cite article file paths. If nothing matches, say so and suggest related terms from the map. Reply with the answer only.Never read the guide file yourself or paste its text. Give the freshness warning from step 2 first, then the guide's answer, then go to step 8.
- Search for relevant nodes: use Grep to search
$DATA/knowledge-graph.jsonfor the user's query keywords: "$ARGUMENTS"- Search
"name"fields:grep -i "query_keyword"in the graph file - Search
"summary"fields for semantic matches - Search
"tags"arrays for topic matches - Note the
idvalues of all matching nodes
- Search
- Find connected edges: for each matched node ID, Grep for that ID in the
edgessection to find:- What it imports or depends on (downstream)
- What calls or imports it (upstream)
- This gives you the 1-hop subgraph around the query
- Read layer context: Grep for
"layers"to understand which architectural layers the matched nodes belong to. - Answer the query using only the relevant subgraph:
- Reference specific files, functions, and relationships from the graph
- Explain which layer(s) are relevant and why
- Be concise but thorough; link concepts to actual code locations
- If the query doesn't match any nodes, say so and suggest related terms from the graph
- Link the map. End with one line linking the Understand page, focused on the most relevant node:
http://127.0.0.1:3737/understand?project=$KEY&node=<node id, URL-encoded with encodeURIComponent>. When nothing matched, linkhttp://127.0.0.1:3737/understand?project=$KEYinstead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

