代码变更审查
code-review
审查 diff、分支或 PR 的正确性、仓库规范和规格覆盖情况,并报告有证据支撑的发现
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-15
- Stars
- ★ 635
- Forks
- 91
01 前言 Front Matter
- name
- code-review
- description
- Review a diff, branch, or PR for correctness, repository standards, and spec coverage. Report evidence-backed findings.
02 资源文件 1
- 参考文档references/review-checklists.md7.7 KB
03 SKILL.md 正文
Code Review
Three-axis review of the diff between HEAD and a fixed point:
- Correctness — does the change work, and does it step on a NodeTool landmine?
- Standards — does it follow this repo's documented rules?
- Spec — does it faithfully implement the originating issue or spec?
Review all applicable axes. Use independent subagents when available, permitted, and useful for the diff. For a small diff or a host without delegation, review the axes locally. Keep review read-only unless the user also requested fixes.
Division of labor with the sibling skill: unslop asks whether the change is free of AI-generated filler. Use it when cleanup is requested or a concrete issue needs that guidance.
The rules the Correctness and Standards axes cite live in AGENTS.md, docs/DEVELOPMENT_STANDARDS.md, and the area AGENTS.md files.
Process
1. Pin the fixed point
Whatever the user named is the fixed point — a commit SHA, branch, tag, main, HEAD~5. If they named none, infer from what they asked for:
- Working tree:
git diff+git diff --cached, plus untracked files viagit status. - Branch or PR:
git diff $(git merge-base main HEAD)...HEAD— nevergit diff main, which picks up drift on main. For a PR, fetch the branch first.
Capture the diff command once, and the commit list via git log <fixed-point>..HEAD --oneline. Confirm the ref resolves (git rev-parse) and the diff is non-empty before going further — a bad ref should fail here, not inside three sub-agents.
2. Map the blast radius
npm run dev:nodetool -- affected --base main --json lists the workspaces to typecheck and test, and says whether a decorator package (loads from dist/) forces npm run build:packages. Don't guess.
3. Find the spec
In order:
- Issue references in the commit messages (
#123,Closes #45). - A path the user passed as an argument.
- A spec file under
docs/,specs/, or.scratch/matching the branch or feature. - Use acceptance criteria already provided in the conversation. If no spec exists, report that limitation and continue Correctness and Standards review. Ask only when a particular behavior cannot be assessed without a missing requirement.
4. Find the standards sources
AGENTS.md, docs/DEVELOPMENT_STANDARDS.md, the AGENTS.md for each area the diff touches, and anything else the repo documents about how code should be written.
On top of those, the Standards axis always carries the smell baseline below, which applies even where a repo documents nothing. Two rules bind it: a documented repo standard always wins, and every smell is a labelled heuristic ("possible Feature Envy"), never a hard violation.
5. Review the applicable axes
For a substantial diff, delegate independent axes with the host's available agent tools. Give each reviewer the diff scope, relevant source paths, requirements, and a read-only task. Do not depend on a particular tool name or agent subtype.
- Correctness: read changed functions and their callers. Identify an input or state that triggers each claimed failure. Enumerate consumers of shared types.
- Standards: cite the applicable repository rule. Treat the smell baseline as a heuristic requiring a concrete consequence, not an automatic violation.
- Spec: identify missing, incorrect, or unrequested behavior against the supplied acceptance criteria. Do not invent a spec when one is unavailable.
6. Verify
Use existing check results when they apply to the reviewed state. Run targeted checks for unresolved correctness questions. After making code fixes, complete mandatory post-change verification. Do not substitute a full suite or aggregate check merely because the diff is wide. Report actual results and any limits of verification.
7. Report
Verify delegated findings against the source, combine duplicates, and lead with concrete failures ordered by severity. Label each finding's axis and give the location, trigger or cited rule, consequence, and suggested correction. Match length to the findings. If no findings are supported, say so and describe what was checked and what remains unverified.
Read review-checklists.md for the areas the diff touches and for the optional smell baseline.
Severity
| Tier | Meaning | Bar |
|---|---|---|
| Blocker | Wrong behavior, crash, data loss, security hole, broken build | You can name the input or state that triggers it |
| Should-fix | Violates a written repo rule | Cite the rule |
| Nit | Everything else worth a sentence | Only if you found nothing bigger in that file; never pad |
A finding without a failure scenario or a citable rule is not a finding. When unsure whether something is a bug, say so instead of inflating the severity.
What not to flag
- Anything
npm run lintornpm run typecheckalready rejects — report their output instead of duplicating it as prose findings. - Style preferences with no backing in the repo docs. "I'd have written it differently" is not a finding.
- Pre-existing problems outside the diff. Mention once at the end if serious; don't mix them into the findings.
- Slop — comments, dead abstractions, prose filler. One pointer to
unslop, not itemized findings.
Output format
Order supported findings by severity and label their axis. For example:
[BLOCKER] packages/kernel/src/actor.ts:142 — `pending` is never cleared on error
When a node throws, `handleError` returns early before `this.pending.delete(id)`,
so the runner waits forever on the next `sync_mode: on_any` join.
Fix: move the delete into a `finally`.
One line of location and claim, the failure scenario, the fix. Close with what you actually ran:
Verified: npm run build --workspace=packages/kernel ✓, npm run test --workspace=packages/kernel ✓ (34 passed)
If nothing is wrong, say so plainly and list what you checked — a clean review is a valid result, not a failure to find something.
04 同仓库更多 Skills
humanizer
Rewrite AI-sounding text so it reads like the writer without changing what it says. Use when editing or reviewing prose for AI tells: not-X-but-Y contrasts, one-line closers, staged openers, forced triads, dashes everywhere, inflated claims, sales language, stock AI words, bold labels, or filler.
NodeTool可视化AI工作流构建
nodetool
使用 NodeTool MCP 服务器构建、验证、运行和调试可视化 AI 工作流,并处理资产、集合和任务。当用户提及 NodeTool,或要求在其 NodeTool 服务器上创建工作流图、节点或运行媒体生成时使用。
Wan 2.6 视频提示词编写
wan-2-6-prompting
为阿里的 Wan 2.6 视频模型编写提示词——文生视频采用全局风格描述行加上按时间用括号标记的分镜,图生视频只描述随时间变化的内容。涵盖各服务商的镜头模式切换、提示词预算、负面提示词、运动强度措辞、音频输入和提示词扩展。当模型 ID 指定 Wan 2.6 视频路由(alibaba/wan-2.6/text-to-video、alibaba/wan-2.6/image-to-video、wan-video/wan-2.6-t2v、wan-video/wan-2.6-i2v、wan-video/wan2.6-i2v-flash)用于 generate_video、animate_image 或 TextToVideo 节点时使用。不适用于 Wan 2.5 或 2.7,也不适用于 Wan 2.6 图像路由。
可复用视频工作流搭建
video-workflow
构建可复用的 NodeTool 视频工作流,用于批量处理或重复输入。若只需制作单个成品,请使用 storyboard(分镜)技能。
参考视频镜头结构复刻
video-clone
分析参考视频,并在 NodeTool 中使用新产品或新演员重现其镜头结构。
多场景视频音频连续性处理
video-audio-continuity
让由生成视频剪辑而成的多场景作品中的声音保持连续——为什么每个场景各生成一段片段会在每处边界硬切音频、何时改为把所有场景写入同一次生成、能在服务商版权过滤下保留下来的声音设计词汇,以及如何检查返回内容的时长、宽高比和混音效果。当作品包含多个场景且视频模型会自行生成音频(Seedance 2、Veo 3、MiniMax H3、Kling 2.6 及更高版本),或剪辑的声音在镜头切换处中断时使用。