[TERMINAL · SKILLS]
> mounting /skills...
> indexing skill manifests...
> linking agents: claude · codex · gemini · cursor
> ready.
[░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%
Use Cases/Build an AI-Powered Codebase Knowledge Graph

Build an AI-Powered Codebase Knowledge Graph

Create a knowledge graph of your codebase with the open-source Understand-Anything plugin, then query, visualize and share it so new developers can learn the architecture without interrupting seniors.

Development#knowledge-graph#codebase-analysis#code-search#architecture#understand-anything
Works with:claude-codeopenai-codexgemini-clicursor

Skills stack · 6 skills

Avg quality 92/100·All SAFE
>

understand-chat

v2.0.0

Answers questions about a codebase from the knowledge graph built by the open-source Understand-Anything plugin, and covers installing the plugin and producing that graph. Use when someone asks "how does checkout work in this repo", "what calls this function", "where is rate limiting handled", "what depends on this module", "run /understand-chat", "set up Understand-Anything", or wants an architecture question answered with file paths and line numbers instead of guesses.

93/100 quality
9.30× impact
SAFE· stale score
View skill
>

understand-dashboard

v2.0.0

Opens the Understand-Anything dashboard for a project's knowledge graph and explains how to read it: layers, search, guided tour, path finder, diff overlay and exports. Use when someone says "open the dashboard", "show me the architecture of this repo", "run /understand-dashboard", "visualize the knowledge graph", "view the graph without Claude Code", "the dashboard asks for an access token", or needs the viewer on a remote machine or a busy port.

93/100 quality
4.10× impact
SAFE· stale score
View skill
>

understand-onboard

v2.0.0

Writes an onboarding guide for someone joining a codebase, built from the knowledge graph of the Understand-Anything plugin and checked against the repository: how to run the project, a map of its layers, a reading route, the files everything depends on and the risky ones. Use when someone says "write an onboarding guide for this repo", "a new developer starts Monday", "run /understand-onboard", "help me get up to speed on this project", "document the architecture for new hires", or wants docs/UA_ONBOARDING.md created or refreshed.

93/100 quality
3.15× impact
SAFE· stale score
View skill
>

understand-diff

v2.0.0

Works out what a branch, pull request or uncommitted change touches and who depends on it, using the knowledge graph built by the Understand-Anything plugin, then writes the overlay file its dashboard highlights. Use when someone says "what does this diff affect", "review the impact of this PR", "what could this change break", "which tests should I run for this branch", "run /understand-diff", "show the blast radius", or wants a risk note on a change before review or merge.

87/100 quality
4.00× impact
SAFE· stale score
View skill
>

graphify

v1.0.0

Turns a folder of code, docs, PDFs and images into a knowledge graph that coding agents can query from the command line instead of re-reading files. Use when a user asks to map a codebase, build a graph of a repo plus its docs, find what depends on a function, trace the path between two concepts, cut the tokens an agent spends exploring a project, or keep a graph updated on every commit. Covers the graphify CLI, graph.json queries, git hooks and agent integration.

93/100 quality
9.30× impact
SAFE
View skill
>

codegraph

v1.0.0

CodeGraph indexes a source tree into a local SQLite knowledge graph of symbols, calls and imports, and serves it to coding agents over MCP and a CLI. Use it when an agent burns tool calls on grep and file reads to understand a codebase, or when you need callers, callees, blast radius or affected tests for a symbol. Covers install, `codegraph init`, query/explore/impact/affected commands, MCP registration, exclusions and troubleshooting. Triggers: "index my repo for the agent", "who calls this function", "what breaks if I change this", "codegraph".

93/100 quality
4.30× impact
SAFE
View skill
$

The Problem

Your codebase has 200,000+ lines of code. New developers take weeks to onboard. Senior devs are constantly interrupted to explain "how X works." Architecture docs go stale the moment they're written. You need a system that understands your code and can answer questions about it automatically.

The Solution

Use the open-source Understand-Anything plugin (MIT licence) through the understand-* skills. Its /understand command parses the project with tree-sitter, has your coding agent describe every file, and saves one JSON file, the knowledge graph, with files, functions, classes, relationships, architectural layers and a guided tour. The other commands read that file: chat with the codebase, open a visual dashboard, check what a change affects, generate an onboarding guide. Commit the graph and teammates can use it without running the analysis again.

Step-by-Step Walkthrough

1. Install the plugin and analyze the project

In Claude Code:

/plugin marketplace add Egonex-AI/Understand-Anything
/plugin install understand-anything
/understand

For Codex, Gemini CLI and other hosts, clone the repository, read install.sh, and run it with the host id (for example ./install.sh codex); the understand-chat skill lists the accepted ids. Building a graph needs Node.js 22+, pnpm 10+ and Python 3.

The graph is saved to .ua/knowledge-graph.json (a project that already has a .understand-anything/ directory keeps using that one). The first run reads the whole codebase with your agent's model and can use a lot of tokens on a large project; later runs only re-analyze changed files. For a big monorepo, scope the run, for example /understand src/frontend.

2. Chat with your codebase

/understand-chat how does authentication work?
/understand-chat what calls the payment service?
/understand-chat which files are most critical to the API layer?

The skill searches the graph for matching nodes, follows edges to connected code, and should confirm in the source before it names a behavior. The graph is an index: summaries and most call edges were written by a model, so ask for file paths and line numbers and check the ones that matter.

3. Open the visual dashboard

/understand-dashboard

This serves a local dashboard on 127.0.0.1 (port 5173 by default) and prints a URL with an access token. It shows architectural layers, search, a node info panel with source preview, a guided tour, a path finder between two nodes and a filter by complexity. The token changes on every start; keep the full URL. To view the graph without an agent, the understand-dashboard skill shows how to run the standalone viewer from the GitHub release after verifying its checksum.

4. Share the graph and keep it fresh

The project README recommends committing the data directory so teammates skip the analysis, except for local scratch files:

gitignore
.ua/intermediate/
.ua/diff-overlay.json

Keep it current with /understand --auto-update. This writes autoUpdate: true to .ua/config.json and uses a post-commit hook to patch the graph incrementally. In Claude Code it reacts to commits the agent makes; commits made elsewhere leave the graph behind until the next /understand. For graphs over 10 MB, track .ua/*.json with git-lfs.

5. Use the graph in onboarding and review

/understand-onboard
/understand-diff

/understand-onboard generates an onboarding guide from the graph; /understand-diff shows which parts of the system your uncommitted changes or a pull request touch, and writes the overlay the dashboard displays with the D key.

Real-World Example

A team maintains a TypeScript monorepo (Next.js, tRPC, Prisma) of about 200k lines. A tech lead runs /understand, reviews the layers it found, and commits .ua/. A new developer clones the repo and runs /understand-chat how does billing work?. The answer traces the flow from the checkout route through the payment service to the Stripe integration, citing path:lines for each step. The developer checks those files, walks the guided tour in the dashboard, and arrives at the first planning meeting already knowing which module owns subscription state.

Related Skills

  • understand-chat -- Ask questions about the codebase, and install the plugin
  • understand-dashboard -- Visual graph explorer
  • understand-onboard -- Generate onboarding guides
  • understand-diff -- Analyze PRs with graph context
  • graphify -- choose it when the corpus mixes code with docs, PDFs and screenshots, or when agents should query a persistent graph.json from the command line instead of chatting through a dashboard
  • codegraph — choose it when the goal is for coding agents to query callers, callees and blast radius from a local MCP/CLI index instead of reading a generated graph or dashboard

Related use cases