karpathy-graph-visualize
/karpathy-graph-visualize
Render a karpathy-graph for humans — an interactive HTML explorer, a Mermaid diagram for docs and PRs, and a health report — then explain what the picture actually shows. Use when the user asks to see, visualize, draw, or open the graph, wants a diagram for documentation, or asks what the graph looks like.
- Author
- andersonlimahw ↗
- Repository
- lemon-ai-hub ↗
- Licence
- MIT
- Last repository change
- 16.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 16.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Render a karpathy-graph for humans — an interactive HTML explorer, a Mermaid diagram for docs and PRs, and a health report — then explain what the picture actually shows. Use when the user asks to see, visualize, draw, or open the graph, wants a diagram for documentation, or asks what the graph looks like.
Original author description
Render a karpathy-graph for humans — an interactive HTML explorer, a Mermaid diagram for docs and PRs, and a health report — then explain what the picture actually shows. Use when the user asks to see, visualize, draw, or open the graph, wants a diagram for documentation, or asks what the graph looks like.
How it works
- Render
- The HTML explorer
- Mermaid
- Reading the picture
- Reporting to the user
SKILL.md preview
---
name: karpathy-graph-visualize
description: Render a karpathy-graph for humans — an interactive HTML explorer, a Mermaid diagram for docs and PRs, and a health report — then explain what the picture actually shows. Use when the user asks to see, visualize, draw, or open the graph, wants a diagram for documentation, or asks what the graph looks like.
metadata:
version: 1.0.0
---
# Visualize
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.
## Render
```bash
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.
## The HTML explorer
Open it directly in a browser:
```bash
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:
- **Header pills** — nodes, edges, components, invariant violations. The
violations pill turns red when non-zero.
- **Force-directed layout** — deterministic, so the same graph renders the same
way twice. Disconnected components are packed rather than flung apart.
- **Node size = degree** — the structural hubs are visually obvious.
- **Node colour = type** — nine types, nine colours.
- **Click a node** — highlights its neighbourhood, dims the rest, and shows
type, id, description, aliases, sources, run id, degree, and every incident
edge with direction.
- **Search** — filters by name, type, or description; edges follow.
- **Type legend** — click to toggle a type off, to see structure without noise.
- **Pan and zoom** — drag, scroll.
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.
## Mermaid
`graph.mmd` drops straight into markdown:
````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:
```bash
python3 "$KG" --name "<graph>" query "<focus>" --hops 2 --format triples
```
## Reading the picture
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.
## Reporting to the user
Give them the path, the shape, and the caveat:
> Graph at `./.karpathy-graphs/payments-incident/`
> 40 nodes, 49 edges, 2 components, 0 invariant violations.
> Open `graph.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.
Versions
The database has no other skills named karpathy-graph-visualize.
Database snapshot: 13.11.2026 · package version 0d6f2ceb66cb (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90graphify
Render the typed knowledge graph (memory/ontology/graph.jsonl) as Mermaid in markdown, or standalone HTML for big graphs. Triggers on "visualize my knowledge graph", "graph my learning". - 90graphify
Render the typed knowledge graph (memory/ontology/graph.jsonl) as Mermaid in markdown, or standalone HTML for big graphs. Triggers on "visualize my knowledge graph", "graph my learning". - 95okf-visualize-bundle
OKF — Render an Open Knowledge Format (OKF) bundle as a single self-contained, interactive HTML graph (viz.html) of its concepts and links. Use when asked to visualize, graph, preview, or explore an OKF bundle. - 100experiment-graph
Render a read-only interactive graph of an experiment pipeline doc: dependencies, status and critical path at a glance. Use when the user wants to see the experiment steps as a graph, or says 'experiment graph', 'graph the experiments', 'visualize the pipeline', 'experiment… - 100karpathy-graph-build
Stage 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… - 91visualize
Render an Open Knowledge Format (OKF) bundle as a single self-contained, interactive HTML graph (viz.html) — concepts as nodes coloured by type and sized by body length, markdown links and bundle-internal `sources` as edges, a wiki-style detail panel with rendered markdown, v0.2…