Srinivasan-78

Repo2graph — AI skill for Claude Code

AI community

Give coding agents trustworthy, cited answers about your codebase.

How to install Repo2graph

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Srinivasan-78/repo2graph and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Repo2graph does

Give coding agents trustworthy, cited answers about your codebase. Code graph + MCP server, no LLM required.

Alternatives in AI

  • Nocturne Memory — A lightweight, rollbackable, and visual Long-Term Memory Server for MCP Agents 1.3k ★
  • Memtrace Public — Structural memory for AI coding agents 466 ★
  • Octocode — Structural code intelligence for AI agents — semantic search, knowledge graphs, and a built-in MCP server in o 464 ★

README

repo2graph

**Cited, token-bounded answers about a codebase, for coding agents and CI.**

[![PyPI](https://img.shields.io/pypi/v/repo2graph.svg?color=blue&label=PyPI)](https://pypi.org/project/repo2graph/) [![CI](https://github.com/Srinivasan-78/repo2graph/actions/workflows/ci.yml/badge.svg)](https://github.com/Srinivasan-78/repo2graph/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

repo2graph building a map of a repository, then answering a question about it, in a terminal

Ask a repository a question and get back the source that answers it. Every block is headed `[cite: path:start-end]`, and the whole reply fits under a token ceiling that the tool enforces. One tree-sitter pass records who calls whom, who imports what, and which files keep changing together in git. Retrieval starts from BM25 matches and follows those links.

It needs no model, no API key, no language server and no database. Building, querying and the MCP server make no network calls; the only exceptions are `rag --answer` (opt-in, sends the pack to an LLM), `repo2graph github` and a `rag`/`query` target given as a GitHub spec (both clone a repository), and `--vectors`/`embed` (download the embedding model on first use). Parsers are part of that promise: `tree-sitter-language-pack` is pinned below 1.0 so every grammar arrives compiled into the installed wheel, rather than being downloaded on first parse — see [SECURITY.md](.github/SECURITY.md#why-this-is-safe-for-enterprise-use). Use it from the CLI, as an MCP server in Claude Code or Cursor, or as a GitHub Action.

Try it

uvx repo2graph demo                                   # bundled example repo, five questions answered
uvx repo2graph build . -o .r2g                        # index your own code
uvx repo2graph rag "how does routing work" -o