一键导入
gh-review-pr
Review a GitHub PR as a reviewer. Use when the user asks to "review a PR", "review this pull request", or "give feedback on this PR".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review a GitHub PR as a reviewer. Use when the user asks to "review a PR", "review this pull request", or "give feedback on this PR".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | gh-review-pr |
| description | Review a GitHub PR as a reviewer. Use when the user asks to "review a PR", "review this pull request", or "give feedback on this PR". |
| argument-hint | [PR-url] [context-issue] |
| allowed-tools | Bash, Read, Grep, Glob |
Review a GitHub PR as a code reviewer. $ARGUMENTS: first argument is a PR URL or owner/repo#number. Second argument (if present) is context: a GitHub plan issue, WP URL, or Jira key (with or without --context prefix). If no PR is given, check if the current branch has an open PR. If context is provided, use it to understand the overall goal and evaluate whether the PR achieves it.
Think as a software architect first: before looking at individual lines, evaluate the overall design. Is this the right abstraction? Are the boundaries in the right place? Is the approach the simplest that solves the problem? What will be hard to change later?
Then check for:
Before starting the review, check for ~/.claude/skills/gh-review-pr/reviewer-profile.md. If it exists, read it and adopt its tone, focus areas, and signature moves throughout the review. All review comments and the final review body MUST reflect this persona.
Do all of these in one pass. Do NOT stop for an overview or ask the user to confirm before reviewing. Review silently and present findings once.
Gather: Fetch PR description, commits, full diff, and author (gh pr view --json author). Read linked issue(s) if any for intent. If the current user is the author, do NOT post comments or reviews — present findings in conversation only, skip steps 3-4.
Review: Apply the review criteria above to the full diff. For large PRs (30+ files), prioritize files with the most changes, new files, and critical paths (auth/data/API boundaries); note what was skimmed vs. reviewed in depth.
Present findings in one message. No preamble, no "let me first summarize", no confirmation gates. Format:
approve / comment / request-changesEvery finding: one line, cite file_path:line_number, state the issue. No restating the code. Skip empty sections entirely.
If the changes introduce complex flow, new abstractions, or non-obvious component interactions, suggest the user run /explain-code on the key areas for a visual diagram.
Walk through each comment with the user before posting. For each finding:
After all inline comments are reviewed, show the proposed review body (the summary that accompanies the review action). Let the user edit it too. Then confirm the action (approve/comment/request-changes) and submit.
Footer: Before submitting, check for ~/.claude/skills/gh-review-pr/reviewer-footer.md. If it exists, append its content to the review body, separated by ---. Replace {{model}} with the model name powering this session (e.g. "Claude Opus 4.6").
Submit via the two-step pending review pattern. Never post comments individually. (1) create PENDING review via POST .../pulls/NUMBER/reviews with commit_id and comments[][] array, (2) submit via POST .../pulls/NUMBER/reviews/REVIEW_ID/events with event and body.
Syntax pitfalls: use -f for strings and -F for numbers; single-quote comments[][] params; use side=RIGHT for added/modified lines, LEFT for deleted; for code suggestions, triple backticks with suggestion in the comment body.
gh pr checkout <NUMBER> for full codebase context. Warn the user first if there are uncommitted local changes.Rules:
Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"
Review multiple related PRs across repos for consistency. Use when the user asks to "review these PRs together", "cross-review PRs", or "check consistency across PRs".
Read review comments on a GitHub PR, respond to them, fix code issues, and resolve conversations. Use when the user asks to "handle PR review comments", "fix review feedback", or "respond to PR reviews".
Respond to review comments across multiple related PRs. Use when the user asks to "handle review comments across PRs", "respond to cross-PR reviews", or "fix feedback on all PRs".