/dev10x-coding:gh-pr-reviewfrom dev10x-coding
Reviews a GitHub pull request by fetching the diff, reading changed files, checking interface impact, and posting inline comments. Supports draft and submitted review modes with optional courtesy fixup commits.
Ships in dev10x-coding. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Review a pull request on GitHub and post findings as a review with inline comments.
Accepts one of:
https://github.com/owner/repo/pull/NUMBER1293 (uses current repo)Not for self-review — use dev10x-coding:review to review your own
branch before creating a PR.
Not a CI replica — it reviews in this session's model and config;
to see what the Claude CI review would post, use dev10x-coding:ci-review
(GH-1621).
This skill follows references/task-orchestration.md patterns
(Tier: Standard).
Auto-advance: Complete each step and immediately start the next — no checkpoints the resolver did not ask for. Never pause between steps to ask "should I continue?".
REQUIRED: Create tasks before ANY work. Execute these
TaskCreate calls at startup:
TaskCreate(subject="Fetch PR diff", activeForm="Fetching PR context")TaskCreate(subject="Run spec compliance gate", activeForm="Checking spec compliance")TaskCreate(subject="Review changes", activeForm="Reviewing changes")TaskCreate(subject="Classify and push courtesy fixes", activeForm="Classifying findings")TaskCreate(subject="Choose draft or submit", activeForm="Selecting review mode")TaskCreate(subject="Post findings", activeForm="Posting review")Set sequential dependencies: spec gate blocked by fetch, review blocked by spec gate, courtesy-fix classification blocked by review, draft gate blocked by classification, post blocked by draft gate.
User interaction points: Step 6b (courtesy-fixup scope gate, ALWAYS_ASK — fires at all friction levels) and Step 8a (draft vs submit gate). All other review decisions are automated.
Extract owner, repo, and PR number from the argument. If only a number is given, use the current git remote origin.
REQUIRED first call: mcp__plugin_dev10x_cli__pr_detect to
resolve PR number, repo, state, base/head refs, and merge status
in one structured response (GH-181 F4). Raw gh pr view --json
is fallback only when the MCP tool is unavailable.
Then run in parallel:
mcp__plugin_dev10x_cli__pr_detect (state, refs, merge state, labels)gh pr diff {N} — full diffgh pr view {N} --json comments — existing bot/human commentsgh api repos/{owner}/{repo}/pulls/{N}/reviews — existing reviewsgh api repos/{owner}/{repo}/pulls/{N}/comments — inline commentsWhy all 5? Avoids duplicating feedback from previous review cycles
(per review-guidelines.md — "NEVER repeat feedback from previous
review cycles").
Oversize-diff fallback (GH-181 F5). GitHub's gh pr diff fails
with HTTP 406: Sorry, the diff exceeded the maximum number of lines (20000) for very large PRs. When this happens:
gh pr view {N} --json files,additions,deletions,changedFilesgh api repos/{owner}/{repo}/contents/{path}?ref={head_sha}
(or from local checkout if present — but DO NOT git checkout
the PR branch; see Step 3 REQUIRED).oversize_diff=true so Step 8 selects the bot-comment
transport (inline review threads anchor on diff hunks, which
are unavailable).Dispatch the spec-reviewer agent to confirm the PR diff matches
the linked ticket's AC and the PR's Job Story before drafting
inline comments. Domain-level review is wasted effort when scope
is wrong.
See references/spec-gate.md for
skip conditions, the controller-side pre-read pattern, the
agent dispatch prompt, and how to branch on the trailing
status line (DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT /
BLOCKED).
For each file in the PR's file list, use the Read tool to read the file at the current HEAD of the PR's base branch. Compare with the diff to understand the full context.
REQUIRED: do NOT run git checkout on the PR branch (GH-181
F2). If the PR branch is not checked out locally, the diff from
Step 2 is sufficient for review. When you need a file's full text
at the PR head, fetch it via
gh api repos/{owner}/{repo}/contents/{path}?ref={head_sha} (or
the equivalent pr_detect head SHA) — never disrupt the working
tree by checking out the PR branch. Checking out the branch risks
overwriting in-flight worktree changes and is a documented
regression.
REQUIRED — main agent runs the grep pass (GH-181 F6). Subagents may help, but the main agent must perform (or summarize subagent output of) the grep-for-callers sweep and include the findings in the draft review's impact-analysis section. A skipped or silently-delegated grep pass is a Step 4 violation.
For changed interfaces (renamed methods, changed signatures, modified DTOs):
Independent of prior review comments. Evaluate the PR's structural compliance from scratch — do NOT anchor on whether surface bugs from previous cycles were fixed.
See references/architecture-checklist.md
for the rules to load, the per-file signal/violation/severity
table, and the anchoring-bias anti-pattern.
Catches PRs that reuse an existing data structure when a sibling repository (typically a frontend) gates feature visibility on row presence.
Trigger — fire ONLY when the diff dereferences an existing
relation (model related_name / FK / OneToOne) with no sibling
migrations/*.py diff in the same PR. Skip otherwise; innocuous
resolver additions should not trigger cross-repo grep on every
review.
How to run — see
references/review-checks/cross-consumer-reuse.md for the
sibling-repo config schema (.claude/Dev10x/sibling-repos.yaml),
grep patterns (!!<relation>, <relation>.length > 0, etc.),
severity matrix, and silent-skip degradation rule.
REQUIRED — Read the reference files (GH-181 F1). Skipping these because "I know the rules" is the regression that prompted this requirement. Apply the gate to every drafted inline comment, not just to a sample.
Read(file_path=".../references/review-guidelines.md") — workflow,
threads, summariesRead(file_path=".../references/review-checks-common.md") —
false positive prevention.claude/agents/ for the
changed file typesApply the False Positive Prevention Gate (defined in
review-checks-common.md) before drafting any inline comment:
If the gate fails any criterion, do not file the comment.
Classify each surviving finding into courtesy-fixable or leave-for-author.
See references/courtesy-fixup-workflow.md
for classification criteria, examples, and list-building instructions.
Skip entirely when courtesy_fixes is empty — proceed directly to Step 6.
REQUIRED: Call AskUserQuestion when courtesy_fixes is non-empty (ALWAYS_ASK —
fires at ALL friction levels). Decision gate specification and per-finding mode:
see tool-calls/ask-courtesy-fixup-scope.md.
After user approval: For each approved courtesy fix, invoke dev10x-coding:gh-pr-fixup
to push the change and reply with the required "feel free to amend or drop" language.
Do NOT auto-resolve threads. Remove courtesy-fixed findings from author_comments
to avoid duplication.
Compose:
```suggestion
fixed code here
```
Skip on closed/merged PRs (GH-181 F7) — jump straight to Step 8. On open PRs, minimize previous Claude review summaries that are fully resolved.
See references/hide-obsolete.md
for the open-vs-merged skip rule, the GraphQL thread query
pattern, the resolved/unresolved/summary-only classification
matrix, and the minimizeComment mutation.
Transport selection (GH-181 F3, F8). Two transports exist:
gh api .../pulls/{N}/reviews with inline comments —
for OPEN PRs where the diff fits (≤ ~5,000 LOC, no 406).~/.claude/tools/gh-bot-comment.py
— for MERGED / CLOSED PRs, oversize diffs, or when inline
anchors are infeasible.See references/transport-selection.md
for the full selection matrix, Transport A payload schema + post
recipe (MCP-first mktmp, no heredocs), Transport B prerequisites
(bot config detection, GitHub App identity), and the
body-rewriting recipe that converts inline comments into a
single top-level findings block.
Transport B bypasses Step 8a — bot comments have no PENDING state. Proceed directly to posting and then Step 9.
Only for Transport A (open PR, normal diff). Before writing
the review JSON and posting, decide the event value.
Intent detection: Scan the original invocation argument for draft-intent phrases:
If any phrase matches, default to Draft (PENDING). Otherwise default to Submit as COMMENT.
Also check: if the current user is the PR author (compare
pr_detect author field with gh api /user login), bias the
default toward Draft and surface a note that APPROVE is
unavailable to PR authors.
REQUIRED: Call AskUserQuestion (do NOT use plain text).
Options:
event; only you see it until
you finish on GitHub. [set as default when draft-intent detected]After the gate:
event from the payload; record
review_state=PENDING for Step 9."event": "COMMENT"; record
review_state=SUBMITTED."event": "REQUEST_CHANGES";
record review_state=SUBMITTED."event": "APPROVE"; record
review_state=SUBMITTED.Branch on review_state:
PENDING (draft posted):
html_url from the API response.SUBMITTED:
html_url)From review-guidelines.md and review-checks-common.md:
dev10x-coding:gh-pr-review
├─ Standalone review of any GitHub PR
└─ Posts findings directly to GitHub
Complements:
dev10x-coding:review — self-review before PR creation (no GitHub posting)dev10x-coding:gh-pr-respond — respond to review comments on YOUR PRdev10x-coding:gh-pr-triage — validate a single review commentevals/evals.json (opens in a new tab)references/architecture-checklist.md (opens in a new tab)references/courtesy-fixup-workflow.md (opens in a new tab)references/hide-obsolete.md (opens in a new tab)references/spec-gate.md (opens in a new tab)references/transport-selection.md (opens in a new tab)tool-calls/ask-courtesy-fixup-scope.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dev10x-guru/dev10x-claude --plugin dev10x-coding40 skills in this plugin
/ci-reviewdev10x-coding:ci-reviewUse when a change to a Claude CI review prompt, args file, reviewer agent or CLI pin needs checking before it merges — so you read what the CI code review and PR hygiene check would post on a real PR, with nothing reaching GitHub unless you choose, after reading the report, to share it as one marked replica comment. TRIGGER when: "what would the CI review say", replaying the Claude CI review locally, verifying a review prompt or model change on a PR. DO NOT TRIGGER when: self-reviewing a branch with no PR (use dev10x-coding:review), or reviewing someone's PR and posting (use dev10x-coding:gh-pr-review).
/fanoutdev10x-coding:fanoutProcess multiple independent work items as a worktree-isolated swarm — each item runs the full dev10x-coding:work-on lifecycle inside its own background Agent with isolation="worktree" (under Herdr, its own Herdr workspace and agent). Honors dependencies, minimizes conflicts, auto-advances by default. TRIGGER when: 2+ independent work items need parallel processing (PRs, issues, tickets). DO NOT TRIGGER when: single task or sequential dependency chain (use dev10x-coding:work-on); already running as a swarm child (see recursive-fanout guard).