Graphify: Claude Code Skill for AST Knowledge Graphs
Skill entry (not an article): graphify by Safi Shamsi (Graphify Labs, Y Combinator S26) turns an entire project — code, docs, PDFs, images, videos — into a queryable knowledge graph, invoked via /graphify from Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and about fifteen other clients.
By **Safi Shamsi** — créateur et mainteneur de graphify// Source github.com ↗/Reading 2 min/.md// Auto-verified translation
graphify (Safi Shamsi, Graphify Labs, Y Combinator S26) turns an entire project into a queryable knowledge graph, invoked via /graphify from Claude Code, Cursor, Codex, Gemini CLI, and about fifteen other clients. Observed on August 6, 2026: 103,187 stars for a repository created on April 3, Apache-2.0, Python.
Three commitments underpin the project.Code is parsed locally into tree-sitter AST, with no LLM: deterministic, nothing leaves the machine, no API key required for a purely-code corpus. Every edge carries its provenance — EXTRACTED if explicit in the source, INFERRED if graphify resolved it —, « so you can tell what was read directly from what was inferred ». And the project defines itself against vector RAG: « Not a vector index. No embeddings, no vector store: a real graph you traverse. »
Not a vector index. No embeddings, no vector store: a real graph you traverse.
— **Safi Shamsi** — créateur et mainteneur de graphify , github.com
Usage replaces grep.query returns a subgraph for a natural-language question, path A B traces the path between two entities, explain unpacks a concept. Three outputs: an interactive graph, a readable report (god nodes, surprising connections, suggested questions), and a persistent graph.json, queryable weeks later.
Coverage extends beyond code: 36 tree-sitter grammars, but also SQL, Terraform, Apex, MCP configurations, package manifests, Office, PDFs, images, and locally transcribed video. # WHY: comments and design reasoning become full-fledged nodes linked to the code they explain.
The benchmarks deserve a careful reading. On LOCOMO, graphify dominates recall (0.497 versus 0.149 and 0.048) but loses on QA accuracy (45.3% versus 49.7%); on LongMemEval-S it ties a dense RAG at 76%. The line that matters lies elsewhere: « Graph build — LLM credits: 0 ». The defensible differentiator is cost and traceability, not answer quality.
⚠️ Three caveats. The main branch carries a stale v1-era README describing a different product: read v8. The PyPI package is named graphifyy, until the name is reclaimed. And a local query log is active by default, disabled via an environment variable.
The skill also serves as an entry point to a waitlisted commercial platform at graphify.com, which applies the same approach continuously to the entire working context.
Key takeaways
Nature./graphify skill + Python CLI, Apache-2.0, distributed on PyPI under the name graphifyy (two y's, until graphify is reclaimed). Install via uv tool install graphifyy && graphify install. Works in Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and about fifteen other clients.
⭐⭐ The three design commitments, and they hold together. 1. Code is parsed locally, with no LLM. tree-sitter AST, deterministic, « nothing leaves your machine ». A purely-code corpus requires no API key and runs offline. Documents, PDFs, and images, however, go through a model. 2. Every edge carries its provenance.EXTRACTED = explicit in the source; INFERRED = resolved by graphify; AMBIGUOUS in the report. « You always know what was found vs guessed. » 3. No vector index. No embeddings, no vector store: a graph you traverse. → The three reinforce each other: determinism makes the cost zero, zero cost makes frequent rebuilding possible, and edge labeling makes the result auditable. Same family of reasoning as the executable that beats the brief in [[lassiege-usine-logicielle-heure-ia-2026-07-28]].
⭐ The graph replaces grep, and that's the usage argument.query "<question>" returns a subgraph for a natural-language question, path A B traces the path between two entities, explain X unpacks the neighborhood of a concept. The README's example makes the point: path "FastAPI" "ModelField" returns a three-hop path with the type of each edge. One asks for a relationship, not a string match. This is exactly the benefit Hugo Lassiège attributes to GitNexus in [[lassiege-usine-logicielle-heure-ia-2026-07-28]] — « searching for an execution flow rather than grepping a function name », and « the real point isn't speed, it's detecting all the side effects ».
⭐⭐ The benchmark table, read correctly — the line that matters isn't a win. | Benchmark | Metric | graphify | Field | |---|---|---|---| | LOCOMO (n=300) | recall@10 | 0.497 | supermemory 0.149 · mem0 0.048 | | LOCOMO (n=300) | QA accuracy | 45.3% | supermemory 49.7% · mem0 27.3% | | LongMemEval-S (n=50) | QA accuracy | 76% | tied with a dense RAG | | Graph construction | LLM credits | 0 | billed per token elsewhere | → graphify largely dominates recall, loses on QA accuracy, ties dense RAG on the second benchmark, and builds its graph for free. The defensible differentiator is therefore cost and traceability, not answer quality. Presenting graphify as « better than RAG » would be an overinterpretation its own numbers contradict. Credited protocol: same harness, same model, same budgets, judge validated blind against a second judge (90.6% agreement, Cohen's kappa 0.81).
⭐ Worth comparing with the corpus's only comparable figure. Compare the Market measured an AST graph at ~70% versus ~58% for a vector RAG on 79 merge requests, with RAG performing worse than no context at all (cf. [[comparethemarket-context-retrieval-ai-code-review-gkg-rag-2026-03-06]], revisited in [[sfeir-code-review-anneau-contraintes-2026-07-30]]). Two independent measurements converge on the superiority of the structured graph for code — and graphify adds that construction costs nothing.
Source coverage — broader than "just code". 36 tree-sitter grammars covering ~40 languages (down to CUDA, Metal, Zig, Elixir, Julia, Dart, SystemVerilog, Delphi, Fortran), plus SQL, Terraform/HCL, Apex Salesforce, MCP configurations (.mcp.json, claude_desktop_config.json — extracts servers, packages, and required environment variables), package manifests (pyproject.toml, go.mod, pom.xml — one canonical node per package, hence a single hub), Office, Google Workspace, PDFs, images, video, and audio. ⭐ Graphifying one's own MCP configurations is an unexpected and immediately useful way to map one's tooling surface.
The "why" extracted as a first-class object.# NOTE:, # WHY:, # HACK: comments, docstrings, and design reasoning found in documentation become separate nodes linked to the code they explain. → Intent is treated as a graph entity, which directly addresses the comprehension debt: one can ask why, not just what.
Graph freshness, three mechanisms. SHA256 cache (only changed files are reprocessed), --watch (instant rebuild on saving a code file, AST only, no LLM; documents and images flag that an --update is needed), and graphify hook install (post-commit hook, no background process). The --watch mode is explicitly justified for multi-agent workflows: « the graph stays current between waves automatically ».
Outputs for agents.--wiki produces encyclopedia-style articles per community with an index.md, « point any agent at index.md and it can navigate the knowledge base by reading files instead of parsing JSON ». And --mcp starts an MCP stdio server. Exports to Obsidian, GraphML (Gephi, yEd), Neo4j (cypher), SVG. → The graph is built to be read by a machine, with several entry points depending on the tool. Same intent as the markdown served to agents in [[martinho-allen-cloudflare-markdown-for-agents-2026-02-12]].
⚠️ Privacy — the boundary is subtle, worth knowing.
Local. code (tree-sitter), video and audio (faster-whisper). A code-only corpus runs offline, and --code-only forces this mode on a mixed repository.
Sent to the model. documents, PDFs, images. In headless mode, an API key is required, with an automatic priority chain (Gemini → Kimi → Claude → OpenAI → DeepSeek → Azure → Bedrock → Ollama). ⚠️ Kimi routes to Moonshot AI servers in China — the README flags this, and --backend ollama gives a fully local mode.
No telemetry. , no usage tracking.
⚠️ But a query log is written by default to ~/.cache/graphify-queries.log (timestamp, question, corpus, nodes returned, duration). Subgraphs are not stored. Disable via GRAPHIFY_QUERY_LOG_DISABLE=1. Local, but active without opt-in: worth knowing before deployment in a sensitive context.
⚠️ Two documentation traps in the repository itself. 1. The main branch is stale. It carries a v1-era README (7 KB) describing « a Claude Code skill » for a single client, highlighting the « 71.5× fewer tokens » claim on a 52-file Karpathy corpus, and still pointing to safishamsi/graphify. The default branch is v8 (57 KB), which describes a multi-client product and highlights the LOCOMO/LongMemEval benchmarks. Read v8, never main. 2. The package name: pip install graphifyy (two y's). The CLI and skill command remain graphify.
Business model, to watch. the open source skill is the entry point to a commercial platform at graphify.com — « the always-on layer… applies the same graph approach to your entire working context: meetings, files, docs, and code, updating continuously in the background », currently waitlisted, with a free trial announced. Local open source on one side, continuously hosted service on the other: a classic pattern, to factor into any adoption decision.
⚠️ Traction requires a cautious reading.103,187 stars in four months is an exceptional pace, even for a viral tool. The figure is what the GitHub API returns on August 6, 2026; it says nothing about actual usage, and the project's official site still displays 3,700 (cf. [[graphify-net-annuaire-ia-coding-2026-08-06]]), a sign that communication hasn't kept pace. Cite the star count as a signal of attention, never as a measure of adoption.
Meta / cross-references. same family as [[skill-gibbs-hyperresearch-2026-08-03]] (persistent store, provenance, agent-readable output), but for code rather than documentary research; realizes in product form what Hugo Lassiège gets from GitNexus in [[lassiege-usine-logicielle-heure-ia-2026-07-28]]; numeric convergence with [[comparethemarket-context-retrieval-ai-code-review-gkg-rag-2026-03-06]] and [[sfeir-code-review-anneau-contraintes-2026-07-30]] on AST graph versus vector RAG; fits within the codified context of [[vasilopoulos-codified-context-infrastructure-ai-agents-2026-02-24]] and the context platforms of [[memodb-acontext-context-data-platform-agents-2025-12-11]]; formal kinship with other skill entries, [[skill-pocock-grill-with-docs-2026-06]]; skill mechanics in [[agent-skills-anthropic-2025-10-16]], [[shihipar-claude-code-lessons-building-skills-2026-06-03]], and [[vincent-superpowers-agentic-skills-framework-github-2026-04-02]]. ⚠️ Disambiguation: the site graphify.net is a property distinct from graphify.com (the commercial platform) — see the dedicated entry.
The knowledge graph extracted from this fiche — 9 entities, 24 relations.
In this graph :graphify · Safi Shamsi · Graphify Labs · provenance d'arête · extraction hybride par type de fichier · tree-sitter · algorithme de Leiden · LOCOMO · LongMemEval