Skip to content

safishamsi/graphify

⭐ 45,847  ·  Python  ·  GitHub Repo

AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs, papers, images, or videos into a queryable knowledge graph. App code + database schema + infrastructure in one graph.

antigravity claude-code codex gemini graphrag knowledge-graph leiden openclaw

1-Sentence Summary

Turn any folder of code, docs, and images into a queryable knowledge graph with honest edge tagging.

🔥 Key Capabilities & USP

  • Multimodal Knowledge Graph Construction – Ingests code (via tree-sitter AST), PDFs, markdown, images, screenshots, and diagrams into a single unified graph. Solves the pain point of navigating large, mixed-format codebases where relationships between code, documentation, and design artifacts are invisible.
  • Honest Edge Tagging System – Every relationship is tagged as EXTRACTED, INFERRED, or AMBIGUOUS, distinguishing found connections from guessed ones. This is a standout differentiator that gives engineers confidence in query results and prevents blind trust in speculative links.
  • Persistent Graph & Interactive Outputs – Generates an interactive HTML graph (vis.js), an Obsidian vault, Wikipedia-style wiki articles, and a persistent graph.json. The graph can be queried weeks later without re-reading files, delivering up to 71.5x token reduction per query compared to raw file reading.
  • Smart Incremental Updates – SHA256 caching ensures re-runs only process changed files; --update merges new extractions into the existing graph; --watch auto-syncs as files change. This eliminates the pain of full rebuilds and keeps your knowledge base current with zero manual overhead.
  • Git Integrationgraphify hook install adds a post-commit hook that automatically rebuilds the graph after every commit. Your knowledge graph stays synchronized with your version control workflow without background processes.

Technical Architecture

ComponentTechnologyRole
Graph EngineNetworkX + Leiden clustering (graspologic)Core graph construction and community detection
Code Parsingtree-sitterAST extraction for code files
LLM ExtractionClaudeConcept/relationship extraction from docs, images, and non-code artifacts
Visualizationvis.jsInteractive HTML graph output
CachingSHA256 hashingIncremental update detection and change tracking
ArchitectureFully local, no server requiredZero infrastructure dependencies; outputs include graph.html, obsidian/ vault, wiki/ articles, GRAPH_REPORT.md, graph.json, and cache/ directory

Quick Start Guide

bash
pip install graphifyy && graphify install
bash
mkdir -p ~/.claude/skills/graphify
curl -fsSL https://raw.githubusercontent.com/safishamsi/graphify/v1/skills/graphify/skill.md \
  > ~/.claude/skills/graphify/SKILL.md
bash
/graphify .                        # run on current directory
/graphify ./raw                    # run on a specific folder
/graphify ./raw --mode deep        # more aggressive INFERRED edge extraction
/graphify ./raw --update           # re-extract only changed files, merge into existing graph
/graphify add https://arxiv.org/abs/1706.03762        # fetch a paper, save, update graph
/graphify add https://x.com/karpathy/status/...       # fetch a tweet
/graphify query "what connects attention to the optimizer?"
/graphify path "DigestAuth" "Response"
/graphify explain "SwinTransformer"
/graphify ./raw --watch            # auto-sync graph as files change
/graphify ./raw --wiki             # build agent-crawlable wiki
/graphify ./raw --svg              # export graph.svg
/graphify ./raw --graphml          # export graph.graphml (Gephi, yEd)
/graphify ./raw --neo4j            # generate cypher.txt for Neo4j
/graphify ./raw --mcp              # start MCP stdio server
graphify hook install              # post-commit git hook

Pros, Cons & Use Cases

Pros

  • Dramatic token reduction – Up to 71.5x on mixed corpora of 50+ files, making agent queries radically cheaper and faster
  • Fully multimodal – Code, docs, images, PDFs, screenshots, and whiteboard photos all in one graph
  • Persistent across sessionsgraph.json can be queried weeks later without re-reading files
  • Honest edge tagging – Distinguishes EXTRACTED (found) vs INFERRED (guessed) vs AMBIGUOUS connections
  • Multiple export formats – HTML, Obsidian, Wiki, Neo4j, SVG, GraphML, MCP server

Cons

  • Requires Claude Code and Python 3.10+ – Not a standalone tool; depends on the Claude ecosystem
  • LLM re-pass needed for doc/image changes – Only code AST rebuilds are instant; document and image changes require a full LLM extraction pass
  • Token reduction is minimal (~1x) for very small corpora – The value proposition weakens for projects with fewer than ~10 files
  • PyPI package temporarily named graphifyy – Due to a naming conflict, the install command uses a non-intuitive package name

Who should NOT use this?

  • Developers working on small, single-language projects (e.g., a 6-file Python script) – The overhead of graph construction isn't justified by the minimal token savings
  • Teams without access to Claude – The tool is tightly coupled to Claude for LLM extraction; no alternative LLM backend is mentioned
  • Users needing real-time, streaming updates – While --watch exists, doc/image changes require a non-instant LLM pass
  • Projects with zero documentation or non-code artifacts – The multimodal value is lost if you only have code

Ideal Use Cases

  • Large, multi-language monorepos – Discover hidden connections between frontend code, backend services, database schemas, and infrastructure configs
  • Research repositories – Combine papers (PDFs), code implementations, experiment notes, and whiteboard photos into a single queryable graph
  • Onboarding new team members – Let new hires query "what connects authentication to the payment pipeline?" and get an instant, tagged relationship map
  • Legacy codebase archaeology – Run on a folder of undocumented code and documentation to surface implicit architecture and dependencies
  • AI agent knowledge bases – Build persistent, agent-crawlable wikis that reduce token costs by 71x per query

Community & Activity

With 45,847 stars and a last update on May 10, 2026, Graphify has clearly struck a nerve in the developer community. This is not a dormant project—it's actively maintained and rapidly gaining traction. The topic tags (antigravity, claude-code, codex, gemini, graphrag, knowledge-graph, leiden, openclaw, rag, skills, tree-sitter) show a project that's positioning itself at the intersection of knowledge graphs, RAG, and AI coding assistants. The momentum suggests a tool that's solving a real, painful problem for developers working with heterogeneous codebases. If you're evaluating this for your team, you're looking at a project with strong community validation and active development.

Project data from GitHub API, updated in real-time