PR Lens — Animated Diagrams for Code Changes
Turns a diff or codebase into animated SVG architecture and data-flow diagrams and attaches them to your pull request.
Dev & CodingIntermediate★ 202⑂ 7AI score 9/10Last updated: Sep 3, 2026
What it does
- Reads the change with
git diff --find-renames <base>...<head>(merge base, not branch tip) and authors a graph document at.pr-lens/graph.jsonwith lanes, nodes, edges and ordered flows. - Validates via
npx @coldtea/pr-lens-cli validate, documenting the four failure codes that cause most rejections, then renders animated SVGs plus a manifest into.pr-lens/(auto-gitignored). - Shares diagram-only requests through
canvas push, handing back a login-freeprlens.dev/c/{id}view link while keeping the edit link private. - For pull requests, writes a Markdown-image body and uploads assets with
gh pr create/edit/comment --attach, with a fallbackcommentcommand using a published asset base URL. - Corrections go into a
.github/pr-lens.ymloverlay (rename, exclude, lane pinning) instead of hand-editing regenerated output.
Who it's for
- Tech leads who want reviewers to grasp intent before reading the diff
- Backend/platform engineers explaining refactors or shifting service boundaries
- New joiners mapping an unfamiliar codebase with C4-style views
Example uses
- "Diagram this branch and open a PR" → graph authored, validated, rendered, attached as the architecture view in the PR description.
- "Show me how the billing module flows" → code-only read, container + data-flow views, canvas link returned.
- "That node is in the wrong lane" → add a lane rule to
.github/pr-lens.yml, re-validate, re-render, same canvas link.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/coldteadotai/pr-lens/HEAD/skills/pr-lens/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/pr-lens folder from the GitHub repo coldteadotai/pr-lens into my ~/.claude/skills/coldteadotai-pr-lens/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/coldteadotai/pr-lens.git /tmp/pr-lens && mkdir -p ~/.claude/skills && cp -r /tmp/pr-lens/skills/pr-lens ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Confirm Node.js is installed (
node -v); the skill invokes the CLI throughnpx. - For PR attachments, check
gh --version— the--attachflag needs GitHub CLI 2.99 or newer. - Clone the repo:
git clone https://github.com/coldteadotai/pr-lens.git /tmp/pr-lens - Copy the skill:
mkdir -p ~/.claude/skills && cp -r /tmp/pr-lens/skills/pr-lens ~/.claude/skills/ - Verify
references/graph-document.md,references/config.mdandreferences/example.graph.jsoncame along. - Restart Claude Code and ask: "Use PR Lens to diagram this change."
- Optional: to let
analyzedraft the document for you, export a Gemini/OpenAI (or compatible/chat/completions) API key.
View source on GitHub ↗License: MIT