Token导航 LogoToken导航

Agent Skill · 研究检索

code-review-graph(代码审查图)

code-review-graph 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

code-review-graph 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 8,279。

总安装 16,746周安装 712GitHub Stars 39下载 5,867核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-review-graph(代码审查图)
来源仓库:https://github.com/aradotso/trending-skills
仓库路径:skills/code-review-graph
安装命令:
npx skills add https://github.com/aradotso/trending-skills --skill code-review-graph
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aradotso/trending-skills --skill code-review-graph

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

Code Review Graph 构建代码库的持久化结构图谱,利用 Tree-sitter 解析并存储为 SQLite 图数据库。适用于大型单体仓库的高效审查,通过查询图谱缩小变更影响范围,显著减少 token 消耗。推荐通过 Claude Code Plugin 安装,支持增量更新和精准定位修改波及的文件集。

需初始化 git 仓库并在本地运行,首次构建图谱可能耗时较长,建议在非高峰时段执行。code-review-graph 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/code-review-graph

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/aradotso/trending-skills --skill code-review-g…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

code-review-graph 怎么安装?

在终端执行 npx skills add https://github.com/aradotso/trending-skills --skill code-review-graph。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

code-review-graph 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

code-review-graph 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

code-review-graph 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

code-review-graph 用的人多吗?

公开数据是累计安装 16,746 次,近一周安装 712 次,下载 5,867 次,GitHub 39 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

code-review-graph 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
code-review-graph

代码审查图 · 本页

16,74639操作浏览器未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

code-review-graph

Skill by ara.so — Daily 2026 Skills collection.

code-review-graph builds a persistent structural map of a codebase using Tree-sitter, stores it in a local SQLite graph, and exposes it to Claude via MCP. Instead of re-reading entire projects on every task, Claude queries the graph and reads only the files in the blast radius of a change — averaging 6.8× fewer tokens on code reviews and up to 49× on daily coding tasks in large monorepos.


Installation

Claude Code Plugin (recommended)

claude plugin marketplace add tirth8205/code-review-graph
claude plugin install code-review-graph@code-review-graph

Restart Claude Code after installation.

pip

pip install code-review-graph
code-review-graph install   # registers the MCP server with Claude Code

Requires Python 3.10+ and uv.

Optional: semantic search support

pip install code-review-graph[embeddings]

Enables vector embeddings via sentence-transformers for semantic_search_nodes_tool.


Initial Setup

After installation, open your project in Claude Code and run:

Build the code review graph for this project

Or use the slash command:

/code-review-graph:build-graph

The first build parses the full codebase (~10 seconds for 500 files). After that, the graph updates incrementally on every file save and git commit (under 2 seconds for a 2,900-file project).


CLI Reference

# Register MCP server with Claude Code
code-review-graph install

# Parse entire codebase into the graph (first run)
code-review-graph build

# Re-parse only changed files (subsequent runs)
code-review-graph update

# Show graph statistics: node count, edge count, language breakdown
code-review-graph status

# Auto-update the graph as you save files (continuous watch mode)
code-review-graph watch

# Generate an interactive D3.js HTML visualisation of the graph
code-review-graph visualize

# Start the MCP server manually (Claude Code does this automatically)
code-review-graph serve

Slash Commands in Claude Code

CommandWhat it does
/code-review-graph:build-graphBuild or rebuild the code graph from scratch
/code-review-graph:review-deltaReview changes since the last commit
/code-review-graph:review-prFull PR review with blast-radius analysis

MCP Tools (used automatically by Claude)

Once the graph is built, Claude calls these tools without manual prompting:

ToolPurpose
build_or_update_graph_toolBuild or incrementally update the graph
get_impact_radius_toolFind all files/functions affected by a change
get_review_context_toolReturn a token-optimised structural summary for review
query_graph_toolQuery callers, callees, tests, imports, inheritance
semantic_search_nodes_toolSearch code entities by name or meaning
embed_graph_toolCompute vector embeddings for semantic search
list_graph_stats_toolGraph size and health statistics
get_docs_section_toolRetrieve documentation sections
find_large_functions_toolFind functions/classes over a line-count threshold

Configuration: Ignoring Paths

Create .code-review-graphignore in the repository root:

