通用编程33k · #9142
review-changes
它能做什么
这个技能指导智能体使用 code-review-graph 工具审查代码修改。适合希望进行结构化、基于风险审查的开发者和审阅者。
适用场景
- ✓当你有代码修改,并希望在合并前进行检查时。
- ✓当你需要查看哪些高风险函数缺少测试覆盖时。
- ✓当你希望根据修改的影响给出明确的合并建议时。
技能链接
https://github.com/tirth8205/code-review-graph/blob/staging/skills/review-changes/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/tirth8205/code-review-graph/blob/staging/skills/review-changes/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add tirth8205/code-review-graph --skill review-changes
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/tirth8205/code-review-graph/staging/skills/review-changes/SKILL.md -o SKILL.md
可以这样问 AI
“能审查我当前的修改,按风险排序,并告诉我哪些部分缺少测试吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体运行变更检测,检查风险函数的测试覆盖,审视影响范围,并按风险对发现的问题进行分组。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Review Changes
Review a change set with risk scores and blast radius from the knowledge graph.
Steps
- Call
detect_changes_toolfor risk-scored changed functions, test gaps and affected flows. - Call
get_affected_flows_toolonly when you need the steps of an affected flow. - For each high-risk function, call
query_graph_toolwithpattern="tests_for"to check test coverage. - Call
get_impact_radius_toolwhen the blast radius is not clear from step 1. - Suggest specific test cases for untested changes.
Output Format
Group findings by risk level (high, medium, low). For each finding give what changed and why it matters, its test coverage, and the suggested fix. End with a merge recommendation.
Token Efficiency Rules
- Call
get_minimal_context_tool(task="<your task>")before any other graph tool. - Pass
detail_level="minimal"wherever a tool accepts it. Use "standard" only when minimal is not enough. - Prefer a targeted
query_graph_toolcall over a broad listing call. - Budget: about five tool calls and 800 tokens of graph output per task.
- Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.
常见问题
发现的问题如何分组?
按高、中、低风险分组,每组包含修改内容、测试覆盖情况和建议的修复方法。
会建议测试吗?
会。技能会为未经测试的修改提出具体的测试用例。
会给出结论吗?
会。最后会给出合并建议。
详情
作者的原始描述
Perform a structured code review using change detection and impact
热度
- GitHub 星标
- 33k
- 排名
- #9142
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …