Code-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema. - Ruby Support: Ruby joins the graph through a new pluggable ast-grep tier that adds a language from a single YAML pattern file, emitt
Add this skill
npx mdskills install vitali87/code-graph-rag@vitali87? Sign in with GitHub to claim this listing.Multi-language codebase parser with graph knowledge base and natural language RAG query interface
tags, so we use a single light-mode . Restore the theme-aware block below when the GitHub account is reinstated:

-->



-->


-->

-->



-->

-->
Code-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema.
Module, Function, and Class nodes plus import edges without a hand-written parser.FLOWS_TO taint edges follow values through assignments, function calls, and I/O sinks, with coverage across C#, Java, C, and Go.See NEWS.md for the full history.
Point Code-Graph-RAG at a repository and it reads every source file, extracts functions, classes, methods, modules, and the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
The system has two components:
codebase_rag/). An interactive CLI that turns natural language into Cypher queries, retrieves matching code, and drives AI-powered editing and optimisation.Source Code -> Tree-sitter Parser -> AST Analysis -> Memgraph Knowledge Graph
|
User Query -> AI Model (Cypher Gen) -> Cypher Query -> Graph Results -> Response
See the Architecture Overview and Graph Schema for the full picture.
Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart are fully supported. Scala is in development, and Ruby has structural support (modules, functions, classes, and imports) through the pluggable ast-grep tier. See the Language Support matrix for per-language capabilities.
cgr is published to PyPI. Install it system-wide with the treesitter-full (all languages) and semantic (vector search) extras:
# with uv (recommended)
uv tool install "code-graph-rag[treesitter-full,semantic]"
# or with pipx
pipx install "code-graph-rag[treesitter-full,semantic]"
You also need Docker (for Memgraph), cmake, and ripgrep. Full prerequisites, source installs, and environment setup are in the Installation guide.
# Start the packaged Memgraph + Qdrant stack (no compose file needed)
cgr daemon up
# Parse a repository into the graph, then query it
cgr start --repo-path /path/to/repo --update-graph --clean
cgr start --repo-path /path/to/repo
The Quick Start guide walks through parsing, querying, and exporting in five minutes.
Code-Graph-RAG runs as an MCP server so Claude Code and other MCP clients can query and edit your codebase directly. See the MCP Server guide for setup.
Getting Started
User Guide
Architecture
Python SDK
Advanced
Code-Graph-RAG is open source and free to use. For organisations that need more, we offer fully managed cloud-hosted solutions and on-premise deployments:
We also offer custom development, integration consulting, technical support contracts, and team training.
View plans & pricing at code-graph-rag.com
Please see CONTRIBUTING.md for contribution guidelines. Good first PRs come from the TODO issues.
For issues or questions, check the Troubleshooting guide first, then open an issue.
MIT. See LICENSE.
Install via CLI
npx mdskills install vitali87/code-graph-ragCode Graph RAG is a free, open-source AI agent skill. Code-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema. - Ruby Support: Ruby joins the graph through a new pluggable ast-grep tier that adds a language from a single YAML pattern file, emitt
Install Code Graph RAG with a single command:
npx mdskills install vitali87/code-graph-ragThis downloads the skill files into your project and your AI agent picks them up automatically.
Code Graph RAG works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.