work-review
Reviews the pull request of one issue in review requested as a fresh independent agent, posts the verdict and routes the label to done, changes requested, needs human or blocked. Use when asked to rev
Files1
View on GitHubSKILL.mdskills/work/work-review/SKILL.md
GitHubwork-review
Judge one pushed pull request as a different agent than the one that built it.
When to use
- An issue carries
ai: review requestedand its pull request is open.
Independence
- Independent: the review runs in a
reviewerorreviewer-boundaryagent that never saw the implementation, from a brief naming only repository, issue and pull request. - Not independent: the session that wrote or supervised the code judges it inline.
approvecan still be the judgment, but the label never reachesdonethrough it, see step 13. - Boundary paths, from
gh pr diff <number> --name-only, pickreviewer-boundary:hooks/,rules/,agents/,settings/, CI workflows and actions, release configuration, secret, token or authentication code, network exposure, or more than 800 changed lines outside lock and generated files. Areviewerthat finds a match posts no verdict and reportsboundary.
Steps
- Pick the issue: the one named, or the highest priority issue in
review requested. - Optional: move the label to
reviewingwhen configured. Only a long review needs it. - Read the issue body, the
## Plansection, the pull request diff, and every review thread already on the pull request throughgh api graphql(reviewThreads, withisResolvedand each comment's body). A rework round starts from these, not from memory of the first pass. - Read CI from
gh pr checks <number>or the commit's check-runs viagh api, never a branch filtered runs list. Oneghper command. A## Verificationnaming no commit is unverified. A check still pending: post no verdict, keep the label, report it and stop. The orchestrator waits withgh pr checks <number> --watchas one background call and continues this reviewer. - Run config
verifyagainst the pushed branch, unless a CI job ran each of its targets green on the head commit. The verdict then names those jobs. A target without a job: run verify. - Judge in order: does the diff meet the acceptance criteria, is it correct and safe, does it need a human. Formatting, naming taste and wording belong to the linters and are no finding. For every open thread from step 3, decide whether its finding is now fixed.
- Decide the verdict:
approve,changes requested,needs humanorblocked; nits alone areapprove, named in the verdict for the orchestrator to fix. - Resolve every open thread from step 3 whose finding is now fixed, one GraphQL
resolveReviewThreadmutation per thread, before posting the new verdict. A finding that still stands keeps its thread open and is restated in this round's verdict instead of a second thread for the same problem. - The pull request's author differs from this review's identity, or config
review.tokennames an environment variable holding a token of such a reviewer: post the verdict as a formal review,POST /repos/{owner}/{repo}/pulls/{number}/reviewsthroughgh api, witheventfrom the verdict,commit_idthe pull request's full 40 character head SHA (a short SHA fails with 422),bodynaming the commit CI was green on, andcomments: one entry per finding,{path, line, side: "RIGHT", body: "<Blocker|Should|Nit>: <problem and fix>"}. This formal review is the verdict; post no separate comment. - Config
review.tokenis unset, or the pull request's author is this review's own identity: GitHub refuses the review call. The comment path is the normal route for a single account setup, not a failure. Post the verdict withgh pr comment: first lineVerdict: <verdict>, naming the commit CI was green on, then findings groupedBlocker,Should,Nit, each naming the file, the line and a concrete fix. Name the route in the report. - A finding's line falls outside every diff hunk in either path: anchor the inline comment at the nearest changed line in the same file and name the real location in its body, or, with no changed line in that file at all, put the finding in the top level review or comment body.
- Verdict approve, independent per Independence: mark the pull request ready (
gh pr ready). It closes its issue by default: move the label todone. A body sayingPart of #Nleaves the issue open: move the label toreadywhen agent work is left, elseneeds human, and comment what is left. - Verdict approve, not independent: treat it like step 15,
needs human, naming in the report that the judgment was approve but independence was missing. - Verdict changes requested: move the label to
changes requested. Never undoready. - Verdict needs human, or config
work.reviewRoundsis set and the round count reaches it: move the label toneeds human. The round count is this skill's own verdict comments and formal reviews on the pull request, the one just posted included. Unset means no limit. - Label now
needs human: mark the pull request ready withgh pr readywhen theprskill's ready condition holds and only a human decision is left, otherwise leave it a draft. - Verdict blocked: move the label to
blocked. - Changes requested or blocked: end the verdict with a line that names
implementas the next step. The rework round starts there and reads this verdict. - Never merge the pull request. Never approve one implemented in this same session, formal review included.
Guardrails
- Review only: no edit to the code under review, no commit of its own, no merge.
- A reviewer may write a throwaway probe to settle a claim it cannot settle by reading. It is a file of its own, never the code under review, never committed, staged or pushed.
- It is deleted in the same task, the worktree left as found. A probe that starts no process, itself or through the code it calls, may be a temporary test file in the worktree.
- A probe that executes command shapes or real git behaviour follows the baseline: an empty temporary directory with a fake binary first on the path, or a throwaway repository, never the worktree. A review prompt that asks for such probes carries that rule.
- A claim settled only by reading, not by running, is named unverified in the verdict, with what it rests on, whether or not running it was attempted.
- Move the label with the snippet in
~/.claude/skills/README.md: oneai:label remains. - The boundary path list decides the agent. Config
models.reviewormodels.reviewBoundary, when set, overrides its model. A re-review continues the first reviewer, finding list only. doneis a real acceptance, only through an independent review. Unsure:needs human.- A
## Verificationsection is a claim, not evidence. The pull request's own CI result for the current head decides. Every verdict names the commit CI was green on, in both paths. - A round cap, when set, is a floor for a human decision, never a way to wave through work.
- A formal review or a
gh pr comment, never both, for the same round's verdict. Resolving a thread never substitutes for stating whether its finding passed in the new verdict. - A finding of the shape "does this write happen" is verified by counting the write at its source, a reflog entry, a call count on a fake, a log line, never by comparing state before and after: an identical write leaves the result identical.
review.token's value is read intoGH_TOKENfor the review call only, never printed or logged.
Config
Reads .agent-skills.json through the snippet in ~/.claude/skills/README.md.
work.reviewRounds: review rounds before escalating toneeds human. Default unset, no limit.models.review: defaultsonnet.models.reviewBoundary: defaultopus.labels.reviewing,labels.ready,labels.done,labels.changesRequested,labels.needsHuman,labels.blocked: defaults in~/.claude/skills/README.md.review.token: environment variable holding a token of the review app, see the Apps section ofgithub-as-code. Default: unset, the verdict stands as a comment.verify: command that proves a change is good.
References
- GitHub CLI manual: https://cli.github.com/manual/
prskill: the ready condition for leaving draft.implementskill: the rework round achanges requestedorblockedverdict hands off to.