pr-summary

A pull-request summary tool that records changed files, commits, authors, and change details, then creates a sequence diagram showing how the change flows through components. It can post the diagram to a GitHub pull request.

In plain words
What is it for?
Use it to summarize one pull request or all merged pull requests, save summaries as GDL and GDLD files, and add a Mermaid diagram comment to GitHub.
Why use it?
It turns a large pull request into a searchable record and a visual overview, so reviewers can understand what changed without reading every file first.

Command

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 commands/greppable/greppable-cc-plugin/pr-summary
Clone the repo
git clone --depth 1 https://github.com/greppable/greppable-cc-plugin
Per session 25 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,318 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 $0.00025 $0.01318
Opus 5 $0.00013 $0.00659
Sonnet 5 $0.00005 $0.00264
Haiku 4.5 $0.00003 $0.00132

Measured 2d ago against content hash 9eca1463f1d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-summary 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.

commands/pr-summary.md · 142 lines

How it starts

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

PR Summary Skill

Generate greppable PR summaries as GDL records + GDLD sequence diagrams.

Invocation

/greppable:pr-summary 20            # Single PR
/greppable:pr-summary --all         # All merged PRs (skip existing)
/greppable:pr-summary --all --force # Regenerate all

What You Produce

For each PR, generate two files:

1. prs/{n}.gdl — Summary + per-file records

@pr-summary|id:{n}|title:{escaped}|author:{login}|ts:{ISO8601}|summary:{agent-generated}|areas:{comma-list}|additions:{n}|deletions:{n}|files:{n}|commits:{n}|branch:{head}|base:{base}|action:{merged|draft}
@pr-file|pr:{n}|file:{path}|action:{added|modified|deleted|renamed}|additions:{n}|deletions:{n}|change:{agent-generated}

2. prs/{n}.gdld — Sequence diagram of change flow

@diagram|id:PR-{n}|type:sequence|purpose:{one-line PR description}
@participant|id:{component}|label:{Component Name}|role:{role}
@msg|from:{src}|to:{tgt}|label:{what happened}

3. Mermaid comment on GitHub PR

After generating the GDLD, convert to Mermaid in /tmp, post to the PR, then discard. The .gdld is the source of truth — the Mermaid lives on the PR comment.

scripts/gdld2mermaid.sh prs/{n}.gdld --mmd -o /tmp/pr-{n}.diagram.md
{
  echo '## PR Change Flow'
  echo ''
  echo '```mermaid'
  cat /tmp/pr-{n}.mmd
  echo '```'
} | gh pr comment {n} --body-file -
rm -f /tmp/pr-{n}.diagram.md /tmp/pr-{n}.mmd

How To Read The PR

Step 1: Get PR metadata

gh pr view {n} --json number,title,author,body,mergedAt,createdAt,additions,deletions,changedFiles,commits,files,headRefName,baseRefName,state

Step 2: Determine diff tier

File count Strategy
<15 files Read full diff: gh pr diff {n}
15-40 files PR body + commit messages + top 10 file patches
40+ files PR body + commit messages + top 5 file patches

For medium/large PRs, get individual file patches:

gh pr diff {n} -- path/to/specific/file.ts

Read the full file on GitHub · 142 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 · 142 lines · 25 tokens per session scan A 9eca1463f1d5

Subscribe to this mod's changes

pr-summary is a command published in the GitHub repository greppable/greppable-cc-plugin (3 stars, last pushed 4mo ago), licensed MIT. It adds 25 tokens to every session and 1,318 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.