agentleFS
kriscardkriscard/Skills/skills/dev/pr-review/SKILL.md

pr-review

Skill14 starsChanged 4 months agoMITView on GitHub

Bug-first, evidence-only PR review with guidance-scoped specialist passes for security, correctness, architecture, React patterns, and accessibility. Use when the user says "review this PR", "review my changes", "review the diff", or mentions a PR number. Prefers silence over speculative findings.

117 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pr-fix, oss-pr 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.
  • volovelySkill

    pr-fix

    This skill should be used when the user asks to "fix PR comments", "address PR feedback", "resolve PR comments", provides a GitHub PR URL with intent to fix, or says "pr-fix". It reads all review comments on a PR, decides which need code fixes vs. replies, makes the fixes, and posts replies — all with explicit user approval before any GitHub action.

    Also in 5 projects that use this

  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • EffortlessMetricsSkill

    pr-create

    Also in 7 projects that use this

  • dversozaSkill

    pr-feedback

    Address PR review feedback including inline threads, general comments, bot-generated reviews, PR description findings, check run annotations (inline lint/type/security findings shown in the Files changed tab), code scanning alerts, and CI failures. Use when asked to handle, address, resolve, respond to, or work through PR review comments, review feedback, inline findings, or CI check failures. Triggers on requests like "address PR comments", "handle review feedback", "resolve PR reviews", "fix review comments", "go through PR feedback", "check CI failures", "fix the inline findings on the PR".

    Also in 3 projects that use this

  • Microsoft AzureSkill

    create-release

    Use when creating a new ASO release, including pre-checks, release notes generation, draft GitHub release creation, documentation updates, and ROADMAP changes.

    Also in 3 projects that use this

  • +2 more from CES-Ltd

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 104 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the PR's baseRefName when available.

    line 32
  2. Distinctive:

    Check what the diff touches to decide which specialist passes to run:

    line 49
  3. Distinctive:

    Before reporting a candidate, confirm all gates:

    line 81
  4. Distinctive:

    If validation fails, drop the finding silently.

    line 93
  5. Distinctive:

    Keep the most specific description and highest justified severity.

    line 98
  6. Distinctive:

    Do not comment on GitHub/GitLab or call commenting tools unless the user explicitly asks

    line 133
  7. Distinctive:

    Do not flag style, formatting, or missing tests unless guidance says so or the issue creates concrete risk

    line 134
  8. Distinctive:

    Do not invent rules; enforce only evidenced bugs and applicable project guidance

    line 135
  9. Distinctive:

    Do not flag theoretical security risks without a plausible path to harm

    line 136
  10. Distinctive:

    Do not flag skipped paths or generated files unless guidance explicitly includes them

    line 137
  11. Distinctive:

    Prefer no findings over weak findings

    line 138

“Common” is measured: kept by at least 6 in 10 of the 104 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PR Review

Bug-first PR review: report only findings with evidence, reachable impact, and a concrete fix. Prefer silence over false positives.

Step 1 — Acquire Context (run independent reads in parallel)

# If PR number given:
gh pr view <number> --json title,body,files,baseRefName,headRefName,commits
gh pr diff <number>

# If reviewing current branch, determine base first:
git status -sb
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || true
git merge-base HEAD origin/<base-branch>
git diff "$(git merge-base HEAD origin/<base-branch>)"..HEAD
git log "$(git merge-base HEAD origin/<base-branch>)"..HEAD --oneline

Use the PR's baseRefName when available. Do not assume main if the PR or repository reports a different base branch.

Also read applicable guidance:

  • root CLAUDE.md / REVIEW.md
  • any CLAUDE.md / REVIEW.md in directories containing modified files
  • skip rules for generated files, vendored code, snapshots, fixtures, or file patterns

Build a guidance map: which rules apply to which changed paths.

Done only when you have: base branch, head branch, file list, full diff, commit list, PR description, guidance map, and skipped paths. If any item is unavailable, state why before review.

Step 2 — Profile the Diff

Check what the diff touches to decide which specialist passes to run:

  • HAS_REACT — diff contains .tsx, .jsx, use*.ts, components/, or similar
  • HAS_ARCH — diff touches services/, schemas/, api/, routes/, migrations/, prisma/
  • HAS_UI — diff contains CSS, Tailwind classes, styled-components, or design tokens
  • HAS_CONFIG — diff touches build, deploy, dependency, env, CI, auth, or database config

Step 3 — Run Specialist Passes

For non-trivial diffs, run specialist passes in parallel when agents are available. Otherwise run the same passes sequentially yourself. Each pass must read enough surrounding code to confirm data flow and call sites.

Always run:

  • Bug + regression — logic errors, broken edge cases, build failures, wrong results
  • Security + trust boundaries — exploit paths, auth bypasses, injection, races, secret exposure
  • Guideline compliance — exact violations of the guidance map; cite the rule and respect skip rules

If HAS_ARCH:

  • Architecture — coupling, boundary violations, schema design, migration/backward compatibility

If HAS_REACT:

  • React runtime — hook dependencies, stale closures, key stability, hydration, waterfalls, memoization correctness

If HAS_UI:

  • Accessibility + interface — WCAG issues, labels, keyboard navigation, focus states, contrast, interactive states

If HAS_CONFIG:

  • Release safety — deploy/build breaks, unsafe defaults, missing migrations, dependency/runtime mismatch

Step 4 — Validate Candidate Findings

Before reporting a candidate, confirm all gates:

  • The issue was introduced by this PR, or is pre-existing but directly relevant to the changed code path.
  • The affected path is reachable with realistic inputs or states.
  • The problem is not handled elsewhere by a guard, fallback, type guarantee, transaction, try/catch, sanitizer, or caller contract.
  • The impact is concrete: accuracy, security, reliability, performance, or maintainability harm the author would likely fix.
  • The finding is guidance-scoped: it does not violate skip rules and cites any exact project rule it enforces.

If validation fails, drop the finding silently.

Step 5 — Reconcile Findings

  1. Deduplicate findings that describe the same underlying issue.
  2. Keep the most specific description and highest justified severity.
  3. Score severity:
    • P0 — production-stopping issue: exploitable security hole, data loss, broken core flow, deploy/build break
    • P1 — should fix before merge: clear correctness, reliability, or security bug
    • P2 — fix soon: performance or maintainability issue a senior engineer would care about
    • P3 — low risk: clear guidance violation or minor bug worth fixing, but non-blocking
    • Pre-existing — existing bug directly relevant to the changed path but not introduced here
  4. Resolve contradictions by source evidence first: diff, tests, docs, runtime behavior. Ask the user only when product intent is required.

Output Format

## PR Review — <title>
Issues: N P0 · N P1 · N P2 · N P3 · N pre-existing

### P0
- `path/to/file.ts:42` — [Issue description] → [Specific fix]

### P1
- `path/to/file.ts:88` — [Issue description] → [Specific fix]

### P2
...

### Pre-existing
...

### Risk Summary
[No blocking issues found / Found issues worth addressing before merge / Found production-risk issue]

Omit sections that have no findings. Do not approve, block, or post comments.

Hard Constraints

  • Do not comment on GitHub/GitLab or call commenting tools unless the user explicitly asks
  • Do not flag style, formatting, or missing tests unless guidance says so or the issue creates concrete risk
  • Do not invent rules; enforce only evidenced bugs and applicable project guidance
  • Do not flag theoretical security risks without a plausible path to harm
  • Do not flag skipped paths or generated files unless guidance explicitly includes them
  • Prefer no findings over weak findings

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.