pr-visualize

pr-visualize is a skill for Claude Code from yasunori0418/skills. It costs 156 tokens per session (3,770 once invoked), scanned A, original, MIT.

A tool for turning a GitHub pull request into Mermaid diagrams and a short Markdown explanation. Mermaid is a text format for diagrams, and the output shows how changed code and documents connect and behave.

In plain words
What is it for?
Use it for a GitHub pull request, including stacked pull requests, when you want an overview or sequence diagrams written to a Markdown file. It can optionally post the explanation as a pull-request comment with approval.
Why use it?
A normal code diff shows added and removed lines but may not show how data moves through the system. These diagrams help readers understand the change and its effect on callers without reviewing every line first.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Part of the github-skills plugin — 5 skills shipped together

Good fit Use it for a GitHub pull request, including stacked pull requests, when you want an overview or sequence diagrams written to a Markdown file. It can optionally post the explanation as a pull-request comment with approval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yasunori0418/skills/pr-visualize
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.

Any agent
npx skills add yasunori0418/skills --skill pr-visualize
Clone the repo
git clone --depth 1 https://github.com/yasunori0418/skills

Made for: Claude Code.

Or install github-skills, the plugin that ships this one along with the rest of its 5 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yasunori0418/skills/pr-visualize"><img src="https://agentmods.dev/badge/skills/yasunori0418/skills/pr-visualize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 156 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,770 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.00156 $0.03770
Opus 5.5 $0.00062 $0.01508
Sonnet 5.5 $0.00031 $0.00754
Haiku 4.5 $0.00016 $0.00377

Measured 29d ago against content hash 28ba6d67c5e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pr-visualize 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 29d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/pr-visualize.sh, scripts/tests/pr-visualize.test.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/github/pr-visualize/SKILL.md · 209 lines

How it starts

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

pr-visualize — PR の変更を図で解説する

差分は行の増減しか見せない。読み手が知りたいのは「どんなデータが入り、何をして、何が出るか」と 「それが呼び出し元の挙動をどう変えるか」。このスキルは PR を読み、その 2 点をシーケンス図にして、 図から読み取れないことだけを短い文章で補う。

  • 図の描き方: references/mermaid.md
  • 解説の構成と文章の規則: references/writing.md

<skill-dir> はこのファイルのあるディレクトリ。収集・検証・投稿は scripts/pr-visualize.sh に任せ、 gh や git を手で並べ直さない。

引数

$ARGUMENTS から次を読み取る。

  • PR の指定: URL、#N、pr:N。省略時は現在ブランチの PR。以下 <PR> と書く。
  • --comment: 解説を PR コメントへ投稿する(手順 8)。

PR になっていないローカルの差分は対象外。その場合は diff-review を案内して終える。

出力先

解説と中間ファイルは一時的な成果物。置き場所は次の順で決める。以下 <out-dir> と書く。

  1. tmp-output スキルがあれば、その手順で決める。
  2. 無ければ、ユーザーやプロジェクトが決めている運用に従う。
  3. それも無ければ、使っているコーディングエージェントの一時出力の慣例に従う。

ファイル名は次のとおり。再実行時は上書きする。

  • pr-<番号>-visualize.md: 解説
  • pr-<番号>-visualize.diff: 退避した差分
  • pr-<番号>-visualize.comment.md: 投稿用の本文(--comment のときだけ)

手順

1. PR を把握する

bash <skill-dir>/scripts/pr-visualize.sh preflight "<PR>"

タイトル・本文・コミットメッセージ(見出しだけ。本文も要るなら --full)・変更ファイルの統計が出る。 次の 3 つを控える。

  • MODE: full は PR のリポジトリが作業ディレクトリの remote と一致した状態。degraded は一致しない状態で、 差分の外のコードを読めない。degraded では手順 3 と参照箇所起点の図を省き、--comment は実行しない。

  • TOOLS: mmdc が無いと図を構文検証できない。その場合は解説に「未検証」と書く。

  • STACK: size が 2 以上なら stacked PR。次のコマンドで、各段の変更ファイルとスタックの図を取る。 検出できるのは GitHub のスタック機能に登録された PR だけ。それ以外は単独の PR として扱う。

    bash <skill-dir>/scripts/pr-visualize.sh stack "<PR>"
    

    スタックでも、図にするのは現在の PR の変更だけ。差分(手順 2)と変更前の状態(手順 3)は、 1 つ下の段までを含んだ状態が基準になる。

ERROR: が出たら(未認証、PR が見つからないなど)、先にそれを解決する。

2. 差分を退避する

bash <skill-dir>/scripts/pr-visualize.sh diff "<PR>" --out <out-dir>/pr-<番号>-visualize.diff

差分は標準出力に流さずファイルへ置く。大きな差分を会話に抱えると、後の読解と執筆の精度が落ちるため。 lockfile と、縮小済みの js・css の差分は自動で除かれる(統計は手順 1 の FILES に残る)。

3. head を取得する(full のみ)

bash <skill-dir>/scripts/pr-visualize.sh fetch "<PR>"

作業ツリー・ブランチ・ref は変えない。出力の head_sha(変更後)と base_sha(変更前)を使い、 HOW TO READ に出るコマンドで差分の外のコードを読む。ブランチを切り替えて読むことはしない。

4. 図にする変更を選ぶ

FILES の統計で当たりを付け、差分は必要な範囲だけ読む。full ならファイル単位の git diff <base_sha> <head_sha> -- <path> が使える。

Read the full file on GitHub · 209 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 29d ago First seen · 209 lines · 156 tokens per session scan A 28ba6d67c5e6

Subscribe to this mod's changes

pr-visualize is a skill published in the GitHub repository yasunori0418/skills (9 stars, last pushed yesterday), licensed MIT. It adds 156 tokens to every session and 3,770 once invoked, about $0.0006 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-10-01.

Related

Other skills, from other repositories

pr

Draft a PR body from OMC's paper trail — the smallest visual that proves the change, evidence consumed from the verify protocol (never re-collected), reversibility from the ADR test on the diff, glossary language throughout.

Yeachan-Heo/oh-my-claudecode · 47 tokens

merge-batch

Prepare and merge an owner-selected PR batch with contributor credit and exact-candidate admission. Use for a pasted PR list; combined focused validation is diagnostic, and every actual landing still requires its applicable checks and authorization.

diegosouzapw/OmniRoute · 46 tokens

otto-pr-review-loop

Run Polly and OCR on a PR until all findings settle.

omnigent-ai/omnigent · 17 tokens

engram-branch-pr

PR creation workflow for Engram following the issue-first enforcement system. Trigger: When creating a pull request, opening a PR, or preparing changes for review.

Gentleman-Programming/engram · 37 tokens

github-contributor

A step-by-step guide for contributing code, tests, documentation, or build changes to open-source projects you do not maintain. It explains how to prepare a pull request that follows the project’s rules and is easier for maintainers to review.

daymade/claude-code-skills · 105 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in agterm/tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 248 tokens