ワンクリックで
pr-review
Review a GitHub pull request and emit a validated local review payload (comments + approval decision)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Review a GitHub pull request and emit a validated local review payload (comments + approval decision)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | pr-review |
| description | Review a GitHub pull request and emit a validated local review payload (comments + approval decision) |
| disable-model-invocation | true |
| allowed-tools | ["Read","Skill","Bash","Grep","Glob","Agent","Edit(//tmp/review-payload.json)"] |
| argument-hint | <owner_repo> <pr_number> [extra_context] |
| arguments | ["owner_repo","pr_number","extra_context"] |
/pr-review <owner_repo> <pr_number> [extra_context]
<owner_repo> (required): repository slug, e.g. mlflow/mlflow<pr_number> (required): pull request number[extra_context] (optional): additional filtering or focus instructions (e.g., a specific concern or file type)This invocation is reviewing:
$owner_repo$pr_number$extra_contextThe <owner>/<repo>/<pr_number> placeholders in the steps below refer to the values above (split $owner_repo on / for <owner> and <repo>).
These reads are independent. Issue them as parallel tool calls in a single turn, not sequentially.
gh pr view <pr_number> --repo "<owner>/<repo>" --json title,body
Invoke the fetch-diff skill.
Loads repository style rules applicable to the changed files:
git diff --name-only HEAD^1 | uv run --package skills skills load-rules
Up to 100 threads (open, resolved, and outdated) with up to 20 comments each, so you can avoid duplicating prior feedback:
gh api graphql -F owner=<owner> -F repo=<repo> -F pr=<pr_number> \
--jq '.data.repository.pullRequest.reviewThreads.nodes | map(.comments = .comments.nodes)' \
-f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 20) {
nodes { author { login } body }
}
}
}
}
}
}'
Read review-payload.schema.json so it's in context for step 4.
The working tree holds the PR merged into the base (refs/pull/<pr>/merge), so file contents reflect the post-merge state. Explore it for context beyond the diff (existing patterns, call sites of changed symbols, file conventions).
The merge ref's base parent is also reachable as HEAD^1. When the diff doesn't show enough (verifying a refactor preserved behavior, reading the full content of a deleted file, or seeing the pre-change version of a heavily modified file), use git show HEAD^1:<path> rather than re-fetching via the GitHub API.
Evaluate the changed code across these dimensions:
.claude/rules/ for language-specific rules and CLAUDE.md for repo conventionsClassify each finding by severity (matches .github/instructions/code-review.instructions.md):
| Severity | Emoji | Use for |
|---|---|---|
| CRITICAL | 🔴 | bugs, logic errors, security issues, data loss risk, broken public API |
| MODERATE | 🟡 | non-blocking quality concerns where the code works but could be clearer or safer |
| NIT | 🟢 | pure style/preference the author can ignore |
Determine the review event:
event: "APPROVE"event: "COMMENT"Write /tmp/review-payload.json matching review-payload.schema.json, then validate it.
Authoring rules not captured by the schema:
path:line in the body.```suggestion and preserve original indentation.comments array.Validate before finishing — fix any errors and re-emit until this passes:
uv run --package skills skills validate-review /tmp/review-payload.json
Do not post the review or comments by running gh pr review, calling GitHub review/comment APIs, or using any other skills. Stop after writing and validating the local review payload.