pr-redteam-diff

pr-redteam-diff is a command for Claude Code from abossenbroek/abossenbroek-claude-plugins. It costs 10 tokens per session (1,273 once invoked), scanned A, original, BSD-3-Clause.

A command that performs an adversarial review of a pull-request diff, which is the file showing code changes. It can run a quick, standard, deep, or category-focused analysis.

In plain words
What is it for?
Use it to inspect a patch file, check the available analysis support, and request a structured red-team review of the changes.
Why use it?
It helps find reasoning flaws and other risks in proposed code changes before they are merged.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool.

Part of the red-agent plugin — 2 skills, 7 commands shipped together

Good fit Use it to inspect a patch file, check the available analysis support, and request a structured red-team review of the changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/abossenbroek/abossenbroek-claude-plugins/pr-redteam-diff
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/abossenbroek/abossenbroek-claude-plugins

Made for: Claude Code.

Or install red-agent, the plugin that ships this one along with the rest of its 2 skills, 7 commands.

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-redteam-diff

README.md
[![agentmods](https://agentmods.dev/badge/commands/abossenbroek/abossenbroek-claude-plugins/pr-redteam-diff.svg)](https://agentmods.dev/commands/abossenbroek/abossenbroek-claude-plugins/pr-redteam-diff)
Your own site
<a href="https://agentmods.dev/commands/abossenbroek/abossenbroek-claude-plugins/pr-redteam-diff"><img src="https://agentmods.dev/badge/commands/abossenbroek/abossenbroek-claude-plugins/pr-redteam-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 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,273 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.00010 $0.01273
Opus 5 $0.00005 $0.00636
Sonnet 5 $0.00002 $0.00255
Haiku 4.5 $0.00001 $0.00127

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

Security

Grade A, and why

pr-redteam-diff 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.

red-agent/commands/pr-redteam-diff.md · 168 lines

How it starts

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

/redteam-pr:diff Command

Adversarial red team analysis of a diff file for PR review.

Usage

/redteam-pr:diff <diff_file> [mode]

Arguments

diff_file (required):

  • Path to a diff or patch file to analyze
  • Example: /redteam-pr:diff changes.patch

mode (optional):

  • quick - Fast 2-3 vector analysis, skip grounding
  • standard - Balanced 5-6 vectors with basic grounding (default)
  • deep - All categories + meta-analysis with full grounding
  • focus:[category] - Deep dive on specific category (e.g., focus:reasoning-flaws)

Instructions

You are the MINIMAL entry point for PR red team analysis of diff files. Your ONLY job is to:

  1. Read the diff file from the provided path
  2. Check PAL MCP availability (optional enhancement)
  3. Parse diff content and build structured snapshot
  4. Launch the pr-analysis-coordinator agent with the snapshot
  5. Return the coordinator's output directly to the user

Step 1: Read Diff File

Use the Read tool to get the diff content from the provided file path.

If the file does not exist or cannot be read, inform the user and exit.

Step 2: Check PAL Availability (Non-Blocking)

Launch the pal-availability-checker agent to detect if PAL MCP is available:

Task: Launch pal-availability-checker agent
Agent: agents/pal-availability-checker.md
Prompt: Check if PAL MCP is available and list models

Parse the YAML result and include pal_available: true/false in the snapshot. This step is NON-BLOCKING - continue regardless of result. PAL is optional.

Step 3: Parse Mode

Determine mode from command arguments:

  • Default mode: standard

Step 4: Parse Diff Content

Parse the diff file to build structured metadata:

From unified diff format:

  • Extract file paths from --- a/... and +++ b/... lines
  • Count additions (lines starting with +, excluding +++)
  • Count deletions (lines starting with -, excluding ---)
  • Classify change_type: added, modified, deleted, renamed

Calculate risk_score per file:

  • Base score: 0.0
  • Authentication/security files (auth, security, permission in path): +0.4
  • Large changes (>100 lines added/deleted): +0.3
  • Test files (test, spec in path): -0.3
  • Clamp to [0.0, 1.0]

Read the full file on GitHub · 168 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 · 168 lines · 10 tokens per session scan A 8ef2a8d053e0

Subscribe to this mod's changes

pr-redteam-diff is a command published in the GitHub repository abossenbroek/abossenbroek-claude-plugins (2 stars, last pushed 4mo ago), licensed BSD-3-Clause. It adds 10 tokens to every session and 1,273 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-08-31.