# /understand: Map a whole codebase into a searchable knowledge graph

Source: https://trendhub.net/skills/egonex-ai-understand-anything/understand
Skill folder: https://github.com/Egonex-AI/Understand-Anything/tree/main/understand-anything-plugin/skills/understand
Pack: Understand Anything (https://trendhub.net/skills/egonex-ai-understand-anything)
Works with: Claude Code, Codex, Gemini CLI, OpenCode, Cline, Kiro, Trae and other agents (macOS/Linux), Windows (PowerShell), VS Code + GitHub Copilot, Copilot CLI, Devin

The understand skill runs a staged pipeline that turns a project into a knowledge graph saved as .ua/knowledge-graph.json. Tree-sitter extracts structure, subagents write summaries, layers and a dependency-ordered tour, and validation checks the result before saving. Later runs update only files with structural changes, and the dashboard opens when the graph passes validation.

## When to use it

- You have joined a project and need a map of its architecture before reading code.
- You want a graph your team can commit so others skip the analysis.
- You want the graph refreshed automatically after each commit.

## How it works

1. **Pre-flight**: The agent resolves the project root, redirects output out of temporary git worktrees, builds the plugin core if needed and decides between a full, incremental or review-only run.
2. **Scan and batch**: It writes a starter .understandignore for you to confirm, inventories files with categories and imports, warns above 100 files and groups files into batches.
3. **Analyse in parallel**: It dispatches up to five file-analyzer subagents at a time, then merges, normalises and deduplicates their nodes and edges with bundled scripts.
4. **Layers and tour**: Separate agents assign architectural layers and write a guided tour plus per-file code lessons, with language and framework notes injected into their prompts.
5. **Validate and save**: It checks graph integrity, or runs a full LLM review with --review, writes fingerprints and metadata for incremental updates, and reports what it built.

## What it steers the agent away from

- Re-analysing an unchanged project and spending tokens for nothing
- Losing the graph when the agent works inside a disposable worktree
- Silently dropping failed phases instead of reporting them

## What it can touch

Reads the whole project, runs git, pnpm, Node and Python scripts, dispatches subagents, writes under .ua/ and can enable a post-commit hook with --auto-update.

## Pairs well with

- `/understand-chat`
- `/understand-dashboard`
- `/understand-diff`

## Questions

### Can I limit it to part of a monorepo?

Yes. Pass a subdirectory path, or use --exclude with glob patterns that take priority over the ignore file.

### Can the summaries be in another language?

Yes. --language sets the language for summaries, tour text and dashboard labels, and the choice is stored for later runs.
