promptgarten ๐ŸŒฑ
๐ŸŒ ES

Add-ons & integrations ยท Knowledge graph

Graphify

โ˜… 83.100+

Turns your code folder into a searchable knowledge graph โ€” via local Tree-sitter parsing (~40 languages), with no LLM calls and no vector embeddings.

Graphify parses your code folder locally with Tree-sitter (36 grammars: Python, TypeScript, Go, Rust, Java, C++, and many more) โ€” entirely without LLM calls. AST relationships like calls, imports, inherits, and mixes_in produce a knowledge graph, which you get as an interactive graph.html, a GRAPH_REPORT.md, or a graph.json. Every edge is tagged as EXTRACTED (explicitly found in the code) or INFERRED (derived), so-called "God Nodes" mark the most densely connected concepts, and a Leiden clustering analysis groups related subsystems together.

For Claude Code, graphify claude install registers a CLAUDE.md directive plus a PreToolUse hook that automatically consults the graph before every file search โ€” so the agent no longer has to grep through the code blindly. A dedicated MCP server (python -m graphify.serve) provides tools like query_graph, get_neighbors, and shortest_path, also available as an HTTP server for team use. Besides Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and over 15 other tools are also supported. Optionally, the graph can be exported directly as an Obsidian vault via the --obsidian flag (one note per node, including backlinks). For PDF, Office, video, or Google Workspace files, an optional LLM backend (Claude, OpenAI, Gemini, or Ollama locally) can be enabled โ€” but the code parsing itself always stays local.

๐Ÿ”ง SETUP

  1. Install: `uv tool install graphifyy` (recommended) โ€” alternatively `pipx install graphifyy` or `pip install graphifyy`
  2. Register the skill for Claude Code: `graphify install` (for other editors, e.g. `graphify cursor install`, `graphify codex install --platform codex`)
  3. Generate the graph: run `/graphify .` in the project folder โ€” creates `graph.html`, `GRAPH_REPORT.md`, and `graph.json` in `graphify-out/`
  4. Always-on integration: `graphify claude install` writes a `CLAUDE.md` directive plus a PreToolUse hook that automatically consults the graph before file searches
  5. Optionally start your own MCP server: `python -m graphify.serve graphify-out/graph.json` (with `--transport http --host 0.0.0.0 --api-key ...` also for team use)

โœ… WHEN TO USE IT?

Large, organically grown codebases

In a monorepo with hundreds of files, a single graph query replaces expensive series of grep/glob calls โ€” community reports mention up to 70x fewer tokens.

Understanding cross-file relationships

"What calls X, what inherits from Y?" via `graphify query "..."` or `graphify path "ServiceA" "ServiceB"` instead of manually clicking through the code.

โ›” WHEN NOT TO?

Small or new projects

With only a handful of files, the setup and parsing overhead barely pays off โ€” plain grep/glob search is quicker to get going.

Better: Work directly with Claude Code's built-in grep/glob search.

Docs/media extraction without an API key

For PDF, Office, or video extraction, Graphify optionally needs an LLM backend (e.g. ANTHROPIC_API_KEY) โ€” plain code parsing stays local, but the extras cost API calls.

Better: Use only standard code parsing, or set `OLLAMA_BASE_URL` for a local model.

SOURCES