review-branch
GitHub用于对代码分支进行非侵入式审查,评估 PR 风格发现、回归风险及合并前质量。通过对比差异、检查上下文和验证候选问题,输出按严重性排序的可操作发现,辅助决策是否合并。
触发场景
安装
npx skills add videojs/video.js --skill review-branch -g -y
SKILL.md
Frontmatter
{
"name": "review-branch",
"description": "Review the current branch without editing code. Use for PR-style findings, regressions, merge-base comparison, or pre-merge risk assessment."
}
Branch review
Review the branch as a whole; do not implement fixes.
- Determine the intended base and inspect the merge-base diff, commit history, and working tree separately.
- Fetch a linked issue or PR when supplied and derive the acceptance boundary.
- Read changed code in context, including callers, tests, exports, and relevant configuration.
- Check whether the change is a good citizen of the whole codebase and documentation: follow established ownership, naming, architecture, public contracts, and nearby patterns rather than judging the diff in isolation.
- Apply only the domain constraints and review criteria that the changed surface requires. For files under
site/src/content/docs/, check that each page still reads like the shape it claims (how-to, concept, or reference), persite/src/content/docs/writing-style/write-guides.mdx. - Prioritize correctness, regressions, security, accessibility, public compatibility, and missing tests. Avoid style findings already enforced by tools.
- Collect candidates in separate passes: the changed lines alone; written rules in the nearest
AGENTS.mdfiles, quoting the rule; comments around the change, including untouched invariants or ordering warnings; andgit log/git blamefor earlier fixes the branch reverts. - Verify each candidate before keeping it. Trace consumed values to their origin, compare against an existing working use of the same API or pattern, confirm the failure mechanism in the actual source, and name a concrete trigger with its wrong outcome. Drop candidates that fail any step.
- Score survivors 0–100 for certainty that a maintainer would fix them before merge. Report only 80 or higher; do not demote dropped candidates into possible issues. Exclude pre-existing issues on unchanged lines and clearly intentional behavior changes.
Lead with findings ordered by severity. For each, include the file/line, concrete failure mode, evidence, and smallest correction. Then summarize the change and residual test gaps. Say explicitly when no actionable findings remain.
Example
Input: “Review this branch against main.”
Output: Severity-ordered actionable findings with locations and evidence, followed by a concise change summary and residual test gaps.
版本历史
- 8a0a3d8 当前 2026-10-20 08:03


