understand-chat
What it does
This tool helps you understand a code project. It uses a knowledge map to answer questions about files, functions, and how everything is connected.
When to use it
- βWhen you don't understand a specific piece of code.
- βTo see how different parts of the project relate to each other.
- βTo get a quick summary of what a file or function does.
Skill link
https://github.com/Egonex-AI/Understand-Anything/blob/main/understand-anything-plugin/skills/understand-chat/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βExplain the 'calculate_total' function in the 'utils.py' file.β
5 new skills a week. 1 minute to read.
understand-chat: full guide
Opening an unfamiliar project is slow. You do not know where things live, which file calls which, or why a folder exists. You can ask an AI agent, but it may skim a few files and guess. This skill gives the agent a map to work from instead.
The map is a file called knowledge-graph.json. It lists the files, functions and other parts of your project, with a short summary of each and the links between them. When you ask a question, the agent searches that file and answers from the matching parts. It does not read the whole project. The skill does not build the map. A separate /understand command does that first. It suits new team members, people who inherit someone else's code, and anyone who needs to follow how parts connect.
Use cases
Joining a project in week one
You start a new job and the codebase has 400 files. You ask which part handles user login and what it depends on. The agent names the matching files, shows what they import, and says which layer of the app they sit in. You then know where to start reading.
Checking impact before a change
You plan to rename a helper function used for invoices. You ask what calls it. The agent follows the links in the map and lists the callers it finds, so you can see how far the change may reach before you touch anything.
Making sense of a non-code folder
The map also covers settings files, documents, database tables and API endpoints. You ask which config file sets up the deployment, and what it affects. The agent answers from those entries, so you can follow how the project is wired, not only how the code reads.
Step by step
- 1Install the skill by placing its folder in ~/.claude/skills/understand-chat/ (or the project's .claude/skills/), then open your agent inside your project folder.
- 2Run /understand first. It creates the knowledge map. Without that file, /understand-chat only tells you to run /understand.
- 3Check that a .ua folder, or the older .understand-anything folder, now exists in your project root with knowledge-graph.json inside.
- 4Run /understand-chat followed by your question, for example: /understand-chat how are payments processed?
- 5Read the answer, then ask a follow-up about one file or function it named to go one level deeper.
Example
What to ask
β/understand-chat which files are involved when a customer resets their password?β
What you get
The agent finds the entries matching "password" and "reset", then lists the related files and functions with their summaries. It shows which ones call each other, names the layer they belong to (for example the API layer), and points to the exact file paths to open first.
Tips
- βUse words that appear in your code, such as function names or file names. The search matches names, summaries and tags, so "login" works better than a vague phrase like "the sign-in thing".
- βThe map is a snapshot. After big changes, run /understand again, or answers may miss new files. The skill warns you when it detects changes, but the check is best effort.
- βThe skill searches the map only. It does not run your code or read every file, so for exact line-level behaviour, open the file it points you to.
Alternatives
- graphify
Pick it when you want to turn a folder of mixed files, not only code, into a graph and ask how things connect.
- commit-archaeologist
Pick it when your question is why a piece of code exists, since it reads the git history to show who added it and when.
- code-review
Pick it when you want your changes checked against your repo's standards and the original spec, not explained.
Questions and answers
Do I need to know how to code to use it?
You can ask in plain words, but you need a project folder and the agent running inside it. The answers refer to file names and functions, so some basic familiarity with the project helps you use them.
Where does the knowledge map get saved?
It is saved in the project root as .ua/knowledge-graph.json, or in the older .understand-anything folder if that one already exists. These are generated files, so they are ignored when the skill checks for source changes.
What happens if my question matches nothing?
The skill says so and suggests related terms found in the map. Try again using a name, tag or topic from those suggestions. This usually gets a useful match.
How it works
The tool consults a special file (the knowledge map) that describes the code. It looks for information related to your question and shows how code parts are linked.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
/understand-chat
Answer questions about this codebase using the knowledge graph in the project's data directory (.ua/knowledge-graph.json, or the legacy .understand-anything/knowledge-graph.json when that directory is present).
Graph Structure Reference
The knowledge graph JSON has this structure:
projectβ {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 directory
$UA_DIR. RunUA_DIR=$([ -d .understand-anything ] && echo .understand-anything || echo .ua)β this is the legacy.understand-anything/when it already exists, otherwise the new.ua/. Check that$UA_DIR/knowledge-graph.jsonexists in the current project root. If not, tell the user to run/understandfirst.Check graph freshness before using graph-derived context:
- Read
project.gitCommitHashfrom the graph metadata asGRAPH_COMMIT_RAW. Resolve it as a commit before using it in any Git diff, then compare it withgit rev-parse HEADand inspect project-scoped committed and working-tree changes from the project root:GRAPH_COMMIT=$(git rev-parse --verify --end-of-options "${GRAPH_COMMIT_RAW}^{commit}" 2>/dev/null) git rev-parse HEAD git diff --name-only "$GRAPH_COMMIT" HEAD -- . git diff --cached --name-only -- . git diff --name-only -- . git 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. - Ignore the selected data directory (
.ua/or legacy.understand-anything/) in every command's output because it contains generated graph artifacts, not project source drift. - 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. - Run the commit diff 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
Read project metadata only β use Grep or Read with a line limit to extract just the
"project"section from the top of the file for context (name, description, languages, frameworks).Search for relevant nodes β use Grep to search the knowledge graph file for 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
β¦
FAQ
What is a 'knowledge map'?
It's a file containing organized information about the code, like file names, functions, what they do, and how they link together.
What if the knowledge map is outdated?
The tool might warn you that the code has changed since the map was created and suggest you update it.
How does the tool find information?
It searches for keywords from your question in the names, descriptions, and tags within the knowledge map and follows the connections between code parts.
Details
Original description by the author
Use when you need to ask questions about a codebase or understand code using a knowledge graph
Popularity
- GitHub stars
- 87k
- Ranking position
- #1364
- License
- MIT
- Updated
- 10/12/2026
Comments
- β¦
More skills from this repository
understand-dashboard
87kHelps your agent see how a code project is organized. It creates an interactive map to understand the parts and how they connect.
understand-diff
87kLets your agent analyze code changes. It helps understand what was altered, which parts were affected, and the risks.
understand-domain
87kHas your agent extract business knowledge from code. It generates a graph showing the flow of how things work.
understand-explain
87kHelps your agent explain specific code parts. It provides details about a file, function, or module.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.