pr-review-merge

pr-review-merge is a command for Claude Code from matteocervelli/llms. It costs 12 tokens per session (2,721 once invoked), scanned A, original, MIT.

A command for reviewing a GitHub pull request before merging it, including its checks, reviews, conflicts, and changed files.

In plain words
What is it for?
Use it to inspect pull-request metadata, CI results, review status, diffs, file sizes, and project design conventions before merging.
Why use it?
It helps find failed checks, missing approvals, merge conflicts, oversized files, and other issues that could make a merge unsafe.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect pull-request metadata, CI results, review status, diffs, file sizes, and project design conventions before merging.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/matteocervelli/llms/pr-review-merge
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.

Clone the repo
git clone --depth 1 https://github.com/matteocervelli/llms

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/matteocervelli/llms/pr-review-merge/github.svg)](https://agentmods.dev/commands/matteocervelli/llms/pr-review-merge)
Your own site
<a href="https://agentmods.dev/commands/matteocervelli/llms/pr-review-merge"><img src="https://agentmods.dev/badge/commands/matteocervelli/llms/pr-review-merge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-review-merge

Your own site · 80×15
<a href="https://agentmods.dev/commands/matteocervelli/llms/pr-review-merge"><img src="https://agentmods.dev/badge/commands/matteocervelli/llms/pr-review-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,721 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00012 $0.02721
Opus 5 $0.00006 $0.01360
Sonnet 5 $0.00002 $0.00544
Haiku 4.5 $0.00001 $0.00272

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

Security

Grade A, and why

pr-review-merge 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 8d 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.

.archive/claude-v1/commands/pr-review-merge.md · 367 lines

How it starts

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

PR Review Before Merge: $ARGUMENTS

Comprehensive pre-merge review to validate code quality, security, best practices, and readiness for production.

Phase 1: PR Metadata Analysis

# Get PR details
!gh pr view $ARGUMENTS --json title,body,author,reviewers,state,isDraft,mergeable,statusCheckRollup,headRefName,baseRefName

# Check review status
!gh pr reviews $ARGUMENTS

Initial Validation Checklist

  • PR is not in draft status
  • PR has proper title and description
  • No merge conflicts
  • CI/CD checks are passing
  • Required approvals are present
  • Target branch is correct (usually main/master)

BLOCKER: If any critical items fail, stop and report issues before continuing.

Phase 2: Changed Files Analysis

# Get PR diff
!gh pr diff $ARGUMENTS

# List changed files with stats
!gh pr view $ARGUMENTS --json files

File-Level Checks

Size Validation (per project 500-line limit):

# Check for oversized files
!gh pr diff $ARGUMENTS --name-only | while read file; do
    lines=$(git show HEAD:"$file" 2>/dev/null | wc -l)
    if [ "$lines" -gt 500 ]; then
        echo "⚠️  WARNING: $file has $lines lines (limit: 500)"
    fi
done

Modular Design:

  • Each file should have single responsibility
  • Check for proper separation of concerns
  • Verify clean interfaces between modules

Phase 3: Code Quality Review

# Run comprehensive quality checks
!echo "🔍 Running code quality analysis..."

Language-Specific Quality Checks

Python Projects:

# Formatting
!if command -v black &> /dev/null; then echo "→ Formatting (black):" && black --check . 2>&1 | head -20; fi

# Linting
!if command -v flake8 &> /dev/null; then echo "→ Linting (flake8):" && flake8 src/ tests/ 2>&1 | head -20; fi

# Type checking
!if command -v mypy &> /dev/null; then echo "→ Type checking (mypy):" && mypy src/ 2>&1 | head -20; fi

# Test coverage
!if command -v pytest &> /dev/null; then echo "→ Test coverage:" && pytest --cov=src --cov-report=term-missing 2>&1 | tail -10; fi

Read the full file on GitHub · 367 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. 8d ago First seen · 367 lines · 12 tokens per session scan A 8e12e07e3a6e

Subscribe to this mod's changes

pr-review-merge is a command published in the GitHub repository matteocervelli/llms (25 stars, last pushed 3mo ago), licensed MIT. It adds 12 tokens to every session and 2,721 once invoked, about $0.0001 per session on Opus 5. 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-09-01.