safishamsi/graphify
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.
Graphify is a skill for Claude Code, Codex, Cursor, and Gemini CLI that builds a queryable knowledge graph from any codebase. It maps code, SQL schemas, docs, and scripts as interconnected entities -- giving AI coding agents a structured map of the entire project in 2026.
Our Review
AI coding assistants grew powerful at the file and function level through 2024-2025, but struggled at the codebase level. Ask Claude Code to fix a bug in one file and it performs well; ask it to understand how a large system with multiple database schemas, infrastructure configs, and API contracts fits together and it loses the thread. safishamsi built Graphify in 2025 as a skill that runs before the coding session starts -- it indexes the entire codebase as a knowledge graph using tree-sitter for code parsing and the Leiden community detection algorithm for clustering, then makes that graph queryable during the session. The project crossed 49,000 GitHub stars as context management became the central problem in AI-assisted development.
Key capabilities
- •Multi-language code parsing: tree-sitter extracts functions, classes, imports, and call graphs from Python, TypeScript, JavaScript, Go, Rust, SQL, and shell scripts
- •Knowledge graph construction: entities (functions, tables, modules, documents) and their relationships are stored as a queryable graph rather than flat embeddings
- •Cross-artifact coverage: code files, SQL schemas, R scripts, infrastructure configs, documentation, images, and videos all become nodes in the same graph
- •GraphRAG queries: the agent can traverse relationships ("what modules call this function?", "which tables does this API endpoint touch?") rather than just semantic similarity
- •Leiden clustering: community detection groups related entities automatically, reducing graph noise for large codebases
- •Skill installation: install via the standard skill mechanism for Claude Code, Codex, OpenCode, Gemini CLI, and Cursor
Getting started
Install via the skill command for your agent (e.g. /install graphify in Claude Code or via cc-switch). Run /graphify in your project directory to index the codebase. Graphify scans files, builds the knowledge graph, and makes it available to the agent for the session. Re-run after significant codebase changes.
Limitation
Initial graph construction on large codebases (1000+ files) can take several minutes. The knowledge graph is built at index time -- changes made during a session are not reflected until re-indexing. Graph quality depends on tree-sitter language grammar coverage; unusual or domain-specific languages may parse incompletely. The Leiden clustering algorithm's community boundaries may not perfectly match the logical architecture of every codebase.
Our Verdict
Graphify addresses one of the more fundamental limitations of AI coding assistants: they are good at understanding individual files but poor at understanding systems. A 200-file codebase with database schemas, infrastructure configs, and API contracts has structure that matters -- knowing that a function is called from three different modules, or that a database table is written by two separate services, changes what a correct code change looks like. Graphify surfaces that structure as a queryable graph rather than burying it in flat embeddings.
The tree-sitter-based parsing is the right technical choice. tree-sitter produces accurate structural ASTs rather than relying on heuristics, which means the graph nodes are precise rather than approximate. The Leiden clustering adds a layer of automatic organization that makes large graphs navigable without manual taxonomy. The combination produces a knowledge graph that an AI agent can traverse with specific relationship queries rather than falling back on semantic similarity lookups alone.
The practical limitation is that it is a skill that requires intentional use. You install it, run it, and it enriches the agent's context for that session. For teams with stable codebases and repeated AI-assisted work on the same system, Graphify becomes a standard step in the workflow. For one-off tasks or fast-changing codebases, the re-indexing overhead changes the calculus in 2026.
Frequently Asked Questions
What is Graphify and why do AI coding agents need a knowledge graph?
Graphify is an open-source skill for Claude Code, Codex, Cursor, and other AI coding assistants that builds a queryable knowledge graph from a codebase. AI coding agents are good at understanding individual files but struggle with large systems where the relationships between components matter. A knowledge graph lets the agent answer structural questions -- which modules call this function, which tables does this API touch, what imports this class -- that flat file reading or semantic search cannot reliably answer in 2026.
Which coding assistants and file types does Graphify support?
Graphify works as a skill with Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and other agents that support the standard skill protocol. For file types: it parses Python, TypeScript, JavaScript, Go, Rust, SQL schemas, R scripts, and shell scripts via tree-sitter grammars, plus documentation files (markdown, text), images, and video. All of these become nodes in the same knowledge graph, making cross-artifact queries possible -- for example, linking a documentation page to the functions it describes in 2026.
How does Graphify differ from standard RAG retrieval?
Standard RAG retrieves chunks of text based on embedding similarity to the query. Graphify adds explicit relationship edges between code entities -- call graphs, import relationships, table references, module membership. This enables graph traversal queries that similarity search cannot answer: 'show me all callers of function X' or 'which modules are in the same cluster as this file.' For codebase navigation, relationship queries often matter more than semantic similarity, and Graphify's GraphRAG approach covers both in 2026.
How long does Graphify take to index a codebase?
Indexing time scales with codebase size. A 100-file project typically indexes in under 30 seconds. A 500-file codebase with multiple schemas and docs may take 2-4 minutes. A 1000+ file monorepo can take 5-15 minutes depending on language complexity and hardware. The graph is then available for the entire session without re-indexing. For active development, re-running Graphify after significant code changes (new modules, schema migrations) keeps the graph current in 2026.
Does Graphify work with private or offline codebases?
Yes. Graphify runs entirely locally -- it does not send code to external APIs or services. The knowledge graph is built from local file parsing using tree-sitter grammars and the Leiden algorithm, both of which run on your machine. API keys are not required for the indexing step. The AI agent queries the graph through its normal context mechanism, which may involve LLM API calls, but the codebase data itself stays local in 2026.
What is graphify?
Graphify is a skill for Claude Code, Codex, Cursor, and Gemini CLI that builds a queryable knowledge graph from any codebase. It maps code, SQL schemas, docs, and scripts as interconnected entities -- giving AI coding agents a structured map of the entire project in 2026.
How do I install graphify?
Visit the GitHub repository at https://github.com/safishamsi/graphify for installation instructions.
What license does graphify use?
graphify uses the MIT license.
What are alternatives to graphify?
Explore related tools and alternatives on My AI Guide.
Open source & community-verified
MIT licensed: free to use in any project, no strings attached. 50,175 developers have starred this, meaning the community has reviewed and trusted it.
Reviewed by My AI Guide for relevance, quality, and active maintenance before listing.
Topics