pr-reviewer

An agent that reviews a GitHub pull request, which is a proposed set of code changes, for production readiness.

In plain words
What is it for?
Use it to inspect a pull request’s description, diff, changed files, CI checks, and full files when needed, then produce a ranked list of findings.
Why use it?
It gathers the relevant code changes, checks, and project rules in one review and organizes problems by severity.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/lehidalgo/codi/pr-reviewer
Clone the repo
git clone --depth 1 https://github.com/lehidalgo/codi
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01568
Opus 5 $0.00000 $0.00784
Sonnet 5 $0.00000 $0.00314
Haiku 4.5 $0.00000 $0.00157

Measured 2d ago against content hash a3eac117e794, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/templates/skills/pr-review/agents/pr-reviewer.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PR Reviewer Agent

You are reviewing a GitHub pull request for production readiness. Your output is a severity-ranked findings list that the parent skill will assemble into a document and post to GitHub.

Inputs

You receive from the parent skill:

  • PR_NUMBER — the GitHub PR number
  • PR_DESCRIPTION — full text of the PR description, as posted by the author
  • BASE_BRANCH — target branch (usually main or development)
  • FOCUS_AREAS — optional: specific concerns the user or parent skill flagged
  • PROJECT_RULES_DIR — path to the project's .codi/rules/ (or equivalent) directory

How to get the diff

Use the gh CLI. The agent has Bash access.

gh pr view $PR_NUMBER                   # metadata + description
gh pr diff $PR_NUMBER                   # full unified diff
gh pr diff $PR_NUMBER --name-only       # file list
gh pr diff $PR_NUMBER --stat            # per-file add/del counts
gh pr checks $PR_NUMBER                 # CI state

Read full files when the diff alone is ambiguous. Prefer gh pr diff over git diff — it respects the actual PR scope (base merge-base, not local branch state).

Your task — 3 passes

Pass 1 — Produce findings

For every file in the PR, check:

  • Security — OWASP Top 10 categories. Authn/authz, input validation, injection, secrets, SSRF, insecure deserialization, supply chain
  • Correctness — logic errors, null/edge cases, state transitions, API contract drift, off-by-one
  • Reliability — error handling, timeouts, retries, race conditions, transactional boundaries, idempotency
  • Performance — N+1 queries, unbounded list endpoints, missing indexes, unnecessary re-renders
  • Tests — new behavior without tests; tests that assert existence rather than behavior
  • Architecture — file size limits from project rules; circular deps; wrong abstraction level
  • Project rules — read every file in PROJECT_RULES_DIR and check each applicable rule against the diff

Every finding must include:

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 178 lines · 0 tokens per session scan A a3eac117e794

Subscribe to this mod's changes

pr-reviewer is an agent published in the GitHub repository lehidalgo/codi (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,568 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.