Scans a codebase to produce an interactive graph showing files, imports, symbols, call edges, architectural layers, dependency cycles, and entry points, optionally enriched with AI summaries and tours, delivered as a single HTML file.
Ships in core-skills. 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.
Read when SKILL.md points to them; scripts run unread.
Turn a codebase into a map a human can actually read.
The goal is not a graph that shows off how complex the code is — it is a graph that quietly teaches someone how the pieces fit together.
Trigger on requests like:
Do not use this for a single-file explanation — just read the file.
Three stages. Two are deterministic; only the middle one uses your intelligence.
1. scan.py codebase -> graph.json + digest.md deterministic, no LLM, no network
2. YOU digest.md -> enrich.json summaries, layer fixes, tours
3. render.py both -> codegraph.html one portable self-contained file
(overview.py collapses the graph into the overview diagram en route)
Why this split matters — do not violate it:
| Stage | Owner | Guarantee |
|---|---|---|
| Structure (files, imports, calls, metrics, cycles) | scan.py | Reproducible. Same commit always yields the same edges. |
| Meaning (what a file is for, tours) | You | Only a model can write this. |
| Delivery (layout, validation, HTML) | render.py | Validated before write; a broken artifact never replaces a good one. |
Never hand-write graph.json. It is machine output. You only ever write enrich.json.
Never invent files, symbols, or relationships. Every id you emit must already exist in the digest.
python3 <skill>/scripts/scan.py <repo> -o <repo>/.codegraph
Nothing to install: Python 3.8+ stdlib only. ~2s for 230k LOC.
Useful flags:
--max-files N (default 4000) — raise it if output warns about truncation--symbols-for N (default 250) — extract function/class nodes for the N most important files--no-calls — skip heuristic cross-file call edges (faster, fewer false positives)Then read digest.md, not graph.json. The digest is a compact briefing (entry points, directory map, ranked-importance table, cycles, dependencies, layer counts). graph.json can be megabytes and will flood your context for no benefit.
Write <repo>/.codegraph/enrich.json:
{
"project": { "description": "1-3 sentences: what this codebase IS and does." },
"nodes": {
"file:src/server.ts": {
"summary": "HTTP entry point. Wires middleware, mounts routers, starts the listener.",
"layer": "entry",
"tags": ["bootstrap", "http"]
}
},
"layers": { "service": "Domain logic; no HTTP or SQL touches this layer." },
"tours": [
{
"title": "Request lifecycle",
"description": "Follow one HTTP request end to end.",
"steps": [
{ "nodeId": "file:src/server.ts", "note": "Request arrives; middleware chain runs here." },
{ "nodeId": "file:src/routes/user.ts", "note": "Routing picks a handler." }
]
}
]
}
Rules:
file:..., mod:..., sym:..., ext:...). Unknown ids are dropped with a warning — silent quality loss.scan.py guesses from paths and says so. If core/ is really data access, override it.Scale guidance: read the top files in batches, and prefer breadth (many short, correct summaries) over depth (a few essays).
python3 <skill>/scripts/render.py --in <repo>/.codegraph --open
--validate-only to check without writing; --strict to fail on warnings.<repo>/.codegraph/codegraph.html — one file, no CDN, works offline, safe to commit or send.Always report to the user: node/edge counts, how many summaries and tours landed, and the artifact path.
Three linked views in one file, cycled with Tab:
0 to reset, with damped
inertia and a slow idle auto-rotate — the same interaction contract as the atlas'
OrbitControls, implemented as a projected 2.5D disc in Canvas so the artifact
stays one dependency-free file (no three.js, no WebGL). Touch: one finger orbits,
two pinch-zoom. Modules carry real z depth, so tilting reveals structure and
distant galaxies fade.+N badge on every collapsed node says how much is
inside, so nothing is hidden silently. The rail's Start here list jumps straight
to a real entry point. H toggles back to the flat all-at-once graph.Clicking a module box or a galaxy drills into explore, focused on that module's files.
scan.py reads the codebase's own docstrings and file-header comments — module
docstrings, JSDoc blocks, Go/Rust line comments — and uses them as node summaries.
Boilerplate (shebangs, licence headers, coding: lines) is filtered, and text is cut
at Args:/Returns: so the summary stays one sentence.
Measured on a real 109k-LOC repo: 87% of files described with zero model calls.
The agent's enrich.json overrides these where it can say something better, and the
inspector labels which is which — an extracted summary is marked from the file's
docstring, so provenance is never ambiguous. Nodes also list the symbols they define.
This matters because a graph of unlabelled dots teaches nothing: before this, 100% of nodes showed only LOC and degree.
The overview is derived, never authored: tiers, boxes, link weights and the journey all come from the deterministic scan, so the diagram cannot drift from the real code. Modules holding only config/docs are omitted (scaffolding is not architecture), and links are capped so a dense graph does not become a hairball.
| Capability | Why it helps understanding |
|---|---|
| Overview diagram | The 5-second read: what this system is made of, and how it flows |
| Click a module → explore | Overview answers "where?", explore answers "how?" |
| 3 detail levels (Folders / Files / Symbols) | Progressive disclosure — start coarse, drill only where needed |
| Layer bands (entry → api → service → data → util) | Shows architecture, not just a hairball |
| Click any node | Summary, metrics, and navigable dependency lists both directions |
Search (/) | Find by name, path, summary text, or tag |
| Focus dimming | Isolates one node's actual neighborhood |
entries toggle | "Where do I start reading?" answered instantly |
cycles toggle | Circular dependencies = refactor targets |
Guided tours (P, [, ]) | Teaches reading order — the thing new devs lack most |
calls / deps toggles | Cross-file call edges; external dependency surface |
Theme toggle (T), fit (0) | Presentable in a README, PR, or onboarding doc |
| Flowing comet packets | Dependency direction becomes visible motion, not a static arrow |
| Breathing halos | Entry points, tour steps, and the selection pulse to draw the eye |
Motion toggle (space, ⏸) | Pause for screenshots; auto-off under prefers-reduced-motion |
Tab | Flip between overview and explore |
simplify (F) | Folds edges of hub files — the single biggest declutter (~−48%) |
focus (N) | Shows only the selection and its top neighbours (~−87%) |
The artifact is offline and carries no API key, so it does not pretend to host a chat.
Instead every node has an ask ▸ button that copies a complete prompt — path,
summary, LOC/fan-in/fan-out, the symbols it defines, and both edge directions — ready
to paste into any LLM. That is the context a model would otherwise have to guess at.
Deliberately NOT done: embedding an API key in the HTML. The file gets committed and shared, so a key in it is a leak waiting to happen.
Dense repos produce a hairball, so the explore view starts simplified and lets the reader add detail back:
⋯n badge; click it to reveal them. Nothing disappears silently.calls edges off by default — they typically outnumber imports ~5:1.uReveal).N) — one node's direct relations only, capped so an
extreme hub cannot re-create the hairball.Measured on a 109k-LOC repo: 628 → 172 edges (−73%) at defaults, −87% in focus mode.
Why not 3D? It looks like the answer but is not: the clutter is edge count, not missing dimension, and 3D adds occlusion, rotation disorientation, and a ~600KB three.js dependency that breaks the single-file offline contract. LOD plus folding solves the actual problem.
The artifact is alive by default, in the glowmotion/deep-field idiom:
Performance is decoupled from graph size: the static scene is painted once on a
base canvas and motion lives on a separate overlay, with packets capped at 190.
Measured 60fps on a 2,660-node graph. Motion pauses on space / ⏸ and is
off automatically when the viewer prefers reduced motion.
Node ids are typed prefixes (stable, so deep links and enrichment keep working):
| Prefix | Meaning |
|---|---|
mod:<dir> | Folder / module |
file:<path> | A file |
sym:<path>#<name>:<line> | Function / class / type |
ext:<name> | External dependency |
Edges: contains (hierarchy), imports (resolved, reliable), calls (heuristic — name-based, unique-match only), depends_on (external), inherits.
Layers: entry, ui, api, service, data, util, config, infra, test, docs, other.
Importance = 0.55·PageRank(imports) + 0.25·fan-in + 0.20·size. It answers "what should I read first?"
Python, JS/TS (+JSX/TSX), Vue, Svelte, Go, Rust, Java, Kotlin, Scala, Ruby, PHP, C#, C/C++, Objective-C, Swift, shell, SQL, Terraform, GraphQL, Protobuf — plus config/docs/Docker as context nodes.
Import resolution is real (relative paths, package roots, @/ aliases, Go modules, Rust crate::/mod, JVM packages). Extraction is regex-based, not a full type-checking AST: excellent for imports and definitions, approximate for call edges. Tell the user this when they ask about call accuracy — never present inferred calls as verified fact.
calls edges are heuristic (unique unambiguous names only; common names like get/run are deliberately skipped). Imports are trustworthy; calls are a hint.Re-run scan.py then render.py. enrich.json is separate from graph.json, so existing summaries survive a re-scan — only ids that no longer exist get dropped. Commit .codegraph/ to let teammates open the graph with zero setup and no API key.
README.md (opens in a new tab)README.zh-CN.md (opens in a new tab)assets/codegraph-adalflow-overview.png (opens in a new tab)scripts/overview.py (opens in a new tab)scripts/render.py (opens in a new tab)scripts/scan.py (opens in a new tab)scripts/test_codegraph.py (opens in a new tab)scripts/viewer.html (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/core-skills:codegraphfrom core-skills
npx claudepluginhub sylphai-inc/skills --plugin core-skills7 skills in this plugin
/clone-anywebsiteClone any website's landing page with pixel-perfect fidelity. Visual-first workflow: screenshot → sniper CSS extraction → deep DOM interrogation → animation detection → rebuild in React + Tailwind + Framer Motion. Uses AdaL browser-use agent tools. Includes ready-to-use extraction scripts, gotcha catalog, quality checklist, and speedrun prompt./create-skillGuide users through creating AdaL skills by clarifying the skill type (personal, project, or public plugin) and scaffolding the appropriate structure./finger-frame-aiGenerate a finished cyberpunk-styled finger-frame effect video from a local clip using Gemini Omni restyling, MediaPipe hand tracking, and FFmpeg compositing. Use when someone asks to make, create, restyle, or process a video where a two-hand finger-frame becomes a window into an AI-stylized (default: neon cyberpunk CGI) world./glowmotionCreate premium animated technical diagrams as single self-contained HTML+SVG files — flowcharts whose connectors visibly flow and architecture diagrams where requests travel as glowing comet dots with fading trails, pulsing module highlights, and a built-in light/dark theme toggle (dark themes midnight/neon/aurora + light theme daylight). Use this skill whenever the user asks for a flowchart, workflow, pipeline, process diagram, state machine, system architecture, infrastructure, cloud, microservices, or network topology diagram — especially when they mention "animated", "glowing", "premium", "flowing", "dynamic", "alive", "GIF-like", "light mode", "dark mode", or want a diagram for a landing page, README, docs, or product demo. Also converts Mermaid source (flowchart/graph and stateDiagram-v2) into an animated diagram. Prefer this over static output whenever the diagram represents anything that moves: requests, events, data, jobs, messages, or control flow./model-officeLaunches "Model Office" — a live browser dashboard that visualizes multi-model job routing as a blocky Lego/Minecraft-style pixel office. Type one task, a dispatcher LLM decomposes it into subtasks and routes each to the best-fit model (Claude/GPT/Sonar) based on capability, and pixel-art worker avatars slide between a "working area" desk and a "waiting area" lounge as their live status changes (queued/thinking/done). Use when the user wants to demo/visualize multi-agent or multi-model job allocation, wants a "pixel agents"-style dashboard, or asks to see how tasks get routed across different models./posthog-analyticsAutomate PostHog dashboard creation, sync, update, and export via APIOther plugins' skills for the same job