review-pr
Skill2 starsChanged 7 months agoMITView on GitHub
Review an open pull request against this repo's conventions. Pulls the diff via `gh pr diff`, scans for common issues (missing tests, secrets, hard-coded config, missing error handling, conventions violations), and posts a structured review comment via `gh pr comment`. Use when the user says "review PR #N", "look at this PR", or pastes a PR URL and asks for an opinion.
- Reads credentials
185 other projects use a version of this.
Adopted by
Most recently taken up by
- torrust/torrust-trackertheir own version, first seen Nov 16, 2026
- Wendor/teapod-streamtheir own version, first seen Nov 16, 2026
- testcontainers/testcontainers-javatheir own version, first seen Nov 16, 2026
- hotcodepush-team/skillstheir own version, first seen Nov 16, 2026
- chuckplayer/claude-agent-packtheir own version, first seen Nov 16, 2026
- ayoubben18/ab-methodtheir own version, first seen Nov 15, 2026
Used with
Projects with it also use diagnose-ci-failures, review-delta and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zerx-labSkilldiagnose-ci-failures
Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.
Also in 3 projects that use this
n24q02mSkillreview-delta
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.
Also in 3 projects that use this
GeiserXSkilldocs-loop
Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.
Also in 3 projects that use this
GeiserXSkillfull-loop
Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.
Also in 3 projects that use this
n24q02mSkillbuild-graph
Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.
Also in 3 projects that use this
- +7 more from GeiserX
Other versions185 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 185
- denoland/deno★ 109ksame name
- ToolJet/ToolJet★ 41ksame name
- remix-run/remix★ 33ksame name
- tirth8205/code-review-graph★ 33ksame name
- alpinejs/alpine★ 32ksame name
- nrwl/nx★ 29ksame name
- PrefectHQ/fastmcp★ 29ksame name
- jlowin/fastmcp★ 29ksame name
- livewire/livewire★ 24ksame name
- microsoft/fluentui★ 20ksame name
175 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- save-memorySkill
- ship-prSkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 178 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
If the PR isn't in the current repo, stop.
- Distinctive: line 72
Read the whole diff before forming an opinion.
- Distinctive: line 82
Commit messages follow Conventional Commits format
- Very specific: line 91
Test names describe behaviour (Test_returns_403_when_user_is_not_owner) not function names (TestUpdate)
- Distinctive: line 97
No hardcoded API keys, tokens, passwords, JWTs
- Distinctive: line 100
No production hostnames, IPs, or internal URLs hardcoded
- Distinctive: line 121
No new dependencies with known CVEs
- Distinctive: line 126
No drive-by refactors mixed in
- Distinctive: line 127
No formatter churn dominating the diff (a separate PR if needed)
- Distinctive: line 131
No N+1 queries (loops calling a repo / fetch per item)
- Distinctive: line 133
No synchronous external calls in hot paths
- Very specific: line 178
If you have zero critical/high findings, the verdict is APPROVE.
“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review PR
You are reviewing a pull request. The user has pointed you at a specific PR; your
job is to read it, judge it against the conventions in .claude/rules/, and post
a useful review comment.
This skill is intentionally simpler than ship-pr. The PR review job is mostly
judgement, which means most of the work is reading and thinking, not running
scripts. The script in this skill posts the comment; you draft what it says.
Step 0 — Resolve the PR number
# $ARGUMENTS may be a number (123) or a URL (https://github.com/org/repo/pull/123)
PR_INPUT="$ARGUMENTS"
if [[ "$PR_INPUT" =~ ^[0-9]+$ ]]; then
PR="$PR_INPUT"
elif [[ "$PR_INPUT" =~ /pull/([0-9]+) ]]; then
PR="${BASH_REMATCH[1]}"
else
echo "Could not parse PR number from: $PR_INPUT" >&2
exit 1
fi
# Confirm we're in the right repo
gh repo view --json nameWithOwner -q .nameWithOwnerIf the PR isn't in the current repo, stop. Cross-repo review needs --repo and
the user should be explicit.
Step 1 — Gather PR metadata
# Title, body, branch, base, author, state, CI
gh pr view "$PR" --json title,body,headRefName,baseRefName,author,state,statusCheckRollup,reviewDecision,additions,deletions,changedFiles,createdAtRead it. Note:
- Size — > 500 lines changed is hard to review well. Flag it
- CI status — if checks are failing, that's the first thing to mention
- Existing reviews — has someone already reviewed? Don't repeat their points
- Description quality — is the why in the body, or just the what?
Step 2 — Read the diff
gh pr diff "$PR"For very large PRs, narrow:
gh pr diff "$PR" --name-only # Just the file list
gh pr diff "$PR" -- path/to/file # Single fileRead the whole diff before forming an opinion. Don't just spot-check.
Step 3 — Run the review checklist
Walk through each category. Note specific files and line numbers for each finding so the author can act without hunting.
Conventions
- Branch name follows
<type>/<short-slug>(see.claude/rules/conventions.md) - Commit messages follow Conventional Commits format
- PR title matches the conventions
- PR body has What / Why / How / Test plan
Tests
- New code has tests
- New behaviour has a test for the behaviour
- Bug fixes have a test that would have caught the bug
- Test names describe behaviour (
Test_returns_403_when_user_is_not_owner) not function names (TestUpdate) - No
skip,xtest,it.only,fdescribe, or equivalent slipped in
Secrets & config
- No hardcoded API keys, tokens, passwords, JWTs
- No
.envor credentials files added - New config values have a corresponding entry in
.env.example - No production hostnames, IPs, or internal URLs hardcoded
Error handling
- Errors propagate (not swallowed with
_ = error empty catch blocks) - Errors are wrapped with context (
fmt.Errorf("...: %w", err),throw new Error("...", { cause })) - No
panic/process.exitin non-init code paths
Database (if applicable)
- Schema changes go through migrations
- Queries use parameterised statements (no string concatenation into SQL)
- Indexes added for new query patterns
- Multi-statement writes wrapped in a transaction where atomicity matters
Security (if applicable)
- Authorization checks on mutation endpoints (caller can do this thing for that resource)
- Input validation at the boundary
- Output encoding for anything user-controlled rendered into HTML/SQL/shell
- No new dependencies with known CVEs
Scope
- Changes match the PR title / linked issue
- No drive-by refactors mixed in
- No formatter churn dominating the diff (a separate PR if needed)
Performance (if applicable)
- No N+1 queries (loops calling a repo / fetch per item)
- Pagination on list endpoints
- No synchronous external calls in hot paths
Step 4 — Categorise findings
For each finding, assign a severity:
- CRITICAL — security flaw, data loss risk, auth bypass, leaked secret. Block the merge
- HIGH — broken functionality, missing tests for critical paths, breaks API contract. Should be fixed before merge
- MEDIUM — design smell that will hurt later, performance issue, incomplete vs spec. Fix before merge if cheap; flag and merge if not
- LOW — style, naming, minor refactor opportunity. Note it; author decides
- NIT — typo, comment polish. Author can ignore
Step 5 — Draft the review comment
Use this structure:
## Review
**Verdict:** APPROVE / REQUEST CHANGES / COMMENT
**TL;DR:** <1 sentence summary>
### Critical
<list — file:line — issue — suggested fix. Or "None.">
### High
<same shape>
### Medium
<same shape>
### Low / Nits
<same shape, but you can group these>
### What's good
<2–4 bullets noting things done well. Calibrates the rest of the review.>
### Open questions
<things you want the author to clarify, not necessarily change>If you have zero critical/high findings, the verdict is APPROVE. If you have
any, it's REQUEST CHANGES. COMMENT is for cases where you have observations
but no required fixes (e.g. you read a docs PR and have a few suggestions).
Do not post a review with no findings and no praise — it adds noise. If
there's truly nothing to say, just gh pr review --approve with no comment.
Step 6 — Post the comment
.claude/skills/review-pr/scripts/post-comment.sh "$PR" "$(cat <<'EOF'
<your drafted review here>
EOF
)"The script handles the gh invocation. You handle the content.
What this skill will not do
- It will not approve, request changes, or merge — it posts a comment. The
user makes the merge call. (You can extend this skill to do
gh pr review --approveor--request-changesif your team's culture allows; default is comment-only because reviewing on a delegated agent's authority is a strong claim.) - It will not push fixes to the author's branch. If you can fix something trivially, mention the fix in the review and let the author do it
- It will not pull external context (linked tickets, RFCs) unless the PR body links to them and the user explicitly asks for that depth
Calibration
Good reviews are short and specific. Three high-quality findings beat fifteen nits. If your review is longer than the PR's diff, you're doing it wrong.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

