A Claude Code skill that scans a repo and builds a knowledge graph with a live visualization. Uses Agent Teams to isolate each phase into its own context window, and chomp as internal infrastructure for dumping and chunking source code.
Inside any project directory in Claude Code:
/moons # scan local repo
/moons https://github.com/foo/bar # scan external repo
/moons update # refresh graph from current code
Spawns an agent team with 4 teammates, each in its own context window:
| Teammate | Role |
|---|---|
| Ingestion | Runs chomp to dump and chunk the repo |
| Graph | Extracts nodes and edges from chunks, builds moons/graph.json |
| Viz | Builds the interactive D3.js force-directed visualization |
| Cleanup | Removes transient chomp artifacts, keeps the dump file |
Tasks run sequentially via dependencies: Ingestion -> Graph -> Viz -> Cleanup. Data passes between teammates as files on disk (chunks -> graph.json -> index.html).
After the team finishes, the lead appends instructions to CLAUDE.md and opens the visualization in your browser.
For external repos (/moons <git-url>), after the graph is built Claude asks if you want to clone the repo into your working directory.
For updates (/moons update), a single agent diffs the graph against the previous version — no teams needed.
moons/
├── graph.json # The knowledge graph (nodes + typed edges)
├── index.html # Interactive visualization (works via file:// or HTTP)
├── sync.py # Re-injects graph.json into index.html after edits
├── query.py # CLI tool for querying the graph
├── notes/ # Classified file summaries
├── code/
├── papers/
└── ... # Other auto-detected type directories
python3 moons/query.py node <id> # Show a node
python3 moons/query.py type <type> # List all nodes of a type
python3 moons/query.py edges-to <id> # Incoming edges
python3 moons/query.py edges-from <id> # Outgoing edges
python3 moons/query.py types # Count by type
python3 moons/query.py search <term> # Search nodes- Claude Code with Agent Teams enabled (
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1in settings) - chomp-init installed (
~/.claude/skills/chomp-init/) - Python 3
PyMuPDF(optional, for PDF support):pip install PyMuPDF
/moons appends a block to your CLAUDE.md that tells agents:
- Read
moons/graph.jsonfirst when they need project context - Update graph.json + content files when they create or modify files
- Run
python3 moons/sync.pyafter graph changes
The graph stays current without manual re-runs.