Understand Anything: Turn Any Codebase Into an Interactive Knowledge Graph
You’ve just been dropped into a 200,000-line codebase. No documentation. The team is busy. Where do you start?
This is the problem Understand-Anything is built for. It’s a Claude Code plugin — also works with OpenClaw, Codex, Cursor, and Antigravity — that runs a multi-agent analysis pipeline over any project, builds a knowledge graph of every file, function, class, and dependency, then surfaces an interactive dashboard you can actually explore.
2,230 GitHub stars. Updated today. The support, per the author, “has been incredible.”
The Core Idea
AI coding agents are good at files. They’re bad at codebases.
Give an agent a function to fix and it does well. Ask it “how does authentication flow through this system?” and it starts reading files one by one, burning context, losing track. By the time it has enough context to answer, the context window is half full and it’s starting to forget what it read first.
Understand-Anything sidesteps this by front-loading the analysis. One command builds a complete structural map:
/understand
Five specialized agents run:
| Agent | What it does |
|---|---|
project-scanner | File discovery, language and framework detection |
file-analyzer | Extracts functions, classes, imports; builds graph nodes and edges (3 in parallel) |
architecture-analyzer | Groups code into layers: API, Service, Data, UI, Utility |
tour-builder | Generates guided learning paths ordered by dependency |
graph-reviewer | Validates completeness and referential integrity |
The output: .understand-anything/knowledge-graph.json — a structured map of your entire project.
The Dashboard
Once the graph is built, open the visual dashboard:
/understand-dashboard
A React app (React Flow + TailwindCSS) opens with your codebase as an interactive node graph. Every file, function, and class is a node. Dependencies are edges. Nodes are color-coded by architectural layer. Click any node to see its code, its relationships, and a plain-English explanation of what it does and why it exists.
Three things stand out:
Guided tours. The tour-builder agent generates ordered walkthroughs — architecture in dependency order, so you learn the foundation layers before the layers that depend on them. Think of it as auto-generated onboarding documentation that’s actually accurate because it was generated from the real code.
Semantic search. Ask “which parts handle auth?” and get relevant nodes across the graph, ranked by semantic relevance. Not grep. Not file-by-file reading. The graph knows what things mean, not just what they’re named.
Diff impact analysis. /understand-diff overlays your current git changes onto the graph and shows you the ripple — what other parts of the system depend on what you modified. Before you commit, not after.
The Skills
Five slash commands cover the main workflows:
/understand # Build (or update) the knowledge graph
/understand-dashboard # Open the visual explorer
/understand-chat How does the payment flow work? # Ask anything
/understand-explain src/auth/login.ts # Deep-dive a file or function
/understand-onboard # Generate an onboarding guide for new team members
/understand-diff # Impact analysis of current changes
/understand-chat is where the AI usefulness compounds. The agent answers questions about your codebase with the full knowledge graph as context — not a 200K context window of raw code, but a structured graph of what connects to what. It can explain why an abstraction exists, trace data flow across layers, and identify which module is responsible for a given behavior.
Multi-Platform Install
The plugin works across every major AI coding platform:
Claude Code (native):
/plugin marketplace add Lum1104/Understand-Anything
/plugin install understand-anything
OpenClaw — tell it:
Fetch and follow instructions from:
https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/.openclaw/INSTALL.md
Codex — tell it:
Fetch and follow instructions from:
https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/.codex/INSTALL.md
Cursor auto-discovers it via .cursor-plugin/plugin.json when the repo is cloned. No manual steps.
OpenCode: add to opencode.json:
{
"plugin": ["understand-anything@git+https://github.com/Lum1104/Understand-Anything.git"]
}
How It Compares to SocratiCode
Both tools address codebase context — from different angles.
SocratiCode is an MCP server that builds a semantic + BM25 hybrid search index. Its job is to reduce AI token consumption during active coding: 61% fewer context tokens, 84% fewer tool calls on VS Code’s 2.45M line codebase. It’s infrastructure for AI assistants — they query it silently during every task.
Understand-Anything is for exploration and onboarding. It builds a visual, navigable knowledge graph. Its job is to help humans and AI understand the architecture of an unfamiliar codebase — not optimize ongoing coding tasks, but answer “what is this thing and how does it fit together?”
They’re complementary. SocratiCode runs in the background making every AI coding session faster. Understand-Anything runs when you join a new project, audit a legacy codebase, or need to explain the architecture to a new team member. Both eliminate the file-by-file reading loop — just at different stages of the workflow.
The context rot problem — where AI agents degrade as their context window fills — is what both tools are ultimately fighting. Understand-Anything solves it by structural pre-loading. SocratiCode solves it by retrieval efficiency. Your codebase probably needs both.
Related: SocratiCode — semantic codebase search for AI assistants · Solving context rot — GSD, BMAD, Taskmaster compared