understand-chat
Use when you need to ask questions about a codebase or understand code using a knowledge graph
Use when you need to analyze git diffs or pull requests to understand what changed, affected components, and risks
$ npx -y skills add Egonex-AI/Understand-Anything --skill understand-diff --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/understand-diffContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when you need to analyze git diffs or pull requests to understand what changed, affected components, and risks
name: understand-diff description: Use when you need to analyze git diffs or pull requests to understand what changed, affected components, and risks
Analyze the current code changes against 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).
The knowledge graph JSON has this structure:
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
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. If not, tell the user to run `/understand` first.
2. **Get the changed files list** (do NOT read the graph yet):
3. **Read project metadata and check graph freshness** — use Grep or Read with a line limit to extract the `"project"` section, including `gitCommitHash` as `GRAPH_COMMIT_RAW`, then:
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 -- .4. **Find nodes for changed files** — for each changed file path, use Grep to search the knowledge graph for:
5. **Find connected edges (1-hop)** — for each matched node ID, Grep for that ID in the edges to find:
6. **Identify affected layers** — Grep for the matched node IDs in the `"layers"` section to determine which architectural layers are touched.
7. **Provide structured analysis**:
8. **Write diff overlay for dashboard** — after producing the analysis, write the diff data to `$UA_DIR/diff-overlay.json` so the dashboard can visualize changed and affected components. The file contains:
{
"version": "1.0.0",
"baseBranch": "<the base branch used>",
"generatedAt": "<ISO timestamp>",
"changedFiles": ["<list of changed file paths>"],
"changedNodeIds": ["<node IDs from step 4>"],
"affectedNodeIds": ["<node IDs from step 5, excluding changedNodeIds>"]
}After writing, tell the user they can run `/understand-anything:understand-dashboard` to see the diff overlay visually.
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Repo: Egonex-AI/Understand-Anything
Use when you need to ask questions about a codebase or understand code using a knowledge graph
Launch the interactive web dashboard to visualize a codebase's knowledge graph
Extract business domain knowledge from a codebase and generate an interactive domain flow graph. Works standalone (lightweight scan) or derives from an…
Use when you need a deep-dive explanation of a specific file, function, or module in the codebase
Analyze a Figma file via the Figma REST API and generate an interactive design knowledge graph (pages, screens, components, component sets, instances, design…
Analyze a Karpathy-pattern LLM wiki knowledge base and generate an interactive knowledge graph with entity extraction, implicit relationships, and topic…