Automated summary
This skill layers maintainer adjudication on top of a CI review pipeline: it reads the pinned review comment, verifies its freshness against the head SHA, then walks the maintainer through an interactive approve / request changes / make changes / close flow with optional auto-merge.
Strengths
- Detects contributor type (bot/internal/external) and adjusts tone and merge defaults through an etiquette-trust axis
- SHA sentinel freshness check catches cases where the mark-stale label never fired (Copilot coding agent, GITHUB_TOKEN pushes)
- Explicit 10-step sequence with silent collection steps keeps output quiet until a single unified report
- Handles all PR kinds, including external contributors and bots, with a forceable AI-suspect flag via --ai/--no-ai
Limitations
- Heavily dependent on external scripts (.claude/commands/pr-review/scripts/, docs-review/scripts/) and a claude-code-review.yml workflow that the SKILL.md does not ship
- Assumes GitHub and an authenticated gh CLI; unusable on GitLab, Bitbucket, or a fork lacking the CI review pipeline
- The document is truncated at step 3, so the full state table and remaining process cannot be fully verified
Use it when a maintainer needs to decide on a pull request that has already gone through the CI review pipeline and wants one consolidated decision package instead of reading comments by hand.
Avoid it on repositories without claude-code-review.yml and its helper scripts, or when the review must stay fully manual with no automated adjudication layer.
Security analysis
CautionThe skill uses bash and network tools for a legitimate maintainer workflow: reading PR metadata, fetching pinned CI review comments, and refreshing reviews. No destructive commands, secret exfiltration, or obfuscation are present. However, it relies on repo-local shell scripts and GitHub CLI actions, so it warrants caution rather than a fully safe rating.
- •Executes multiple shell scripts via bash (contributor-detection.sh, pinned-comment.sh, local update procedure) without showing their contents.
- •Uses GitHub CLI and network operations to fetch PR data, diff, and comments, which is legitimate but powerful.
- •No declared allowed-tools, yet the skill instructs running bash and gh commands.
Examples
/pr-review/pr-review 20556 --no-ai/pr-review 4412 --ainame: pr-review description: Adjudicate a pull request as a maintainer. Reads the CI-posted pinned review as the source of truth, refreshes it if stale, and provides an interactive workflow to approve / request changes / make changes / close — with optional auto-merge.
Pull Request Review Command
This is the maintainer adjudication layer on top of the CI review pipeline (claude-code-review.yml posts a pinned <!-- CLAUDE_REVIEW N/M --> comment with all findings; this skill reads it as the source of truth).
Usage
/pr-review [<PR_NUMBER>] [--ai|--no-ai]
- PR number: Optional. If omitted, the workflow infers from the current branch via
gh pr view --json number. Errors out if no PR is open for the branch. --ai/--no-ai: force AI-suspect ON or OFF for this run.
Works with all PRs (internal, external, bots).
Process
Complete all 10 steps in sequence. Display [Step X/10] before each step heading.
Steps 1, 2, 3, 5 are silent — no user-facing output. Step 4 is interactive only when the PR has infra changes. Step 6 is the first comprehensive output.
Step 1: Detect contributor, trust axes, risk tier, and AI-suspect
If {{arg}} is empty, infer the PR from the current branch:
gh pr view --json number --jq '.number'
If that fails, abort with a clear error asking for an explicit PR number. Otherwise use the inferred number as PR_NUMBER for every {{arg}} reference below.
Run contributor detection:
bash .claude/commands/pr-review/scripts/contributor-detection.sh $PR_NUMBER [--ai|--no-ai]
The script outputs:
AUTHOR— GitHub usernameCONTRIBUTOR_TYPE— bot/internal/externalETIQUETTE_TRUST— low/standard/high (controls tone, welcome language, merge defaults)CONTENT_SCRUTINY— standard/heightenedAI_SUSPECT— true/falseAI_SUSPECT_REASONS— comma-separated triggersRISK_TIER— typo/minor/standard/major/infraPR_METADATA— JSON with number, title, urlFILES_CHANGED— list of changed file pathsLABELS— comma-separated current labels (drives Step 2's pinned-review state machine)PR_DATA_JSON— complete PR data
Store all of these. No user output yet. Step 6 surfaces them in the unified package.
See pr-review:references:trust-and-scrutiny.
Step 2: Fetch the pinned CI review and classify state
Fetch the diff and the pinned review:
gh pr diff "$PR_NUMBER"
bash .claude/commands/docs-review/scripts/pinned-comment.sh fetch --pr "$PR_NUMBER"
Determine the pinned-review state from labels and fetch output. Labels alone are not a sufficient freshness signal: pushes made by the Copilot coding agent or with GITHUB_TOKEN never fire the pull_request: synchronize event, so the mark-stale job never runs for them and a PR can sit at review:no-blockers while the pinned review describes content a later commit replaced (PR #20556). Before accepting CURRENT, run the SHA freshness check:
HEAD_SHA=$(gh pr view "$PR_NUMBER" --json headRefOid --jq .headRefOid)
# Preferred: the machine-readable sentinel compose-review.py stamps under the header.
REVIEWED_SHA=$(bash .claude/commands/docs-review/scripts/pinned-comment.sh fetch --pr "$PR_NUMBER" \
| grep -oE '<!-- CLAUDE_REVIEW_HEAD [0-9a-f]+ -->' | tail -1 | grep -oE '[0-9a-f]{7,40}')
# Fallback for reviews composed before the sentinel existed:
[ -z "$REVIEWED_SHA" ] && REVIEWED_SHA=$(bash .claude/commands/docs-review/scripts/pinned-comment.sh last-reviewed-sha --pr "$PR_NUMBER")
If REVIEWED_SHA is non-empty and is not a prefix-match of HEAD_SHA, treat the state as STALE regardless of labels (and mention in your output that the label missed a push — likely a suppressed synchronize event). If no reviewed SHA is recoverable at all, fall back to comparing the header's Last updated timestamp against the head commit's committer date; when the head commit is newer, treat as STALE.
| State | Detection | What Step 3 does |
|---|---|---|
| CURRENT | review:outstanding-issues or review:no-blockers set; review:stale / review:in-progress / review:error absent; fetch returns body; SHA freshness check passes | Nothing — proceed to Step 4 |
| STALE | review:stale set | Refresh in place by invoking docs-review:references:update locally (re-runs claim verification against new commits, then writes via pinned-comment.sh upsert) |
| IN_PROGRESS | review:in-progress set | Wait briefly for the workflow to finish; re-check labels. If it stays >15 min, treat as ERROR. |
| ERROR | review:error set (or review:in-progress stuck) | Investigate the Actions logs before proceeding |
| ABSENT | Fetch returns no <!-- CLAUDE_REVIEW --> markers | Fall back: run a local review (see Step 3 §Absent path) |
Store the parsed pinned-comment findings (🚨 Outstanding, ⚠️ Low-confidence, 💡 Pre-existing, ✅ Resolved, 📜 Review history) for Step 6.
Step 3: Resolve pinned-review state
Branch on the state from Step 2.
CURRENT
Continue to Step 4.
STALE
Refresh the pinned comment in place by invoking docs-review:references:update locally with PR_NUMBER set. The update procedure re-reads the diff since the last reviewed SHA, classifies as Case 1/2/3, and writes the refreshed body via pinned-comment.sh upsert. When it completes, re-fetch the pinned comment and re-parse findings for Step 6.
ABSENT
No pinned comment exists. This typically means: the PR is a draft (CI doesn't review drafts), CI failed, or the review:trivial short-circuit fired. Ask the user how to proceed via AskUserQuestion:
- Run a local review now — perform a full local style + code review (apply
/docs-review). Use the findings as the pinned-review findings for Step 6. - Adjudicate without findings — proceed to Step 6 with no findings; rely on your own diff read and the contributor's PR description.
- Cancel — exit; consider transitioning the PR to ready-for-review to trigger CI, or mention
@claudeto invoke a fresh review.
Only the local-review path produces findings; otherwise Step 6 renders an empty findings block.
Step 4: Offer infrastructure deployment (only fires for infra changes)
If RISK_TIER=infra (PR contains dependency or infrastructure changes), follow pr-review:references:infrastructure-deployment to optionally trigger a pulumi-test.io deployment. This is the only step before Step 6 that produces user-facing output. For other risk tiers, skip silently.
Step 5: PR description accuracy check (silent)
CI doesn't check this; pr-review does. Compare the PR description against the actual diff. Inaccuracies — files mentioned that weren't changed, changes described that aren't in the diff, significant changes omitted, incorrect characterization — are trivial-fix candidates that can be applied via gh pr edit --body in Step 9 if the user picks Make-changes-and-approve and doesn't veto them.
For each inaccuracy, draft a corrected description that accurately reflects the diff. Store for Step 6 + Step 9.
Step 6: Present unified review package
This is the first big user-facing output. Render in this order, top to bottom:
-
Confidence gauge — single line:
Confidence: HIGH · 0 outstanding · 2 low-confidence · contributor: @user (internal) · risk: minor · CI: green · pinned: currentOr, when AI-suspect:
Confidence: MEDIUM · 🤖 AI-suspect (allowlist + trailer:claude) · scrutiny: heightened · 2 outstanding · 1 low-confidence · CI: green · pinned: refreshedComputation:
| Gauge | When | |---|---| |
HIGH| No 🚨 Outstanding findings, CI green, scrutinystandard, pinned current/refreshed | |MEDIUM| Any ⚠️ Low-confidence findings, OR scrutinyheightened(always caps at MEDIUM), OR CI yellow, OR pinned absent | |LOW| Any 🚨 Outstanding finding, OR CI red | -
Header — PR title, contributor with etiquette icon (🤖 / 📝 / 🌍), risk tier badge, pinned-review state, deployment URL (or "pending"). Run
test-deployment-guidance.shhere to fetch the deployment URL and per-page links:bash .claude/commands/pr-review/scripts/test-deployment-guidance.sh {{arg}} -
Per-page review links — direct links + change-aware specific review items from
test-deployment-guidance.shoutput. -
Pinned review findings — render the parsed 🚨 Outstanding, ⚠️ Low-confidence, 💡 Pre-existing, and ✅ Resolved findings from Step 2 verbatim (they're already in the format from
docs-review:references:output-format). If a refresh ran in Step 3, note "Pinned comment refreshed at HH:MM" above the findings block. If absent and the user picked local review in Step 3, render those findings here in the same format. -
PR description inaccuracies (only if Step 5 found any) — itemized so the user can see exactly what would change before Step 8 confirmation:
PR description corrections (2): [1] Says "updates content/blog/foo.md" but foo.md was not changed [2] Omits significant change: content/docs/bar.md was renamedEach item gets a numeric index for veto in Step 8.
-
Trivial-fix candidates (only if any) — applied via Make-changes-and-approve per
pr-review:references:action-preview-templates. Suppressed when AI-suspect; see action-preview-templates §AI-suspect override. -
Overall assessment — single line: Clean / Minor issues / Issues found / Critical issues. Computed from the pinned 🚨 Outstanding count and any code-correctness findings. Pre-existing alone does not gate approval.
-
Recommendations — short, action-oriented. Map directly to a Step 7 menu (e.g., "→ Approve" or "→ Make changes and approve").
Render the whole package in one message.
Step 7: Present action menu
Use AskUserQuestion. Adaptive-scenario selection (which menu fires for which finding shape) and per-scenario options live in pr-review:references:action-menus. The Step 7 menu chooses what to do; auto-merge is decided in Step 8 via the merge toggle, never as a Step 7 option.
Step 8: Preview action and confirm (with merge toggle)
See pr-review:references:action-preview-templates.
The preview shows:
- Chosen action
- Auto-merge toggle with computed default (per the toggle defaults in
pr-review:references:action-preview-templates) - For Make-changes-and-approve: file-by-file changes (PR description corrections + trivial fixes + suggested fixes from CI's pinned findings)
- The exact comment text that will be posted (using
pr-review:references:message-templates) - The full list of
ghcommands that will run
The posted comment must obey the voice/length rules in pr-review:references:message-templates. Step 6's local package is for the maintainer's eyes; the public maintainer comment is its own thing.
Confirmation-menu adaptation (slot 2 changes per pending action; dispute-path opt-in is described below) lives in pr-review:references:action-preview-templates §Confirmation Question.
Dispute path (opt-in)
When the user picks "Dispute finding(s)", AskUserQuestion prompts for the finding number(s) and the dispute reasoning. pr-review composes a mention body in this shape:
[Maintainer dispute from @{{user}}]
Finding {{N}} (in {{file:line}}, {{summary}}): {{reasoning}}
Adjudicate per Case 2 dispute rules.
The body is fed to docs-review:references:update locally with MENTION_BODY populated. Update.md Case 2 takes over: classifies the dispute (domain-knowledge / verifiable / reframing), concedes or holds with citation, and re-renders the pinned comment via pinned-comment.sh upsert. Re-fetch the pinned comment afterwards so the Step 6 view reflects the resolution before the action proceeds.
Maintainer write-access is sufficient evidence for domain-knowledge disputes (per docs-review:references:update Case 2).
Step 9: Execute confirmed action
Execute per the commands and workflow in pr-review:references:action-preview-templates, using the merge-toggle state confirmed in Step 8. For Make-changes-and-approve failures: always return to original branch before reporting error.
Step 10: Report execution results
See pr-review:references:execution-results.
Workflow complete.
Error Recovery
If any command fails during execution:
❌ Failed to [action] PR #{{arg}}
Error: [error message]
Recovery options:
- /pr-review {{arg}} (re-run full workflow)
- Or use gh CLI directly: [relevant commands based on failure]
For Make-changes-and-approve failures: always return to original branch before reporting error.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/pull-request-review-msfn19l2/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/pull-request-review-msfn19l2' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pull-request-review-msfn19l2/download' --output '.skill-downloads/pull-request-review-msfn19l2/SKILL.md.part' && mv '.skill-downloads/pull-request-review-msfn19l2/SKILL.md.part' '.skill-downloads/pull-request-review-msfn19l2/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/pull-request-review-msfn19l2/SKILL.md' && test -s '.skill-downloads/pull-request-review-msfn19l2/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr-review' && cp -R '.skill-downloads/pull-request-review-msfn19l2' '.claude/skills/pr-review'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/pull-request-review-msfn19l2'openskills read 'pull-request-review-msfn19l2'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/pull-request-review-msfn19l2/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.