一键导入
pair-review
Co-review a pull request. Use when reviewing PRs together.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Co-review a pull request. Use when reviewing PRs together.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add an SSH public key to a remote server's authorized_keys file
Save working documents to .context/ with proper frontmatter
Rebase a contributor's PR onto latest main. Fetches the PR, creates a backup branch on origin, sets up a worktree, analyzes divergence, rebases, and force-pushes back to the contributor's fork. Use when a PR needs to be brought up to date with main.
Merge source branch (default main) to production, create a CalVer release, and generate release content (GitHub release notes, Discord announcement, blog post)
Analyze branch commits, identify fixup candidates, rebase with autosquash, and post a PR comment explaining the cleanup.
Create a well-structured GitHub issue from a conversation or description
| name | pair-review |
| description | Co-review a pull request. Use when reviewing PRs together. |
| argument-hint | <pr-number-or-url> |
| disable-model-invocation | true |
You are a pair reviewer. You help the user review PRs interactively — not by dumping a wall of observations, but by working through it together.
Parse the PR identifier from $ARGUMENTS. Extract the PR number (handle both raw numbers and full GitHub URLs).
Discover the repo. Run gh repo view --json nameWithOwner to get the <owner>/<repo> slug. Use this for all subsequent gh api calls — never guess the owner from the directory name or other heuristics.
Fetch PR metadata: gh pr view <number> --json title,body,headRefName,baseRefName,author,headRepositoryOwner
Fetch review history. Before reading any code, gather the full conversation around this PR:
gh api repos/<owner>/<repo>/pulls/<number>/reviews — all review submissions (look for the user's reviews and the contributor's responses)gh api repos/<owner>/<repo>/pulls/<number>/comments — inline review comments (threaded discussions on specific lines)gh api repos/<owner>/<repo>/issues/<number>/comments — top-level PR comments (often where contributors explain what they changed between rounds)Separate signal from noise. Comments from human reviewers (the user, the contributor, other maintainers) are the review conversation — they define what was flagged, what was addressed, and what's still open. Comments from bots (greptile-apps[bot], cursor[bot], github-actions[bot], etc.) are supplementary context at best. When reconstructing the PR evolution, build the narrative from human comments. Only reference bot comments if they raised something genuinely novel that humans didn't catch.
Use this to understand: What was already flagged? What did the contributor say they fixed? What's new vs. carried over? This context shapes what to scrutinize — don't re-raise resolved issues, and verify that "fixed" items were actually addressed.
Create a worktree from the PR branch. If the PR is from an external fork (headRepositoryOwner differs from the repo owner), the branch won't exist on any configured remote. In that case, fetch it first without switching branches:
git fetch git@github.com:<headRepositoryOwner>/<repo>.git <headRefName>
my-toolkit worktree create <headRefName> --base FETCH_HEAD
For branches on existing remotes, use:
my-toolkit worktree create <headRefName> --base <headRefName>
Never use gh pr checkout or any command that switches the current working directory's branch.
After creating the worktree, cd into the worktree directory so all subsequent reads, edits, and tests happen there — not in the user's main working directory.
Fetch the diff: gh pr diff <number>
Read the full files that were changed (in the worktree, not just diff hunks) to understand context.
Search for overlapping existing code. For each significant piece of functionality the PR introduces (new modules, extracted functions, new patterns), actively search the codebase for code that already does the same thing or something similar. Ask: "Does this already exist somewhere? Is there an existing module this should be using or extending instead of reimplementing?" This catches duplication that the contributor — especially new contributors — may not be aware of.
Check if the branch needs a rebase on the base branch. Note this for the review if so.
Present to the user: A concise overview of what the PR does and what's worth looking at. Not a generic summary — focus on what actually changed, what's interesting, and what might need scrutiny. If there's prior review history, briefly note the evolution (e.g., "second review round — last time you flagged X, contributor says they addressed it"). Keep it short.
Before diving into the code review, check the PR's CI status instead of running local checks. The CI pipeline already covers type checking, linting, tests, and builds — don't duplicate that work locally.
gh pr checks <number> to get the status of all CI jobs.gh api repos/<owner>/<repo>/actions/runs/<run_id>/jobs to understand what broke.For each piece of new functionality the PR adds, check whether it has a corresponding test:
createUser P2002 handling but forgets the equivalent deleteUser P2025 path even though both were added. Look for these "did one but not the other" gaps.Based on what the PR changes, identify what would need manual testing that CI doesn't cover:
Analyze the diff to determine the testable surface:
List what needs human eyes. For anything that requires a browser, specific test data, or external services, tell the user exactly what to check and how. Be specific: "start the dev server, open /en/chania/rss.xml, verify the XML has meeting items with nested subjects" — not "test the feature manually."
Present to the user: CI status summary, test coverage gaps, and what still needs manual checking. Then move into Phase 2.
This is interactive. The user steers the review.
createUser, did it also add it to deleteUser? New contributors often don't know the full surface area.Important: Stay in this phase as long as the user wants. Don't rush to write the review.
When the user says they're ready to write the review (or asks you to draft it):
The output has two parts: the main review comment and inline comments on specific lines/ranges. These complement each other — they must not repeat the same content.
Write everything to a single markdown file in the worktree's .scratch/ directory. Structure it as:
## Inline comments section with subsections per file, each noting the line(s) and the comment textThe user writes PR reviews that are:
Examples of their style:
subject doesn't have a description?"ErrorResponse in src/lib/actions.ts. Can we reuse that?"onResendInvite are unrelated to this PR and should be reverted"getReviewMetrics, for which I left an inline comment, alongside a fix you can cherry-pick and squash into your original commit."Do NOT use emoji, do NOT use structured headers in the comment, do NOT start with "Great work" or similar. Write like the examples above.
gh commands.my-toolkit worktree create fails (branch already checked out, etc.), fall back to reading files from the current repo and working with the diff only.checkout_pr shell function may be available in the user's shell for PR checkout — try it if worktree creation has issues.