Agent Skills › rustfs/rustfs › pr-review

pr-review

GitHub

用于审查GitHub Pull Request的技能。通过获取PR上下文、代码差异及CI检查结果,结合风险策略进行代码质量与安全评估,并在授权下提交审核意见或修复。

.agents/skills/pr-review/SKILL.md rustfs/rustfs

触发场景

收到Pull Request审查请求 需要评估代码变更的风险与正确性

安装

npx skills add rustfs/rustfs --skill pr-review -g -y
更多选项

非标准路径

npx skills add https://github.com/rustfs/rustfs/tree/main/.agents/skills/pr-review -g -y

不安装直接使用

npx skills use rustfs/rustfs@pr-review

指定 Agent (Claude Code)

npx skills add rustfs/rustfs --skill pr-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add rustfs/rustfs --all -g -y

预览 repo 内 skill

npx skills add rustfs/rustfs --list

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. When posting is authorized, follow Git and PR rules, recheck the remote head, and review any delta before submitting. Use gh pr review with --approve, --request-changes, or --comment and --body-file; use the API example for authorized inline comments. Reuse existing authorization.

  6. 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; check maintainerCanModify before a fork push.

版本历史

  • 6f582b0 当前 2026-10-20 01:28

    优化了PR仓库解析和远程获取逻辑,细化了风险审查流程及CI检查状态分析,增强了SHa记录与发布授权的安全约束。

  • 1880b42 2026-09-23 05:26

同 Skill 集合

.agents/skills/adversarial-validation/SKILL.md
.agents/skills/arch-checks/SKILL.md
.agents/skills/code-change-verification/SKILL.md
.agents/skills/issue-triage/SKILL.md
.agents/skills/plugin-contract-guard/SKILL.md
.agents/skills/pr-creation-checker/SKILL.md
.agents/skills/rust-code-quality/SKILL.md
.agents/skills/rustfs-logging-governance/SKILL.md
.agents/skills/rustfs-release-publish/SKILL.md
.agents/skills/rustfs-release-version-bump/SKILL.md
.agents/skills/security-advisory-lessons/SKILL.md
.agents/skills/test-coverage-improver/SKILL.md
.agents/skills/tier-debug/SKILL.md
.mimocode/skills/issue-triage/SKILL.md
.mimocode/skills/pr-review/SKILL.md

元信息

文件数
0
版本
6f582b0
Hash
00378623
收录时间
2026-09-23 05:26

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-21 16:27
浙ICP备14020137号-1