pr-review
GitHub用于审查GitHub Pull Request的技能。通过获取PR上下文、代码差异及CI检查结果,结合风险策略进行代码质量与安全评估,并在授权下提交审核意见或修复。
触发场景
安装
npx skills add rustfs/rustfs --skill pr-review -g -y
SKILL.md
Frontmatter
{
"name": "pr-review",
"description": "Review a GitHub PR using its exact base\/head and repository risk policy. Use for requested PR reviews; publish or fix only within conversation authorization."
}
PR Review
-
Resolve the PR repository and remote; the current checkout may belong elsewhere. Read the PR purpose and linked issues, then fetch the actual base and PR head:
gh pr view <N> --repo <owner/repo> --json title,author,state,body,baseRefName,headRefName,baseRefOid,headRefOid git fetch <repo-remote> <baseRefName> refs/pull/<N>/head git diff <baseRefOid>...<headRefOid>Record both SHAs; refresh if either moved during fetching. Follow relevant implementation boundaries.
-
Apply the risk policy. Ordinary reviews use the root finding standard directly. For explicit adversarial, substantial, or high-risk reviews, use the domain probes. File count does not authorize delegation; use exactly two independent reviewers only when authorized, otherwise two fresh sequential passes for that risk tier. Reviewers do not spawn further agents.
-
Check
gh pr checks <N> --repo <owner/repo>. Investigate failures when relevant to a finding or a requested CI/readiness diagnosis. Distinguish pending, unavailable, pre-existing, flaky, and PR-caused states using evidence; a code review does not authorize unrelated repairs. -
Report the reviewed SHAs, risk tier, supported findings or
No findings, material verification limits, check state, and verdict. P0/P1 findings block approval. Severity: P0 = demonstrated data loss, security breach, remote crash, or deadlock; P1 = correctness, compatibility, or material hot-path regression; P2 = a concrete maintainability defect; P3 = optional style, only when requested. -
When posting is authorized, follow Git and PR rules, recheck the remote head, and review any delta before submitting. Use
gh pr reviewwith--approve,--request-changes, or--commentand--body-file; use the API example for authorized inline comments. Reuse existing authorization. -
Follow the repository PR lifecycle and explicit monitoring scope. Fetch new heads before comparing to the reviewed SHA; never rely on an unfetched
origin/pull/<N>/head. Push fixes or resolve threads only when authorized; checkmaintainerCanModifybefore a fork push.
版本历史
-
6f582b0
当前 2026-10-20 01:28
优化了PR仓库解析和远程获取逻辑,细化了风险审查流程及CI检查状态分析,增强了SHa记录与发布授权的安全约束。
- 1880b42 2026-09-23 05:26


