with one click
checkout-and-review-pr
Checkout a PR, summarize it, and run a full code review
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Checkout a PR, summarize it, and run a full code review
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Checkout a PR, summarize it, and run a full code review with md-annotate integration
Review a GitHub PR and answer questions about it
Run a full code review on the current PR branch and write findings to review.md
Based on SOC occupation classification
| name | checkout-and-review-pr |
| description | Checkout a PR, summarize it, and run a full code review |
Review the PR identified by the user's invocation arguments using the gh CLI.
Important: Do not push commits or reply to PR comments without explicit user approval. Always ask first.
Assumption: This workflow assumes you are already running in a git worktree that has the PR branch checked out. The checkout CLI normally handles worktree setup before starting the agent.
First, fetch the PR details:
gh pr view <PR_NUMBER> --json title,body,files,additions,deletions,author,baseRefName,headRefName,state,mergeable,reviewDecisiongh pr diff <PR_NUMBER> to get the full diffSummarize the PR:
Use the checkout-review skill with <PR_NUMBER> to perform the full code review and write findings to review.md. Then open it in md-annotate with md-annotate open review.md.
After the review is complete, tell the user: "Review written to review.md and opened in md-annotate. Click Elaborate, Fix, or Ignore on any finding, or ask me questions about the PR."
Wait for [md-annotate] messages. When one arrives:
md-annotate next to get the next pending annotation.md-annotate reply <id> "text" to respond. Update the document (see checklist below).md-annotate reply --resolve <id> "text" to reply with what was changed. Update the document (see checklist below). Do NOT push the commit.md-annotate reply --resolve <id> "Ignored." to resolve. Update the document (see checklist below).md-annotate next again to check for more pending annotations.After EVERY outcome change, update ALL of the following. Do not skip any:
### title emoji: ◯ → 🟣 (elaborate/in-progress), 🟡 (ignored), or 🟢 (done)**Outcome:** in the block quote: N/A → Done or Ignored### titleN/A → Done or IgnoredAlso respond to regular conversation messages (not from md-annotate). When answering questions:
gh pr diff <PR_NUMBER> to get more context if neededmultiplayer/lib/rust_process.ts:2465)<baseRefName>), use Cmd+Shift+G M → GitLens: Open Changes with Branch"When resolving comments, please DO NOT push the commit until approval by the user.
Replying to PR review comments:
gh api -X POST repos/figma/figma/pulls/<PR_NUMBER>/comments -F body="<your_reply>" -F in_reply_to=<COMMENT_ID>gh api -X POST repos/figma/figma/pulls/650848/comments -F body="Done in abc123def" -F in_reply_to=2678105376-F (not -f) for the in_reply_to parameter since it must be passed as a number