Renders a karpathy-graph as an interactive HTML explorer, Mermaid diagram for docs/PRs, and a health report. Helps developers understand graph structure, clusters, and provenance.
Ships in karpathy-graph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The graph is machine memory. This is the part humans read.
Agents query subgraphs; a human needs to see the shape — where the clusters are, what is disconnected, which nodes carry the structure, where provenance is thin.
KG="${CLAUDE_PLUGIN_ROOT:-plugins/karpathy-graph}/scripts/kgraph.py"
python3 "$KG" --name "<graph>" render
Three artifacts, one command:
| File | For | Notes |
|---|---|---|
graph.html | exploring | self-contained, no network, no dependencies |
graph.mmd | docs and PRs | Mermaid; renders on GitHub |
REPORT.md | reviewing | health, composition, violations |
Run this after every build. A stale graph.html is worse than none — a
human will trust it.
Open it directly in a browser:
open ./.karpathy-graphs/<slug>/graph.html # macOS
xdg-open ./.karpathy-graphs/<slug>/graph.html # Linux
It embeds the graph data inline, so it works offline and can be attached to an issue or emailed.
What it does:
Labels are shown for the highest-degree nodes only. Labelling all of them turns a mid-size graph into unreadable overlapping text; hover or click for the rest.
graph.mmd drops straight into markdown:
```mermaid
graph LR
ent_0269238d2ffa["Entity: Vendor X"]
cla_f9ab59811007["Claim: Vendor X supplied Component Z"]
cla_f9ab59811007 -->|MENTIONS| ent_0269238d2ffa
```
It caps at 120 nodes and says so in a comment when it truncates. Past that, Mermaid becomes unreadable anyway — use a filtered subgraph:
python3 "$KG" --name "<graph>" query "<focus>" --hops 2 --format triples
Teach the user what they are looking at. The visual is diagnostic, not decorative.
| What you see | What it means |
|---|---|
| A few large hubs | healthy — those are the entities the domain turns on |
| Many small islands | fragmented corpus, or resolution is under-merging |
| One dense blob | possible over-merging — inspect the merges |
| Scattered dots, no edges | extraction produced entities but missed relations |
Green Source nodes barely connected | claims are not being tied to evidence |
| Red violations pill | a malformed write — fix before sharing |
One connected component is not the goal. A connected but false graph is worse than an honest fragmented one.
Give them the path, the shape, and the caveat:
Graph at
./.karpathy-graphs/payments-incident/40 nodes, 49 edges, 2 components, 0 invariant violations. Opengraph.html— the hubs are Knowledge Graph and Entity Resolution. The second component is the five planes, which nothing links to the incident corpus yet: no document mentions both.
That last sentence is the useful one. Say what the picture reveals is missing, not just what it contains.
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/karpathy-graph-buildStage 3 of the karpathy-graph pipeline, and the end-to-end entry point. Create a graph, assemble validated writes with provenance, and produce the machine and human artifacts. Use when the user asks to build or create a knowledge graph from a context, to add facts to an existing graph, or when running the whole extract-resolve-assemble-query pipeline in one go./karpathy-graph-evaluateStage 5 of the karpathy-graph pipeline. Score graph quality across extraction, resolution, structure, query, and operations, and run a ratchet loop that keeps only changes which improve the metric. Use when the user asks how good the graph is, wants to tune extraction prompts or the ontology, asks to measure or improve graph quality, or wants to detect resolution regressions./karpathy-graph-extract/karpathy-graph:karpathy-graph-visualizefrom karpathy-graph
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin karpathy-graphOther plugins' skills for the same job