从正确性、测试、安全与性能等维度进行深入代码审查并给出改进建议
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "review-areas" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/vscode-team-kit/main/review-areas/skills/review-areas/SKILL.md 2. 保存为 ~/.claude/skills/review-areas/SKILL.md 3. 装好后重载技能,告诉我可以用了
请从正确性、测试覆盖、安全风险、性能影响和产品行为五个角度审查这段改动代码,列出问题、风险等级、原因,并给出可执行的修复建议与补充测试建议。
一份结构化审查报告,包含问题清单、优先级、修改建议和测试补充项。
这次重构后功能表面可用,但我担心有隐藏 bug。请像资深审查者一样进行代码走查,重点找边界条件、异常处理、并发问题、回归风险和遗漏测试。
潜在缺陷与回归风险列表,并附上复现思路和修复方向。
请评估这组改动是否达到可发布标准:检查是否存在高风险逻辑错误、测试不足、安全隐患、性能退化或不符合产品预期的行为,并给出是否建议合并的结论。
发布前审查结论,包含是否建议合并、阻塞问题和建议处理顺序。
Fan out parallel read-only subagents, each assigned a different review area, then synthesize the highest-signal findings. This surfaces issues that a single-pass review misses because each subagent goes deep on its area instead of skimming everything.
Pick 2–4 areas based on the nature of the change. Not every review needs all areas — match the areas to the risk profile.
| Area | When to include | Focus |
|---|---|---|
| Correctness | Always | Logic errors, type safety, race conditions, null/undefined paths, unsafe casts, wrong behavior |
| Tests | When tests exist or should exist | Run tests, check failing/missing coverage, validate assertions match intent |
| Security | Auth, input handling, data flow changes | Input validation, auth checks, injection, data exposure |
| Performance | Hot paths, data structures, async changes | Algorithm complexity, unnecessary allocations, blocking async patterns |
| Product | UI, UX, or user-facing behavior changes | UX implications, feature completeness, accessibility gaps |
Before fanning out, build a concise change summary. Do not paste raw diffs into the subagent prompts — each subagent has tools to read files and inspect changes itself.
The summary should include:
Keep the summary under ~50 lines. Subagents get better results reading code in context than scanning a wall of diff.
Launch 2–4 parallel subagents using the area prompts below. Each subagent works in isolation — do not share one area's findings with another before synthesis.
Use unnamed subagents (no custom agent needed). Each gets a self-contained prompt with its area, the change summary, and the return format.
When all subagents return:
Always save the synthesized findings to session memory at /memories/session/review.md. This makes them available for follow-up turns, fix planning, and cross-referencing with future reviews.
Explore subagents to investigate the fix — this is faster and deeper than reading files inline. Give each Explore agent the finding, the relevant file paths, and ask it to return the specific change needed (what to replace, where).Keep only findings a senior engineer would block a PR for:
…
调用多模型交叉审查代码变更、PR与高风险修改,辅助发现缺陷与争议点
对本地或PR分支执行结构化代码审查,帮助提交或发布前发现问题。