Graphify
AI coding assistant skill β type /graphify in Claude Code (or Codex, Cursor, Gemini CLI, OpenCode, OpenClaw, Aider, Trae) and you get an interactive knowledge graph from any folder. Code, docs, papers, screenshots, diagrams β everything lands in a single graph.
Links
ποΈ Description
Graphify runs in two passes:
- AST pass (deterministic) β tree-sitter extracts structure from code (classes, functions, imports, call graphs) without an LLM
- Semantic pass β Claude subagents process docs, papers, images in parallel, pulling out concepts + relationships
Result: NetworkX graph β Leiden community detection β interactive HTML + queryable JSON + audit report.
Key features:
- 71.5x token reduction vs reading raw files (on a 52-file corpus: code + papers + images)
- Confidence scoring β every edge tagged EXTRACTED (1.0), INFERRED (0.0-1.0), or AMBIGUOUS
- Multimodal β Claude vision on screenshots, diagrams, whiteboard photos, images in 20 languages
- 20 languages via tree-sitter AST (Python, JS, TS, Go, Rust, Java, C, C++, Ruby, C#, Kotlin, Scala, PHP, Swift, Lua, Zig, PowerShell, Elixir, Objective-C, Julia)
- SHA256 cache β re-runs only process changed files
- Auto-sync (
--watch) β the graph updates automatically as code changes - Git hooks β rebuild after commit and branch switch
- Wiki export (
--wiki) β Wikipedia-style markdown articles per community - Always-on hook β surfaces GRAPH_REPORT.md before every Glob/Grep call, the agent navigates the graph instead of grepping raw files
Download or use
pip install graphifyy && graphify installCommands:
/graphify . # current directory
/graphify ./raw --mode deep # aggressive INFERRED edges
/graphify ./raw --update # only changed files
/graphify query "what connects X to Y?"
/graphify path "NodeA" "NodeB"
/graphify explain "SwinTransformer"
ποΈ Reasoning for
I have this skill installed in Claude Code β ~/.claude/skills/graphify/SKILL.md. I use it to understand large codebases and the relationships between files. Especially handy when:
- I enter a new project and need an architecture map
- I want to find the βwhyβ behind design decisions (rationale extraction from comments and docs)
- I need context compression β graph.json instead of raw files in the prompt
Graphify is a response to Karpathyβs /raw folder problem β instead of reading everything, you query a compact graph.
π§© Output Structure
graphify-out/
βββ graph.html # interactive visualization β click nodes, search, filter
βββ GRAPH_REPORT.md # god nodes, surprising connections, suggested questions
βββ graph.json # persistent graph β query weeks later
βββ cache/ # SHA256 cache β incremental processing
Alternatives considered
- RAG with a vector DB β the Claude Code team tested it and dropped it: code drifts out of sync, permissions are complex. Agentic search (glob + grep) beats RAG
- Manual codebase reading β doesnβt scale, 71x more tokens
- GitHub Copilot @workspace β doesnβt build a persistent graph, doesnβt do cross-file semantic analysis
- Manual Neo4j setup β Graphify exports to Neo4j (
--neo4j-push) but doesnβt require it to operate
π Resources
- GitHub: safishamsi/graphify
- ARCHITECTURE.md
- Claude Code β primary platform
- Awesome Claude Code β listed there
- LLM Knowledge Bases β related concept: knowledge graph approach to PKM
- Context Engineering β graphify as a context compression tool
Template: tool