request-pr-review
Request human review on PR.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- request-pr-review
- description
- Request human review on PR.
- allowed-tools
- [ "Bash(gh api *)", "Bash(gh pr *)" ]
- user-invocable
- true
03 SKILL.md 正文
request-pr-review
After AI review produces a clean verdict or upon a review deadlock, request a human reviewer.
When to run
- After completing code pushes for the round AND after the AI review produces a clean/approved verdict (or upon a review deadlock), per
automated-review-before-human, the gate on every request for human review, andcopilot-review-before-human.md. - When the user asks you to "request review" on an existing PR: an explicit instruction overrides the gate, but report the automated review's state on the current head in the same reply.
Command
EDIT_PR (abstract operation token; resolve to your model's tool via
tool-mappings.md):
gh api -X POST repos/<owner>/<repo>/pulls/<num>/requested_reviewers \
-f "reviewers[]=<reviewer>"
You can get <owner>/<repo> from gh repo view --json nameWithOwner -q .nameWithOwner
and <num> from the PR URL returned by gh pr create.
<reviewer> is the repository's configured human reviewer or CODEOWNERS entry for the repository.
Edge cases
-
PR author is the requested reviewer. GitHub returns HTTP 422 with
"Review cannot be requested from pull request author". This is not a transient failure and no retry helps --- in a local CLI session,ghand the MCP server authenticate as the same human<reviewer>the skill would otherwise request, so this fires on every PR such a session opens, not occasionally. Don't report it as a bare failure: fall back to an@-mention comment (still notifies, still visible) and surface which path ran. A remote/web session is not automatically exempt: permemories/github-mcp-tools.md, the authenticated identity there varies by container and client --- it can be a distinct bot identity, but it can also bethe repository owner, in which case the same 422 fires there too. Settle it from the attributed author of a write you actually made in that session, not from an assumption about the harness, and use the same@-mention fallback if the identities collide. -
Prefer this REST POST over
gh pr edit --add-reviewer. The CLI form exits 0 with no error when the reviewer is the PR author and attaches nobody, so the 422 above is invisible on that path (measured on Morrison-Lab/wai#93, 2026-08-22). When the target<reviewer>is the author (<reviewer>matches.author.login), skip the request entirely --- human review cannot be requested from the author. Report that the PR awaits that person's own review. -
Other reviewers already requested. The endpoint adds to the existing list rather than replacing it, so this is safe to run alongside pre-configured CODEOWNERS or workflow-added reviewers.
Scope
Applies by default to all GitHub repos. If the user tells you a specific repo shouldn't auto-request human review, honor that override per-repo via a project-level memory.
Exception: Lacaedemon/sparta
Never request a human reviewer on a PR in sparta.
The exception is repo-scoped, not rule-wide.
On other repos, request a human reviewer only once the automated-review-before-human gate passes.
Within sparta the exception covers every path that would reach a request: the
post-AI-review request above, and the deadlock escalation below.
A skill inherits this exception only where it actually routes through here.
st does, citing this skill by name and nothing else.
ard, ardi, and merge-it carried the command guard inline.
The general rule is that a raw command inherits nothing; only a reference to this skill does. So when adding a repo exception here, grep for the raw command as well as for this skill's name:
git grep -nE 'add-reviewer|requested_reviewers' -- skills/
Both literal forms are matched: the gh pr edit <N> --add-reviewer <reviewer> command, and the workflow gh api ... requested_reviewers -f "reviewers[]=<reviewer>" form.
Then judge each hit rather than editing all of them.
A review deadlock on a sparta PR escalates to the user in chat, not to a
review request.
Escalation is re-routed, not retired: its purpose was always that a human
decides, and that is unchanged.
Post a boxed BLOCKER (per CLAUDE.md's chat-output-tagging convention)
naming the PR, the single disputed item, and both sides of the exchange, then
stop iterating that item and wait for the user's call.
- Do: open a sparta PR with no human reviewer requested, and request human review on other repos after AI review is clean or on deadlock.
- Do: take a sparta deadlock to the user in chat as a boxed
BLOCKER. - Don't: run
gh pr edit --add-reviewer, or POST torequested_reviewers, against a sparta PR. - Don't: read this as ending escalation on sparta. An unresolved deadlock still needs a human, and chat is now where it goes.
04 同仓库更多 Skills
wrap-up
End-of-session verification and UMS.
workaround-watcher
Watch upstream issue for fix.
wn
→ whats-next.
whats-next
Recommend concrete next step or action.
wait-for-results
Wait for pipeline/CI results.
wai
→ send-notes.