code-review-graph is a local-first code intelligence graph that builds a persistent structural map of a codebase and supplies relevant context to AI coding tools through MCP and a CLI. It is used for code review and large-repository workflows, with catalogue add-ons providing integrations and instructions for operating it.
Borrowing it
Nothing to install: this file belongs to tirth8205/code-review-graph. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tirth8205/code-review-graph/staging/CLAUDE.mdgit clone --depth 1 https://github.com/tirth8205/code-review-graphWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/tirth8205/code-review-graph/claude-md)<a href="https://agentmods.dev/instructions/tirth8205/code-review-graph/claude-md"><img src="https://agentmods.dev/badge/instructions/tirth8205/code-review-graph/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/tirth8205/code-review-graph/claude-md"><img src="https://agentmods.dev/badge/instructions/tirth8205/code-review-graph/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03522 | $0.03522 |
| Opus 5.5 | $0.01409 | $0.01409 |
| Sonnet 5.5 | $0.00704 | $0.00704 |
| Haiku 4.5 | $0.00352 | $0.00352 |
Grade A, and why
code-review-graph CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md - Project Context for Claude Code
Project Overview
code-review-graph is a local-first knowledge graph for code review. It parses a repository with Tree-sitter (plus targeted fallbacks), stores nodes and edges in SQLite, updates the graph incrementally from Git changes, and serves compact context over MCP and the CLI to AI coding tools. Supported platforms are the entries in PLATFORMS in skills.py: Claude Code, Codex, Cursor, Windsurf, Zed, Continue, OpenCode, Antigravity, Gemini CLI, Qwen Code, Kiro, Qoder, GitHub Copilot, GitHub Copilot CLI, Hermes Agent and CodeBuddy Code.
Graph Tool Usage (Token-Efficient)
When using code-review-graph MCP tools:
- Call
get_minimal_context_tool(task="<description>")first. It costs about 100 tokens and gives the overview. - Use
detail_level="minimal"on every later call unless that is not enough. - Prefer
query_graph_toolwith a specific target over broadlist_*calls. - Follow the
next_tool_suggestionsfield in each response. - Target: at most 5 tool calls and 800 tokens of graph context per task.
All registered tool names end in _tool. The 30 tools are defined in main.py.
Architecture
Core package code_review_graph/ (Python 3.10+):
main.py: FastMCP server entry point. Registers 30 tools and 5 prompts.tools/: tool implementations by domain:build.py,query.py,review.py,context.py,flows_tools.py,community_tools.py,refactor_tools.py,docs.py,registry_tools.py,analysis_tools.py; shared helpers in_common.py.prompts.py: 5 MCP prompts (review_changes, architecture_map, debug_issue, onboard_developer, pre_merge_check).cli.py: thecode-review-graphcommand.daemon.pyanddaemon_cli.py: thecrg-daemonmulti-repo watch daemon.parser.py: Tree-sitter multi-language parser with fallbacks for notebooks and other formats.custom_languages.py: languages defined in.code-review-graph/languages.toml(see docs/CUSTOM_LANGUAGES.md).graph.py: SQLite graph store (nodes, edges, impact analysis).migrations.py: schema migrations; the current schema version is 13 and must equalSUPPORTED_SCHEMA_VERSIONin the VS Code extension (CI checks this).incremental.py: full build, Git/SVN change detection, incremental update, stale-file reconciliation, watch mode.postprocessing.py: shared post-build pipeline (signatures, flows, communities, FTS).- Post-build resolvers:
python_resolver.py,jedi_resolver.py(optionalenrichmentextra),spring_resolver.py,event_resolver.py,temporal_resolver.py,config_keys.py,scoped_resolver.py(PHP, Rust, C#),rescript_resolver.py,hcl_resolver.py,tsconfig_resolver.py(tsconfig and jsconfig path aliases). flows.py: execution flows and criticality.communities.py: Leiden via igraph (optional) or file-based grouping, plus the architecture overview.analysis.py: hub and bridge nodes, knowledge gaps, surprise scoring, suggested questions.search.py: FTS5 keyword search combined with optional vector search.embeddings.py: providers for local sentence-transformers, OpenAI-compatible endpoints, Google Gemini, MiniMax and Voyage AI.changes.py: risk-scored change analysis.refactor.py: rename preview, dead code, suggestions.hints.py:next_tool_suggestions.uncertainty.py:confidencenotes on empty results.context_savings.py: estimated context-savings metadata.visualization.py: D3.js HTML graph (D3 is bundled inassets/).exports.py: JSON, GraphML, Neo4j Cypher, Obsidian, SVG.wiki.py: Markdown wiki.graph_diff.py: snapshot diffing.memory.py: stored Q&A feedback.skills.py:install(platform MCP configs, hooks, skills, instruction blocks)._legacy_instructions.py: instruction blocks shipped by earlier releases.jsonc.py: comment-preserving JSONC tokenising and splices, shared by install and uninstall so neither flattens a commented config.uninstall.py: reversesinstall.enrich.py: PreToolUse hook enrichment.forget.py: drops files from the graph.registry.py: multi-repo registry.http_origin_guard.py: Host/Origin checks forserve --http.token_benchmark.pyandeval/: benchmarks.constants.py: shared constants.docs/LLM-OPTIMIZED-REFERENCE.md: the reference served byget_docs_section_tool.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +8 lines · +152 tokens per session 10e26d89c17b
- 1mo ago Changed · +100 tokens per session f6bd110fe923
- 1mo ago Changed · +1 lines · +105 tokens per session 6b4db8fa5ad5
- 1mo ago Changed · -7 lines · +501 tokens per session 24c832545a29
- 1mo ago First seen · 215 lines · 2,664 tokens per session scan A 6da421de9703
code-review-graph CLAUDE.md is an instructions file published in the GitHub repository tirth8205/code-review-graph (32,411 stars, last pushed 11d ago), licensed MIT. It adds 3,522 tokens to every session, about $0.0141 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.