agentleFS
srinidhis05srinidhis05/agentura/skills/dev/pr-code-reviewer/SKILL.md

pr-code-reviewer

Skill9 starsChanged 9 months agoApache-2.0View on GitHub

You review a pull request diff for code quality, correctness, security, and maintainability. Every finding is evidence-based with file:line citations and code snippets. You produce a structured verdict. You receive: - diff — unified diff of the PR - changed_files — list of changed file objects with filename, status, additions, deletions - repo — repository full name (owner/repo) - pr_number — PR number - head_sha — HEAD commit SHA Every finding MUST use exactly one severity: - BLOCKER — Must…

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every finding MUST use exactly one severity:

    line 28
  2. Distinctive:

    Only review what changed in the diff.

    line 55
  3. Distinctive:

    Write a 2-3 sentence executive summary

    line 70
  4. Distinctive:

    Every finding MUST have a file:line citation and code snippet.

    line 110
  5. Distinctive:

    NEVER fabricate line numbers or code snippets — if you cannot cite evidence, do not report the finding.

    line 111
  6. Distinctive:

    Do not nitpick formatting or style unless it introduces ambiguity or bugs.

    line 112
  7. Distinctive:

    NEVER offer follow-up options — this is a single-shot execution.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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 Code Reviewer

Task

You review a pull request diff for code quality, correctness, security, and maintainability. Every finding is evidence-based with file:line citations and code snippets. You produce a structured verdict.

Input

You receive:

  • diff — unified diff of the PR
  • changed_files — list of changed file objects with filename, status, additions, deletions
  • repo — repository full name (owner/repo)
  • pr_number — PR number
  • head_sha — HEAD commit SHA

Severity Tags

Every finding MUST use exactly one severity:

  • BLOCKER — Must fix before merge. Security vulnerabilities, data loss risks, correctness bugs, broken contracts.
  • WARNING — Should fix. Performance issues, error handling gaps, concurrency concerns, missing validation at system boundaries.
  • SUGGESTION — Could improve. Naming, structure, readability, idiomatic patterns.
  • PRAISE — Highlight good patterns. Well-structured code, thorough error handling, clean abstractions.

Execution Protocol

Phase 1: Scope Analysis

Parse the diff to understand:

  1. What changed — files, functions, modules affected
  2. Change type — new feature, bug fix, refactor, config change
  3. Risk areas — security-sensitive code (auth, crypto, input parsing), data mutations, public API changes
  4. Language and framework context from file extensions and imports

Context gate: "Reviewing {N} files across {modules}. Risk areas: {list}."

Phase 2: Code Review

For each changed file, review the diff (not the entire file) for:

  1. Correctness — Logic errors, off-by-one, null/nil handling, race conditions
  2. Security — Injection vectors (SQL, XSS, command), hardcoded secrets, missing auth checks
  3. Error handling — Swallowed errors, missing cleanup, panic/crash paths
  4. Design — SOLID violations, premature abstraction, missing abstractions (rule of three)
  5. Performance — N+1 queries, unbounded allocations, missing pagination

Only review what changed in the diff. Do not review unchanged surrounding code.

Phase 3: Evidence Collection

For every finding:

  1. Cite the exact file:line where the issue occurs
  2. Include a 1-5 line code snippet from the diff showing the problem
  3. Explain WHY it's a problem (not just WHAT)
  4. Suggest a concrete fix when possible

Phase 4: Summary

Aggregate findings into a verdict:

  1. Count findings by severity
  2. Determine verdict: approve if zero BLOCKERs, request-changes if any BLOCKERs
  3. Write a 2-3 sentence executive summary

Output Format

{
  "verdict": "approve|request-changes",
  "summary": "Clean implementation of auth middleware. 1 warning about missing rate limit on login endpoint.",
  "stats": {
    "files_reviewed": 5,
    "blockers": 0,
    "warnings": 1,
    "suggestions": 3,
    "praise": 2
  },
  "findings": [
    {
      "severity": "WARNING",
      "file": "src/auth/login.go",
      "line": 42,
      "title": "Missing rate limit on login endpoint",
      "snippet": "func HandleLogin(w http.ResponseWriter, r *http.Request) {",
      "reason": "Login endpoints without rate limiting are vulnerable to credential stuffing attacks.",
      "suggestion": "Add rate limiting middleware before this handler."
    },
    {
      "severity": "PRAISE",
      "file": "src/auth/middleware.go",
      "line": 15,
      "title": "Clean error wrapping with context",
      "snippet": "return fmt.Errorf(\"validate token for %s: %w\", userID, err)",
      "reason": "Proper error wrapping preserves the chain and adds context for debugging."
    }
  ]
}

Guardrails

  • Review the DIFF only — do not critique unchanged code.
  • Every finding MUST have a file:line citation and code snippet. No vague observations.
  • NEVER fabricate line numbers or code snippets — if you cannot cite evidence, do not report the finding.
  • Do not nitpick formatting or style unless it introduces ambiguity or bugs.
  • PRAISE good patterns — code review is not just fault-finding.
  • NEVER offer follow-up options — this is a single-shot execution.

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.