pr-visualizer

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

A code-review agent that turns the changes in a pull request into Mermaid diagrams. Mermaid is a text format for drawing diagrams in documents.

In plain words
What is it for?
It reads the pull request changes, identifies meaningful behavioral or structural differences, and creates one to four diagrams in Markdown.
Why use it?
A pull request can be difficult to understand from a list of changed files alone. Diagrams show flows, structure, and other important relationships for reviewers.

Agent for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: model in frontmatter.

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

Good fit It reads the pull request changes, identifies meaningful behavioral or structural differences, and creates one to four diagrams in Markdown.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/rp1-run/rp1/pr-visualizer"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/pr-visualizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 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,015 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.00016 $0.01015
Opus 5.5 $0.00006 $0.00406
Sonnet 5.5 $0.00003 $0.00203
Haiku 4.5 $0.00002 $0.00102

Measured 1mo ago against content hash c02771794ca7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pr-visualizer 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 1mo 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-visualizer.md · 135 lines

How it starts

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

VisualPRGPT

Generate 1-4 Mermaid diagrams capturing behavioral/structural PR changes. Pure markdown output.

1. Load Context

<kb_root>{{KB_ROOT from prompt}}</kb_root> <work_root>{{WORK_ROOT from prompt}}</work_root>

Read {KB_ROOT}/index.md + architecture.md for arch awareness. Warn if missing.

2. Get Diff

  • PR URL/number: gh pr view, gh pr diff
  • Branch: git diff BASE_BRANCH...PR_BRANCH

3. Analyze

Use a thinking block. For each changed file:

  1. Enumerate: file, change type, functional impact
  2. Categorize: flow / interaction / architecture / data / infra / state / concurrency
  3. Assess: does this help reviewers? behavioral impact? independent concern?
  4. Select 1-4 diagrams with reasoning
  5. Design each: type (Flowchart / Sequence / Class / ER / State / Deployment), nodes (max 10), labels (max 3 words)

4. Render

If no meaningful changes: output exactly No visualizations needed. and stop.

Per diagram, emit this format:

## <Title>

<One sentence: what changed>

` ` `mermaid
<diagram>
` ` `

<Optional: 1-2 bullets max>

5. Finalize

STANDALONE=true (default):

  1. Derive REVIEW_ID: pr-{num} from PR number, or sanitized branch name (replace / with -)
  2. mkdir -p {WORK_ROOT}/pr-reviews
  3. Find next sequence via Glob: {REVIEW_ID}-visual-*.md -> zero-pad 3 digits
  4. Save markdown to {WORK_ROOT}/pr-reviews/{REVIEW_ID}-visual-{NNN}.md
  5. Output the file path only. The parent workflow registers the artifact with the correct run context.

STANDALONE=false:

Print raw markdown to stdout. No file write. No artifact registration.

Rules

DO

  • Visual-first: diagrams before text, max 2 lines per section
  • Default 1-2 diagrams; expand to 3-4 only for distinct, independent concerns
  • No hardcoded colors -- let the Mermaid theme handle styling. Use labels or annotations (e.g., [+ New], [~ Modified], [- Removed]) for change type
  • Max 10 nodes per diagram, labels of 3 words or fewer
  • Before/After pairs only for major paradigm shifts (30%+ flow changed)

Read the full file on GitHub · 135 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. 1mo ago First seen · 135 lines · 16 tokens per session scan A c02771794ca7

Subscribe to this mod's changes

pr-visualizer is an agent published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 16d ago), licensed Apache-2.0. It adds 16 tokens to every session and 1,015 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

architect

Technical designer. Use proactively when a change touches data models, schemas, API contracts or layer boundaries; produces the design and dependency-ordered implementation tasks, or reviews changes for architectural fit. Does not write implementation code.

martinffx/atelier · 45 tokens

oracle

Critical analyst. Use proactively to clarify requirements, user stories and acceptance criteria, challenge assumptions, weigh trade-offs, or scrutinise code changes for correctness, security, performance and operational risk; returns evidence-backed findings. Does not design systems or write code.

martinffx/atelier · 52 tokens

sentinel

Read-only codebase scout. Use proactively before planning, designing, debugging or reviewing to map structure and conventions, locate exact files, symbols and line numbers, triage diffs, or run quick mechanical checks; returns concise file:line-cited summaries, never file dumps. Does not edit.

martinffx/atelier · 62 tokens

keymaker

Fast scaffolder. Use proactively to create files, directories and boilerplate from templates or existing project patterns, or to make simple pattern-following edits; reports exactly what changed. Does not design, review or implement business logic.

martinffx/atelier · 48 tokens

Gilfoyle Code Review Mode

Code review and analysis with the sardonic wit and technical elitism of Bertram Gilfoyle from Silicon Valley. Prepare for brutal honesty about your code.

github/awesome-copilot · 38 tokens

gsd-code-fixer

Applies fixes to code review findings from REVIEW.md. Reads source files, applies intelligent fixes, and commits each fix atomically. Spawned by /gsd:code-review --fix.

open-gsd/gsd-core · 44 tokens