Skip to content
Skillpedia
General coding87k Β· #1364

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.md

Copy 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

Use this skill to help me: https://github.com/Egonex-AI/Understand-Anything/blob/main/understand-anything-plugin/skills/understand-chat/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

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

  1. 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.
  2. 2Run /understand first. It creates the knowledge map. Without that file, /understand-chat only tells you to run /understand.
  3. 3Check that a .ua folder, or the older .understand-anything folder, now exists in your project root with knowledge-graph.json inside.
  4. 4Run /understand-chat followed by your question, for example: /understand-chat how are payments processed?
  5. 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

  1. Use Grep to search within the JSON for relevant entries BEFORE reading the full file
  2. Only read sections you need β€” don't dump the entire graph into context
  3. Node names and summaries are the most useful fields for understanding
  4. Edges tell you how components connect β€” follow imports and calls for dependency chains

Instructions

  1. Resolve the data directory $UA_DIR. Run UA_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.json exists in the current project root. If not, tell the user to run /understand first.

  2. Check graph freshness before using graph-derived context:

    • Read project.gitCommitHash from the graph metadata as GRAPH_COMMIT_RAW. Resolve it as a commit before using it in any Git diff, then compare it with git rev-parse HEAD and 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 /understand to refresh the graph.
    • 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.
  3. 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).

  4. 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 id values of all matching nodes
  5. Find connected edges β€” for each matched node ID, Grep for that ID in the edges section 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
  6. Read layer context β€” Grep for "layers" to understand which architectural layers the matched nodes belong to.

  7. 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

repo: Egonex-AI/Understand-Anything

Popularity

GitHub stars
87k
Ranking position
#1364
License
MIT
Updated
10/12/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills