pr-reviewer
Reviews changes on current branch vs base. Checks code quality, bugs, usability, and optionally spec conformance. Fixes issues via implementor subagents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reviews changes on current branch vs base. Checks code quality, bugs, usability, and optionally spec conformance. Fixes issues via implementor subagents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrates standalone or caller-batched bug fixes via implementor and reviewer subagents using TDD. Handles bugs and verified review findings sequentially, tracks them in a dated checklist, and commits each fix without disrupting a surrounding PR-resolution batch.
Resolve GitHub PR review comments from humans and Copilot, including reviews already auto-requested or in progress. Use for verified comment resolution, sequential bugfix batching, one-push CI/Copilot cycles, and SHA-aware waits that avoid stale-event loops.
Shared conventions for Go projects. Copyright boilerplate, code quality, GoConvey testing, architecture, and commands. Referenced by go-implementor, go-reviewer, and workflow skills.
Go TDD implementation workflow. References implementation-principles, go-conventions, testing-principles, and agent-conduct.
Review Go implementations against spec acceptance tests. References implementation-principles, go-conventions, testing-principles, and agent-conduct.
Shared cross-language delivery workflow and guidance for implementing the simplest sufficient solution, maximizing reuse of existing code, and avoiding speculative abstractions, dependencies, and refactors. Use when implementing or reviewing code in any language.
| name | pr-reviewer |
| description | Reviews changes on current branch vs base. Checks code quality, bugs, usability, and optionally spec conformance. Fixes issues via implementor subagents. |
Read and follow agent-conduct, implementation-principles, testing-principles, subagents, and the project's conventions skill before starting. Use pr-resolver for GitHub PR review comments plus CI/Copilot loops. subagents covers orchestrator role, agent selection (always writable), briefing, skill discovery, and error handling. This skill covers only PR-review specifics.
You examine the diff, perform a thorough review, and fix issues by delegating to implementor subagents.
base.ref -> fallback develop.Before resolving base or doing any diff/lint/test, verify gh is installed
and authenticated:
if ! command -v gh >/dev/null 2>&1; then
echo "GitHub CLI (gh) is not installed. Stop. Install gh from https://cli.github.com/manual/installation, then run: gh auth login" >&2
exit 1
fi
if ! gh auth status >/dev/null 2>&1; then
echo "GitHub CLI (gh) is not authenticated. Stop. Run: gh auth login. For non-interactive environments, set GH_TOKEN or GITHUB_TOKEN, then confirm with: gh auth status" >&2
exit 1
fi
If either check fails, stop, with instructions on how to install and
authenticate gh. Do not continue in local-only mode, silently skip PR data,
use curl, rely on raw tokens directly, use VS Code GitHub tools, or use the
web UI as a workaround.
Lock the review base before any diff/lint/test:
base.ref (query via gh pr view --json baseRefName if needed), ORdevelop (only if no PR exists and no caller base).Hard rules: Never use repo default branch when a PR exists. Never diff
before base is resolved. Emit Review base resolved: <base>. If PR exists but
base.ref unavailable, stop and report failure.
git diff <base>...HEAD and git diff HEAD.Use gh pr view --json number,baseRefName,headRefName,url to check for an
active PR. If there is an active PR, validate the resolved base matches PR
base.ref. If there is no active PR, skip PR comment handling.
When an active PR exists, read all review comments via gh api (NOT the
VS Code tool - it caps at 50 and misreports state):
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
Note unresolved threads as additional review items.
For every changed file, assess:
await, unvalidated external data.Launch a reviewer subagent with the reviewer + conventions skill paths, spec path, and modified files list.
Use commands from the conventions skill. Note failures.
Numbered list ordered by severity (bugs > quality > style). Each finding: file/lines, category, description, suggested fix. If no findings, report clean and stop.
For each finding:
a. Launch an implementor subagent with: implementor + conventions + testing-principles skill paths, the specific finding (file, lines, description, fix), surrounding context, and "Fix this issue. Follow TDD cycle and testing-principles. Run linters. Confirm tests pass."
b. Verify the fix is correct and tests pass. Retry if needed.
c. If fixing addresses unresolved PR threads, reply (fixed - ...) and
resolve each thread.
d. Commit each fix (single-line imperative message, max 72 chars). Batch purely cosmetic fixes into one style-cleanup commit.
If there are unresolved PR threads, if step 7 fixes resolve PR threads, if checks need to be verified after a PR fix, or if the caller specifically asks to address PR review comments, switch to pr-resolver for thread triage, replies, resolution, and CI/Copilot push handling. Direct human requests are requirements; human questions and Copilot suggestions are review input that may be resolved with a clear no-code explanation when appropriate.
gh is mandatory. If it is not installed or authenticated, stop, with
instructions on how to install and authenticate gh; do not attempt
workarounds.All commands require an installed and authenticated gh CLI. If gh is not
installed or gh auth status fails, stop, with instructions on how to install
and authenticate gh. Do not fall back to curl, raw token calls, VS Code
GitHub tools, or the web UI.
command -v gh >/dev/null 2>&1
gh auth status >/dev/null 2>&1
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
Root comments only:
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate \
--jq '[.[] | select(.in_reply_to_id == null)] | .[] | "\(.id) \(.path) \(.body[:80])"'
gh api repos/{owner}/{repo}/pulls/{number}/comments \
-f body='fixed - <description>' -F in_reply_to=<comment_id>
Get thread node IDs:
gh api graphql -f query='{
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {number}) {
reviewThreads(last: 100) {
nodes { id isResolved comments(first: 1) { nodes { databaseId path } } }
}
}
}
}'
Resolve:
gh api graphql -f query='mutation {
resolveReviewThread(input: {threadId: "{thread_node_id}"}) {
thread { isResolved }
}
}'