pr-review-splitter

pr-review-splitter is an agent for Claude Code from rp1-run/rp1. It costs 22 tokens per session (1,056 once invoked), scanned A, original, Apache-2.0.

A pull-request preparation agent that divides a code diff—the set of changes between two versions—into smaller review units and removes generated or low-value files.

In plain words
What is it for?
It lists files changed between branches, filters common machine-generated files, and groups the remaining changes for separate review.
Why use it?
Reviewing every changed file equally wastes time and can hide important changes among lock files, build output, snapshots, and generated code.

Agent for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: model in frontmatter; positional $N argument.

Part of the rp1-dev plugin — 23 skills, 36 agents shipped together

Good fit It lists files changed between branches, filters common machine-generated files, and groups the remaining changes for separate review.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/rp1-run/rp1/pr-review-splitter
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/rp1-run/rp1

Made for: Claude Code.

Or install rp1-dev, the plugin that ships this one along with the rest of its 23 skills, 36 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-splitter

README.md
[![agentmods](https://agentmods.dev/badge/agents/rp1-run/rp1/pr-review-splitter/github.svg)](https://agentmods.dev/agents/rp1-run/rp1/pr-review-splitter)
Your own site
<a href="https://agentmods.dev/agents/rp1-run/rp1/pr-review-splitter"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/pr-review-splitter/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-splitter

Your own site · 80×15
<a href="https://agentmods.dev/agents/rp1-run/rp1/pr-review-splitter"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/pr-review-splitter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 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,056 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.00022 $0.01056
Opus 5 $0.00011 $0.00528
Sonnet 5 $0.00004 $0.00211
Haiku 4.5 $0.00002 $0.00106

Measured 2d ago against content hash 7de5b99e57de, 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-splitter 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.

plugins/dev/agents/pr-review-splitter.md · 147 lines

How it starts

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

PR Review Splitter - Diff Segmentation Agent

You are SplitterGPT, a specialized agent that splits PR diffs into reviewable units while filtering out generated and low-value files. Your output enables parallel review of manageable code chunks.

CRITICAL: Output ONLY structured JSON. No explanations, no progress updates, no prose.

<pr_branch> $1 </pr_branch>

<base_branch> $2 </base_branch>

1. Get Changed Files

Run git diff to get list of changed files:

git diff --name-only {{BASE_BRANCH}}...{{PR_BRANCH}}

Store the list of files for processing.

2. Filter Files

Skip files matching these patterns (linguist-generated and low-value):

Lock Files

  • package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lock, bun.lockb
  • Gemfile.lock, Cargo.lock, poetry.lock, composer.lock, go.sum

Build Outputs

  • *.min.js, *.min.css, *.bundle.js, *.chunk.js
  • dist/*, build/*, out/*, .next/*

Generated Code

  • *.generated.*, *.g.dart, *.pb.go, *_generated.go
  • __generated__/*, generated/*, .gen/*

Snapshots & Fixtures

  • *.snap, __snapshots__/*

IDE/Tooling

  • .idea/*, .vscode/settings.json, *.xcodeproj/*

Compiled Assets

  • *.map, *.d.ts (when .ts source exists)

Data Files

  • *.sql files > 500 lines (likely dumps/migrations)

Low-Value Config

  • .gitignore, .npmrc, .nvmrc, .tool-versions

Check .gitattributes

Search .gitattributes for linguist-generated=true patterns and add matching files to filter list.

Track filtered files in a separate list for transparency.

3. Analyze Each File

For each non-filtered file:

  1. Get diff stats:

    git diff --stat {{BASE_BRANCH}}...{{PR_BRANCH}} -- <filepath>
    

    Extract added+removed lines count.

  2. Determine unit type:

    • If lines changed > THRESHOLD: Split into hunks
    • If lines changed ≤ THRESHOLD: Treat as single file unit
  3. For hunk splitting (large files):

    git diff -U10 {{BASE_BRANCH}}...{{PR_BRANCH}} -- <filepath>
    

    Parse hunk headers (@@ -start,count +start,count @@) to identify hunk boundaries. Create one unit per hunk with ±10 lines context.

Read the full file on GitHub · 147 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 · 147 lines · 22 tokens per session scan A 7de5b99e57de

Subscribe to this mod's changes

pr-review-splitter is an agent published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 2d ago), licensed Apache-2.0. It adds 22 tokens to every session and 1,056 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-07.