generated/**
*.generated.ts
vendor/**
node_modules/**
dist/**
__pycache__/**
*.pyc
migrations/**

The graph will skip these paths during build and update.


Python API

The graph can be queried programmatically for custom tooling or scripts.

Build and update the graph

from code_review_graph import GraphBuilder

builder = GraphBuilder(repo_path="/path/to/your/project")

# Full build (first time)
stats = builder.build()
print(f"Nodes: {stats['nodes']}, Edges: {stats['edges']}")

# Incremental update (subsequent runs — only parses changed files)
update_stats = builder.update()
print(f"Re-parsed: {update_stats['files_updated']} files")

Query the graph

from code_review_graph import GraphQuery

query = GraphQuery(repo_path="/path/to/your/project")

# Find all callers of a function
callers = query.get_callers("authenticate_user")
print(callers)
# ['api/views.py::login_view', 'tests/test_auth.py::test_login']

# Find all callees (functions called by a function)
callees = query.get_callees("process_payment")
print(callees)

# Find tests that cover a file
tests = query.get_tests_for("payments/processor.py")
print(tests)

# Get inheritance chain for a class
parents = query.get_inheritance("AdminUser")
print(parents)
# ['BaseUser', 'PermissionMixin']

Blast-radius analysis

from code_review_graph import ImpactAnalyzer

analyzer = ImpactAnalyzer(repo_path="/path/to/your/project")

# What is affected if this file changes?
impact = analyzer.get_impact_radius("auth/models.py")
print(impact)
# {
#   "direct_callers": ["api/views.py", "middleware/auth.py"],
#   "transitive_dependents": ["api/tests/test_views.py", "integration/test_flow.py"],
#   "test_files": ["tests/test_auth.py"],
#   "blast_radius_size": 7
# }

# Multiple changed files (e.g., from a git diff)
changed_files = ["auth/models.py", "payments/processor.py"]
combined_impact = analyzer.get_impact_radius(changed_files)

Semantic search

from code_review_graph import SemanticSearch

# Requires: pip install code-review-graph[embeddings]
search = SemanticSearch(repo_path="/path/to/your/project")

# Embed the graph (one-time, cached)
search.embed()

# Search for code entities by concept
results = search.search("rate limiting middleware", top_k=5)
for r in results:
    print(r["node"], r["file"], r["score"])

Find large functions

from code_review_graph import GraphQuery

query = GraphQuery(repo_path="/path/to/your/project")

# Find functions/classes over 50 lines (good for refactoring targets)
large = query.find_large_functions(threshold=50)
for item in large:
    print(f"{item['name']} in {item['file']}: {item['lines']} lines")

Common Patterns

Pattern: Review only what changed in the current branch

# In Claude Code, after making changes:
/code-review-graph:review-delta

Claude will:

  1. Call build_or_update_graph_tool to sync the graph with your edits
  2. Call get_impact_radius_tool on changed files
  3. Call get_review_context_tool to get a compact structural summary
  4. Review only the relevant ~15 files instead of the full codebase

Pattern: Continuous watch during development

# Terminal 1: keep the graph fresh as you code
code-review-graph watch

# Terminal 2: your normal development workflow

Any file save triggers an incremental re-parse of only that file and its dependents.

Pattern: Pre-commit hook

# .git/hooks/pre-commit
#!/bin/sh
code-review-graph update

Makes the graph always current before Claude sees a commit.

Pattern: Visualise the dependency graph

code-review-graph visualize
# Opens an interactive D3.js force-directed graph in your browser
# Toggle edge types: calls, imports, inheritance, test coverage
# Search nodes by name

Pattern: Check graph health

code-review-graph status
# Example output:
# Graph: .code-review-graph/graph.db
# Nodes: 4,821 (functions: 2,103 | classes: 487 | files: 312)
# Edges: 11,204 (calls: 7,891 | imports: 2,108 | inherits: 205 | tests: 1,000)
# Languages: Python (180), TypeScript (98), JavaScript (34)
# Last updated: 2026-03-26 01:22:11 (3 files changed)

Supported Languages

Python, TypeScript, JavaScript, Vue, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, Solidity, C/C++

Each language has full Tree-sitter grammar support for: functions, classes, imports, call sites, inheritance chains, and test detection.


Adding a New Language

Edit code_review_graph/parser.py:

# 1. Add file extension mapping
EXTENSION_TO_LANGUAGE = {
    # ... existing entries ...
    ".ex": "elixir",
    ".exs": "elixir",
}

# 2. Add AST node type mappings for the new language
_CLASS_TYPES["elixir"] = {"defmodule"}
_FUNCTION_TYPES["elixir"] = {"def", "defp"}
_IMPORT_TYPES["elixir"] = {"alias", "import", "use", "require"}
_CALL_TYPES["elixir"] = {"call"}

Then add a test fixture in tests/fixtures/elixir/ and open a PR.


Where the Graph Is Stored

The graph is stored locally in .code-review-graph/graph.db (SQLite). There is no external database, no cloud dependency, and no data leaves your machine. Add it to .gitignore if you don't want it committed:

echo ".code-review-graph/" >> .gitignore

Or commit it to share the pre-built graph with your team (saves the ~10-second initial build for each developer).


Troubleshooting

Graph is stale / not reflecting recent changes

code-review-graph update    # incremental re-parse of changed files
# or, if something seems wrong:
code-review-graph build     # full rebuild from scratch

MCP server not connecting to Claude Code

# Re-register the MCP server
code-review-graph install

# Verify it's registered
claude mcp list

Then restart Claude Code.

uv not found

# Install uv (required by the MCP server runner)
curl -LsSf https://astral.sh/uv/install.sh | sh
# or
pip install uv

Semantic search not working

# Install the embeddings extra
pip install "code-review-graph[embeddings]"

# Compute embeddings (required once after install)
code-review-graph embed    # or call embed_graph_tool via Claude

A language isn't being parsed

Check that the file extension is in EXTENSION_TO_LANGUAGE and the corresponding Tree-sitter grammar is installed. Run code-review-graph status to see which languages were detected in your project.

Build is slow on first run

Expected — Tree-sitter parses every file. A 500-file project takes ~10 seconds. All subsequent update calls complete in under 2 seconds because only changed files are re-parsed (detected via SHA-256 hash comparison).


How the Token Reduction Works

On every review or coding task:

  1. Graph query: Claude calls get_impact_radius_tool with the changed files
  2. Blast-radius tracing: the graph follows call edges, import edges, and test edges to find every affected node
  3. Compact summary: get_review_context_tool returns a 156–207 token structural summary (callers, dependents, test coverage gaps, dependency chains)
  4. Targeted reading: Claude reads only the ~15 files in the blast radius, not the full codebase

In the Next.js monorepo (27,732 files): without the graph Claude reads ~739K tokens; with the graph it reads ~15K tokens — a 49× reduction.

平台分布

Codex

34.66%
按下载量换算2,034

Claude

27.67%
按下载量换算1,623

Cursor

20.02%
按下载量换算1,175

Gemini CLI

10.56%
按下载量换算620

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills