See what Claude Code actually loads into its context when it starts in a project — as an interactive graph.
Point it at any folder. If that folder is a Claude Code project (it has a CLAUDE.md,
AGENTS.md, or a .claude/ directory), context-explorer discovers everything Claude Code
injects at launch — instructions, memory, skills, subagents, slash commands, MCP servers,
settings — plus the cross-references between those files, and renders a single self-contained
HTML graph you can open offline.
It answers a question that's otherwise invisible: given this repo, what does the model see before it reads a single line of code, and where did each piece come from?
launch-context.svg — the specification of what's injected at agent
launch, by level and load type (this is the static model; the tool renders the live graph for a
specific project).
Claude Code assembles its launch context from several levels — your user-global ~/.claude,
the project's .claude/, and the per-project memory it maintains. Skills and subagents are
injected as name + description; CLAUDE.md / AGENTS.md are injected in full; memory findings
and context files are pulled in later, on demand. That structure is real but normally lives only
in your head. This tool draws it.
No dependencies — Python 3 standard library only.
python3 context_graph.py /path/to/project # build -> /path/to/project/context-graph.html
python3 context_graph.py . --open # current dir, open in browser
python3 context_graph.py /path/to/project -o graph.html
python3 context_graph.py /path/to/project --no-global # project level only, ignore ~/.claudeThen open the generated context-graph.html in any browser (works via file://, fully offline).
Levels (each is its own anchored cluster):
- User-global —
~/.claude/(CLAUDE.md, skills, subagents, commands, settings): applies to every project on the machine. - Project — this repo's
.claude/,CLAUDE.md/AGENTS.md,.mcp.json. - Auto-memory —
~/.claude/projects/<project>/memory/: the per-project memory Claude maintains.
Two kinds of edges:
- Load edges (solid gold) — what a level injects into context at launch. These connect each
level's anchor to its CLAUDE.md/AGENTS.md (full content), skills & subagents (name + description),
MCP servers and settings (config), and follow
@pathimports recursively (Claude Code expands those into the prompt at startup too). - Reference edges (faint, dotted) — textual cross-links between files: markdown links,
[[wikilinks]], and inline path mentions.
Each node carries a badge telling you whether it's loaded at launch (full / description-only / config) or on demand (grep / recall).
Context depth (the slider, bottom-right) is the main lens. It's hop-distance from the launch-loaded core:
- 0 — only what's injected when the agent starts: the level anchors plus CLAUDE.md/AGENTS.md,
skills, subagents, MCP, settings, and any
@imports. Nothing the agent would have to go fetch. - 1, 2, … — adds everything reachable in N reference hops outward (e.g. the findings that
MEMORY.mdindexes appear at depth 1). - all — the complete graph, including files unreachable from the launch core.
Toggle a level off in the legend to isolate the others.
Click any node to read its rendered markdown (or, for .json configs, the redacted contents).
You can edit in the panel; edits persist to your browser's local storage and can be downloaded —
the standalone file never writes to your disk.
- The generated HTML embeds the text of the files it graphs — treat it like the files
themselves and don't commit it (the repo's
.gitignoreexcludes*.html). settings.json/settings.local.json/.mcp.jsonare redacted before embedding: values under key/token/secret/password-like keys, and long token-shaped strings, become***REDACTED***..envfiles are never read.- Nothing is sent anywhere; the tool only reads files and writes one HTML file.
MIT — see LICENSE.