PR review
Reviews a pull request, a branch or uncommitted changes, putting correctness bugs first and design second, with severity-ranked findings that cite file and line. Use when the user asks to review a PR, a branch or a diff.
pr-reviewInstall
Run one command — it saves SKILL.md into your agent's skills folder. Restart the agent and the skill is picked up automatically.
mkdir -p ~/.claude/skills/pr-review && curl -fsSL https://anymodel.org/en/skills/code-review/pr-review/SKILL.md -o ~/.claude/skills/pr-review/SKILL.md
mkdir -p ~/.agents/skills/pr-review && curl -fsSL https://anymodel.org/en/skills/code-review/pr-review/SKILL.md -o ~/.agents/skills/pr-review/SKILL.md
New-Item -ItemType Directory -Force "$HOME\.claude\skills\pr-review" | Out-Null; Invoke-WebRequest https://anymodel.org/en/skills/code-review/pr-review/SKILL.md -UseBasicParsing -OutFile "$HOME\.claude\skills\pr-review\SKILL.md"
New-Item -ItemType Directory -Force "$HOME\.agents\skills\pr-review" | Out-Null; Invoke-WebRequest https://anymodel.org/en/skills/code-review/pr-review/SKILL.md -UseBasicParsing -OutFile "$HOME\.agents\skills\pr-review\SKILL.md"
Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/code-review/pr-review/SKILL.md
SKILL.md
PR Review
Review a change the way a careful teammate would: find what will break, then what will hurt later. Do not comment on style unless the user asks.
1. Pin down the target
Decide what is being reviewed and get the exact diff.
git status --short # uncommitted work
git diff # unstaged
git diff --staged # staged
git diff origin/main...HEAD # a branch vs its merge base
gh pr diff 123 # a PR, if the gh CLI is available
git log --oneline origin/main..HEAD # the commits involved
If the target is ambiguous (several branches, a dirty tree plus a PR), ask one short question before reading anything.
2. Understand the intent
- Read the PR description, linked issue and commit messages. State the intent in one sentence to yourself.
- If the intent is unclear, say so in the report; a change you cannot explain cannot be judged correct.
3. Read the surrounding code, not just the diff
A diff shows what changed, not what it breaks. For every changed function:
- Open the whole file around the hunk, and the callers (
grep -rn "functionName"). - Check the contracts: argument types, nullability, error returns, ordering assumptions, units.
- Look for sibling code that should have changed too (other call sites, config, docs, migrations, tests, types).
- Check tests: do they exercise the new behavior, or only the happy path?
4. Hunt bugs first
Walk the diff once purely for correctness:
- Off-by-one, wrong comparison, inverted condition, missing
await, unhandled promise or error. - Null/undefined/empty-collection inputs, zero, negative, very large values.
- Concurrency: shared state, races, double submit, retries that are not idempotent.
- Resource handling: unclosed handles, transactions not rolled back on error, leaked listeners.
- Data: migrations that lock tables or lose data, changed defaults, timezone and encoding assumptions.
- Backward compatibility: changed API shape, renamed env vars, removed fields still used elsewhere.
Only report a bug if you can describe a concrete input or sequence of events that makes it fail. If you cannot, mark it as a question, not a finding.
5. Then design
Second pass, fewer comments, higher bar:
- Does the change belong in this layer or module?
- New coupling, duplicated logic that already exists elsewhere, a public API that will be hard to change.
- Missing tests for risky logic.
- Something simpler that does the same job.
6. Output format
Report findings sorted by severity. Use this shape:
Summary: <one or two sentences: what the change does and your overall verdict>
[blocker] path/to/file.ts:42 - <short title>
Scenario: <concrete input/sequence that fails>
Effect: <what the user or system sees>
Suggestion: <smallest fix>
[major] ...
[minor] ...
[question] ...
Not checked: <things you could not verify, e.g. did not run the code>
Severity scale:
- blocker: data loss, security hole, crash on a common path, wrong results.
- major: bug on an uncommon path, missing error handling, missing test for risky logic.
- minor: small robustness or clarity issue worth fixing but not blocking.
- question: you need the author to explain intent.
If there are no findings, say so plainly and list what you checked. Do not invent problems to look thorough.
Pitfalls
- Do not review only the lines that are highlighted; bugs live in what the change interacts with.
- Do not flag formatting, naming taste or import order unless asked or the repo has a stated rule.
- Do not claim a bug without a failure scenario.
- Do not run or modify the code in ways that change the user's working tree unless asked. Running tests is fine.
- Do not approve or merge on the user's behalf; give a verdict and let them act.
- Keep the list short: five real findings beat thirty trivial ones.
Source: AnyModel skills catalog · License: CC BY 4.0
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel