agentleFS
anderson-c-santosanderson-c-santos/claude-skills-network/skills/pr-review/SKILL.md

pr-review

Skill1 starsChanged 5 months agoMITView on GitHub

Review a GitHub PR or local diff and write structured review comments. Trigger for: /pr-review, review PR, review this diff, write review, code review PR #N. Reads changes, finds bugs/issues, posts inline comments via gh CLI or prints review.

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 9 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

  • MicrosoftSkill

    code-quality

    Statically check changed C# against the same deterministic rules github-code-quality[bot] runs on pull requests, so a contributor can fix likely findings before opening the PR and keep the bot's inline comments to a minimum. Activate when a contributor asks to "check code quality", "run code quality on my changes", "will the code quality bot complain", "pre-check before I open the PR", "code quality check", or similar. Scoped to C#. Reads the diff and compares it against the enumerated csharp-code-quality rule set below — no CodeQL download or build required. This is a fast approximation of a dataflow engine, not a reproduction; report accordingly. Does NOT apply fixes unless explicitly asked.

    Also in 5 projects that use this

  • +2 more from CES-Ltd

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 104 edited versions we read keep these.

  • 1

    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:

    Write a structured code review for a GitHub PR or the current branch diff.

    line 8
  2. Distinctive:

    If PR is a draft: note it in the summary but still review.

    line 33

“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

Write a structured code review for a GitHub PR or the current branch diff. After this, use /merge-pr to ship.

Invocation Forms

  • /pr-review — review current branch diff vs base
  • /pr-review <PR#> — review a specific GitHub PR
  • /pr-review <PR URL> — review by full URL

Severity Levels

IconLabelMeaningBlocks merge?
🔴BLOCKERBug, security hole, data loss riskYes
🟡SUGGESTIONCleaner/safer approachNo
🟢NITStyle, naming, minor polishNo

Workflow

1. Get the diff

GitHub PR:

gh pr view <PR#> --json title,body,headRefName,baseRefName,author,isDraft
gh pr diff <PR#>
gh pr view <PR#> --json files --jq '[.files[].path]'

If PR is a draft: note it in the summary but still review.

Local diff (no PR#):

BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|.*/||' || echo main)
git diff $BASE...HEAD
git log $BASE...HEAD --oneline

2. Read changed files in full

For each changed file, read the complete file — not just the diff hunk. Context outside the hunk often reveals the real impact of a change.

Prioritize full reads for:

  • Auth, session, permission logic
  • Database queries and migrations
  • Public API handlers
  • Config and environment loading

3. Write findings

Review structure:

## Review Summary
<1-2 sentence overall assessment>

**Verdict:** ✅ Approve / ⚠️ Request changes / 🔴 Block

---

### <file>:<line>
🔴 BLOCKER / 🟡 SUGGESTION / 🟢 NIT

**Issue:** <what is wrong>
**Why:** <why it matters>
**Fix:**
```lang
<corrected snippet>


### 4. Post or print

**GitHub PR — post comment:**
```bash
gh pr review <PR#> --comment --body "$(cat <<'EOF'
<full review>
EOF
)"

Inline comment on a specific line:

gh api repos/{owner}/{repo}/pulls/<PR#>/comments \
  -f body="<comment>" \
  -f path="<file>" \
  -f line=<N> \
  -f side=RIGHT \
  -f commit_id=$(gh pr view <PR#> --json headRefOid --jq '.headRefOid')

Local diff — print only (no GitHub post).

5. Output

  • GitHub PR: PR URL + review URL
  • Local: full review printed, then one-line verdict

What to Check

Security (always — every PR)

  • User input used in SQL queries without parameterization
  • User input used in shell commands (exec, subprocess, os.system)
  • Hardcoded secrets, API keys, passwords in any file including tests
  • Missing authentication/authorization checks on new routes or handlers
  • File path traversal (../ in user-controlled paths)
  • XSS: unsanitized output in HTML templates
  • CORS/CSRF misconfiguration on new endpoints
  • Insecure deserialization (pickle, eval, JSON with prototype pollution)

Correctness

  • Off-by-one in loops, slice indices, pagination
  • Null / nil / undefined not handled before use
  • Async bugs: missing await, race condition on shared state
  • Wrong HTTP status codes (e.g. 200 on error, 404 vs 400)
  • Error swallowed silently (catch {}, _ = err)
  • Wrong comparison operator (= vs ==, == vs ===)

Language-specific

JavaScript / TypeScript:

  • == null vs === null (use == null to catch both null and undefined)
  • any type that bypasses TypeScript safety
  • Unhandled promise rejections
  • console.log left in production code

Python:

  • Mutable default argument def f(x=[]):
  • Bare except: that swallows all errors
  • assert used for input validation (stripped by -O flag)
  • eval() / exec() on any external input

Go:

  • err returned but not checked
  • defer inside a loop (runs at function exit, not loop iteration)
  • Nil pointer dereference on pointer receivers
  • Goroutine leak (goroutine started but never stops)

Maintainability (suggest, not block)

  • Function longer than ~50 lines with multiple responsibilities
  • Magic numbers/strings without a named constant
  • Copy-pasted logic that could be a shared function
  • Variable name that requires reading the whole function to understand

Skip

  • Style issues covered by the project linter
  • Hypothetical future requirements not in scope
  • Code outside the diff

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.