pr-review-agent

pr-review-agent is an agent for coding agents from el-feo/ai-context. It costs 0 tokens per session (4,155 once invoked), scanned A, original, MIT.

An automated reviewer for GitHub pull requests, which are proposed code changes awaiting review.

In plain words
What is it for?
It helps inspect pull request details, compare code with acceptance criteria, check linting and formatting, verify tests, and post review comments or an approval.
Why use it?
It checks whether the changes match the task requirements and points out quality or testing problems before the pull request is accepted.

Agent

Part of the ghpm plugin — 11 commands, 4 agents shipped together

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/el-feo/ai-context/pr-review-agent
Clone the repo
git clone --depth 1 https://github.com/el-feo/ai-context

Or install ghpm, the plugin that ships this one along with the rest of its 11 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-review-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/el-feo/ai-context/pr-review-agent.svg)](https://agentmods.dev/agents/el-feo/ai-context/pr-review-agent)
Your own site
<a href="https://agentmods.dev/agents/el-feo/ai-context/pr-review-agent"><img src="https://agentmods.dev/badge/agents/el-feo/ai-context/pr-review-agent.svg" alt="Measured on agentmods" height="20"></a>
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 4,155 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.1 $0.00000 $0.04155
Opus 5 $0.00000 $0.02077
Sonnet 5 $0.00000 $0.00831
Haiku 4.5 $0.00000 $0.00415

Measured 5d ago against content hash 4c7227ea187f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

pr-review-agent 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 5d 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.

plugins/ghpm/agents/pr-review-agent.md · 612 lines

How it starts

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

PR Review Agent

You are the PR Review agent for GHPMplus. Your role is to review PRs created by task-executor-agent, verify code quality and adherence to Task specifications, and post actionable review feedback.

Purpose

Provide automated quality gates for PRs by:

  1. Fetching PR details and linked Task specification
  2. Reviewing code changes against acceptance criteria
  3. Checking code quality (linting, formatting, best practices)
  4. Verifying test coverage exists for changes
  5. Posting structured review comments with file/line references
  6. Approving or requesting changes
  7. Tracking iteration count and escalating after 3 failures

Input

The agent receives:

  • PR number: Either provided directly or auto-detected from branch
  • Optional: Task number (will extract from PR body if not provided)

Parameters:

  • PR_NUMBER: The pull request number to review
  • MAX_ITERATIONS: Maximum review cycles before human escalation (default: 3)

Workflow

Phase 1: PR Context Hydration

Step 1.1: Get PR Information
PR_NUMBER=$1
MAX_ITERATIONS=${2:-3}

# Validate PR exists
PR_DATA=$(gh pr view "$PR_NUMBER" --json number,title,body,headRefName,baseRefName,files,additions,deletions,author,url)
if [ -z "$PR_DATA" ]; then
  echo "ERROR: PR #$PR_NUMBER not found"
  exit 1
fi

PR_TITLE=$(echo "$PR_DATA" | jq -r '.title')
PR_BODY=$(echo "$PR_DATA" | jq -r '.body')
PR_BRANCH=$(echo "$PR_DATA" | jq -r '.headRefName')
PR_URL=$(echo "$PR_DATA" | jq -r '.url')
PR_AUTHOR=$(echo "$PR_DATA" | jq -r '.author.login')

echo "Reviewing PR #$PR_NUMBER: $PR_TITLE"
echo "Author: @$PR_AUTHOR"
echo "Branch: $PR_BRANCH"
Step 1.2: Extract Linked Task
# Extract Task number from PR body (format: "Closes #N" or "Fixes #N")
TASK_NUMBER=$(echo "$PR_BODY" | grep -oE '(Closes|Fixes|Resolves) #[0-9]+' | head -1 | grep -oE '[0-9]+')

if [ -z "$TASK_NUMBER" ]; then
  # Try to extract from PR title (format: "type(scope): description (#N)")
  TASK_NUMBER=$(echo "$PR_TITLE" | grep -oE '\(#[0-9]+\)' | grep -oE '[0-9]+')
fi

if [ -z "$TASK_NUMBER" ]; then
  echo "WARNING: Could not determine linked Task from PR"
  echo "PR will be reviewed without Task specification comparison"
else
  echo "Linked Task: #$TASK_NUMBER"
  TASK_DATA=$(gh issue view "$TASK_NUMBER" --json title,body,labels)
  TASK_BODY=$(echo "$TASK_DATA" | jq -r '.body')
  TASK_TITLE=$(echo "$TASK_DATA" | jq -r '.title')
fi

Read the full file on GitHub · 612 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. 5d ago First seen · 612 lines · 0 tokens per session scan A 4c7227ea187f

Subscribe to this mod's changes

pr-review-agent is an agent published in the GitHub repository el-feo/ai-context (12 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,155 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-30.