跳到正文
Skillpedia
通用编程17k · #10798

review-agent

它能做什么

这个技能让智能体阅读一组代码修改,报告其中的错误和风险,且不改动任何文件。适合希望在合并前进行仔细复查的开发者。

适用场景

  • ✓当你想在提交未提交的修改之前,获得第二意见时。
  • ✓当你需要审阅某个分支与其基础分支之间的差异时。
  • ✓当其他智能体或同事请求对某个特定提交进行只读检查时。

技能链接

https://github.com/HKUDS/DeepCode/blob/main/core/skills/builtin/review-agent/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/DeepCode/blob/main/core/skills/builtin/review-agent/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请审阅我未提交的修改,告诉我其中真实存在的问题,并且不要改动文件。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会阅读差异及其周围的代码,检查相关的测试和调用方,并只报告它能够确认的问题。它不会编辑、提交或发布任何内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Review Agent

Inspect the requested target directly and return every finding that the author would likely fix. Do not modify files, create commits, push branches, post review comments, or delegate the review to another agent.

Review the change

  1. Read the applicable AGENTS.md instructions.
  2. Inspect the complete diff for the requested target and enough surrounding code to understand each changed path.
  3. Identify concrete regressions introduced by the change. Continue through the whole diff after finding the first issue.
  4. Check the relevant tests and call sites to confirm that each finding is real and actionable.

For a base-branch review, compare the changes that would actually merge rather than diffing directly against the branch tip. Resolve the comparison ref to the branch's upstream when that upstream exists and is ahead of the local branch; otherwise use the local branch. Run git merge-base HEAD <comparison-ref>, then inspect git diff <merge-base-sha>. If the local branch cannot be resolved, try its configured upstream explicitly before reporting that the target is unavailable.

Flag an issue only when all of these are true:

  • It affects correctness, security, performance, or maintainability in a meaningful way.
  • It is discrete and actionable.
  • It was introduced by the reviewed change.
  • The affected scenario or call path can be demonstrated from the code.
  • The author would probably fix it if they knew about it.

Do not flag speculative concerns, pre-existing problems, intentional behavior changes, or style nits that do not obscure the code.

Write the result

Present findings first, ordered by severity. Use one entry per issue in this form:

[P1] Imperative finding title — path/to/file.rs:line

Follow the title with one short paragraph explaining the affected scenario and why the behavior is wrong. Keep the cited range as small as possible and make sure it overlaps the reviewed diff.

Use these priorities:

  • P0: universal release blocker or critical failure.
  • P1: urgent defect that should be fixed next.
  • P2: ordinary defect that should be fixed.
  • P3: low-impact issue that is still worth fixing.

If there are no qualifying findings, say No findings. Do not invent a finding to fill the result. After the findings, add a brief overall assessment and mention any material test gaps or residual risks.

常见问题

它会改动我的代码吗?

不会。审阅是只读的,不会修改文件、创建提交或发布评论。

它会报告细小的风格问题吗?

它专注于影响正确性、安全性、性能或可维护性的有意义且可行动的问题。

它可以审阅什么?

它可以审阅未提交的修改、与基础分支比较的分支、某个提交,或你给出的自定义说明。

详情

作者的原始描述

Perform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.

repo: HKUDS/DeepCode

热度

GitHub 星标
17k
排名
#10798
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能