claude-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<EXTREMELY-IMPORTANT>
This skill is review orchestration, not code editing.
Non-negotiable rules:
- Read the real diff before building the reviewer prompt.
- Always use isolated review execution.
- Tell the reviewer to report only, never modify code.
- Carry forward exclusion lists on repeated rounds so fixed findings are not re-reported.
- Verify returned findings before acting on them.
<EXTREMELY-IMPORTANT>
本Skill用于审查编排,而非代码编辑。
不可违背的规则:
- 在构建审查提示词前,先读取真实的差异内容。
- 始终使用隔离式审查执行方式。
- 告知审查工具仅需提交报告,绝不修改代码。
- 在多轮审查中沿用排除列表,避免已修复的问题被重复报告。
- 在处理返回的审查结果前,先对其进行验证。
Claude Review
Claude审查
Inputs
输入项
- : Optional scope hint such as
$request,last commit,uncommitted, orauth focusround 2
- :可选的范围提示,例如
$request(最后一次提交)、last commit(未提交变更)、uncommitted(重点审查认证模块)或auth focus(第二轮审查)round 2
Goal
目标
Create a focused Claude review that:
- derives its scope from the real diff
- gives the reviewer the right focus areas
- runs in isolation from the main working tree
- returns actionable findings without changing code
创建一个聚焦的Claude审查流程,实现:
- 从真实差异内容中确定审查范围
- 为审查工具指明正确的重点关注领域
- 在独立于主工作树的环境中运行审查
- 返回可执行的审查结果但不修改代码
Step 0: Resolve the review scope
步骤0:确定审查范围
Determine whether the user wants:
- full branch review
- last-commit review
- uncommitted review
- targeted review of a subsystem or recent task
Read the relevant diff summary and changed-file list before building the prompt.
If there is nothing to review, stop and say so explicitly.
Success criteria: The review scope is explicit and backed by a real diff.
判断用户需要的审查类型:
- 全分支审查
- 最后一次提交审查
- 未提交变更审查
- 针对子系统或近期任务的定向审查
在构建提示词前,先读取相关的差异摘要和变更文件列表。
如果没有可审查的内容,需明确告知用户并停止操作。
成功标准:审查范围明确,且有真实的差异内容作为依据。
Step 1: Build a focused review brief
步骤1:构建聚焦的审查简报
Use the diff to identify:
- changed files
- changed directories or subsystems
- likely risk areas such as auth, secrets, concurrency, shelling out, migrations, or tests
- issues already fixed in previous rounds that should not be re-reported
The prompt should include:
- review base and scope
- changed-file list
- focused risk areas
- explicit report-only instruction
- desired output format
Success criteria: The reviewer brief is specific to the actual changes, not generic boilerplate.
利用差异内容识别:
- 变更的文件
- 变更的目录或子系统
- 潜在的风险领域,如认证、密钥、并发处理、外部命令调用、数据迁移或测试代码
- 前几轮审查中已修复、不应再被报告的问题
提示词应包含:
- 审查基准和范围
- 变更文件列表
- 聚焦的风险领域
- 明确的"仅报告"指令
- 期望的输出格式
成功标准:审查简报针对实际变更内容定制,而非通用模板。
Step 2: Launch the isolated reviewer
步骤2:启动隔离式审查工具
Use with:
Agentsubagent_type: general-purposeisolation: "worktree"- a prompt that says:
- read the full diff
- read surrounding file context
- verify each finding before reporting
- do not make code changes
- report findings as a markdown table:
| # | Priority | File:Line | Description | Suggested Fix | - priority levels: P1 (crash/security), P2 (incorrect behavior), P3 (minor)
- if nothing significant is found, say so explicitly
If the review is expected to take a while, background execution is acceptable, but keep the scope tight enough that the reviewer stays focused.
Success criteria: The review runs in an isolated worktree and cannot mutate the active working copy.
使用,配置:
Agent- (通用型子代理)
subagent_type: general-purpose - (工作树隔离)
isolation: "worktree" - 提示词需包含:
- 读取完整的差异内容
- 读取文件的上下文内容
- 在报告前验证每个审查结果
- 不得修改代码
- 以Markdown表格形式报告结果:
| # | Priority | File:Line | Description | Suggested Fix | - 优先级等级:P1(崩溃/安全问题)、P2(行为异常)、P3( minor问题)
- 如果未发现重大问题,需明确告知
如果审查预计耗时较长,可采用后台执行方式,但需确保审查范围足够聚焦,避免审查工具偏离重点。
成功标准:审查在隔离的工作树中运行,无法修改当前活跃的工作副本。
Step 3: Parse and summarize findings
步骤3:解析并总结审查结果
Report:
- scope reviewed
- findings grouped by priority
- file and line references
- explicit clean result when no material findings are returned
Treat reviewer output as candidate findings, not automatic truth. If the user wants fixes, verify each finding locally first.
Success criteria: The user gets a readable review summary without needing to parse raw agent output.
报告内容包括:
- 已审查的范围
- 按优先级分组的审查结果
- 文件和行号引用
- 当未发现实质性问题时,明确给出无问题结果
将审查工具的输出视为候选结果,而非绝对事实。如果用户需要修复,需先在本地验证每个审查结果。
成功标准:用户无需解析原始Agent输出,即可获得易读的审查摘要。
Step 4: Iterate only when useful
步骤4:仅在必要时进行迭代审查
On a second or later round:
- include previously fixed findings in the exclusion list
- tighten the review focus to new or modified areas
- avoid rerunning a generic full-branch review if only a few files changed
Success criteria: Each new round looks for genuinely new issues instead of rehashing old ones.
在第二轮及后续审查中:
- 将之前已修复的问题加入排除列表
- 将审查重点收紧至新增或修改的区域
- 如果仅少数文件变更,避免重新运行通用的全分支审查
成功标准:每一轮新审查都聚焦于真正的新问题,而非重复讨论已解决的问题。
Comparison with Sibling Skills
与同类Skill对比
| Skill | Tool | Best For |
|---|---|---|
| Claude Code (Agent) | Deep code understanding, context-aware review |
| OpenAI Codex CLI | Independent perspective, repro scripts |
| Kiro CLI | Alternative AI perspective |
For critical code, run all three and cross-reference findings. The overlap between reviewers catches more bugs than any single tool.
| Skill | 工具 | 适用场景 |
|---|---|---|
| Claude Code (Agent) | 深度代码理解、上下文感知的审查 |
| OpenAI Codex CLI | 独立视角、复现脚本生成 |
| Kiro CLI | 替代AI视角的审查 |
对于关键代码,建议同时运行这三个工具并交叉验证结果。多个审查工具的重叠发现比单一工具能捕获更多Bug。
Guardrails
防护规则
- Do not add ; this skill already uses the agent runtime directly.
context: fork - Do not let the reviewer edit code.
- Do not skip diff reading before prompt construction.
- Do not include real secret values in the prompt or summary.
- Do not run this skill proactively; it is explicit-user-only.
- 请勿添加;本Skill已直接使用Agent运行时。
context: fork - 禁止让审查工具编辑代码。
- 构建提示词前,请勿跳过读取差异内容的步骤。
- 请勿在提示词或摘要中包含真实的密钥值。
- 请勿主动运行本Skill;仅在用户明确请求时执行。
Output Contract
输出约定
Report:
- review scope
- changed areas emphasized in the prompt
- findings by priority with
file:line - explicit clean result if no significant findings were returned
- whether a later review round should exclude prior fixed issues
报告需包含:
- 审查范围
- 提示词中重点强调的变更区域
- 按优先级排列的审查结果,包含信息
file:line - 若未发现重大问题,明确给出无问题结果
- 后续审查是否应排除之前已修复的问题