AGENT SKILL
GitHub PR 代码审查
review-pr
脚本优先的仅审查式 GitHub pull request 分析。用于确定性的 PR 审查,并将结构化发现结果交接给 /prepare-pr。
- License 许可
- MIT
- 最近更新
- 2026-02-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- review-pr
- description
- Script-first review-only GitHub pull request analysis. Use for deterministic PR review with structured findings handoff to /prepare-pr.
02 资源文件 1
- 参考文档agents/openai.yaml184 B
03 SKILL.md 正文
Review PR
Overview
Perform a read-only review and produce both human and machine-readable outputs.
Inputs
- Ask for PR number or URL.
- If missing, always ask.
Safety
- Never push, merge, or modify code intended to keep.
- Work only in
.worktrees/pr-<PR>. - Wrapper commands are cwd-agnostic; you can run them from repo root or inside the PR worktree.
Execution Contract
- Run wrapper setup:
scripts/pr-review <PR>
- Use explicit branch mode switches:
- Main baseline mode:
scripts/pr review-checkout-main <PR> - PR-head mode:
scripts/pr review-checkout-pr <PR>
- Before writing review outputs, run branch guard:
scripts/pr review-guard <PR>
- Write both outputs:
.local/review.mdwith sections A through J..local/review.jsonwith structured findings.
- Validate artifacts semantically:
scripts/pr review-validate-artifacts <PR>
Steps
- Setup and metadata
scripts/pr-review <PR>
ls -la .local/pr-meta.json .local/pr-meta.env .local/review-context.env .local/review-mode.env
- Existing implementation check on main
scripts/pr review-checkout-main <PR>
rg -n "<keyword>" -S src extensions apps || true
git log --oneline --all --grep "<keyword>" | head -20
- Claim PR
gh_user=$(gh api user --jq .login)
gh pr edit <PR> --add-assignee "$gh_user" || echo "Could not assign reviewer, continuing"
- Read PR description and diff
scripts/pr review-checkout-pr <PR>
gh pr diff <PR>
source .local/review-context.env
git diff --stat "$MERGE_BASE"..pr-<PR>
git diff "$MERGE_BASE"..pr-<PR>
- Optional local tests
Use the wrapper for target validation and executed-test verification:
scripts/pr review-tests <PR> <test-file> [<test-file> ...]
- Initialize review artifact templates
scripts/pr review-artifacts-init <PR>
- Produce review outputs
- Fill
.local/review.mdsections A through J. - Fill
.local/review.json.
Minimum JSON shape:
{
"recommendation": "READY FOR /prepare-pr",
"findings": [
{
"id": "F1",
"severity": "IMPORTANT",
"title": "...",
"area": "path/or/component",
"fix": "Actionable fix"
}
],
"tests": {
"ran": [],
"gaps": [],
"result": "pass"
},
"docs": "up_to_date|missing|not_applicable",
"changelog": "required"
}
- Guard + validate before final output
scripts/pr review-guard <PR>
scripts/pr review-validate-artifacts <PR>
Guardrails
- Keep review read-only.
- Do not delete worktree.
- Use merge-base scoped diff for local context to avoid stale branch drift.
04 同仓库更多 Skills
YouTube 转 Obsidian 笔记
youtube-to-obsidian
暂无简介
★ 0
天气信息查询
weather
获取当前天气和天气预报(无需 API 密钥)。
★ 0
WhatsApp 消息与历史管理
wacli
通过 wacli CLI 向他人发送 WhatsApp 消息,或搜索/同步 WhatsApp 历史记录(不适用于普通用户聊天)。
★ 0
语音通话发起
voice-call
通过 OpenClaw 语音通话插件发起语音通话。
★ 0
视频帧与片段提取
video-frames
使用 ffmpeg 从视频中提取画面帧或短片段。
★ 0
Trello 看板与卡片管理
trello
通过 Trello REST API 管理 Trello 看板、列表和卡片。
★ 0