pr-lens
What it does
This skill turns a code change or codebase into visual diagrams that show how the parts connect and how data moves. It is for developers who want to explain a pull request or a system to others.
When to use it
- ✓When you want a diagram that explains what a code change does.
- ✓When you want an architecture or data-flow picture of a system for a pull request.
- ✓When you ask your AI to visualize or explain how a codebase is structured.
Skill link
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/pr-lens/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Make an architecture diagram for this pull request so the reviewers can see how the data flows.”
5 new skills a week. 1 minute to read.
How it works
The skill has your AI write a JSON description of the lanes, nodes and edges, then runs the PR Lens command line tool to render animated SVG diagrams. It does not look for bugs.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
PR Lens Skill
PR Lens draws code as visually rich animated diagrams: diffs, architecture, data flows. You describe the diff or codebase as one JSON document (lanes, nodes, edges, ordered flows) and the CLI renders it as animated SVGs. There is no findings lens — PR Lens is a comprehension layer, not a review bot. There is no field for a bug, risk, or security note, and a document that invents one is rejected.
When to Use
- Asked to diagram, visualise, or explain a code change or a system.
- A pull request should carry an architecture or data-flow diagram.
- Keywords: PR Lens, diagram, architecture, data flow, visualise, pull request.
Prerequisites
- Node.js with
npx(the CLI runs vianpx @coldtea/pr-lens-cli@latest; no install step). gh(GitHub CLI) — optional, only for attaching diagrams to PRs.- Optional canvas publishing calls the third-party service prlens.dev (see step 4b).
How to Run
Run all commands with the terminal tool from the repository root.
Read the diff. When representing a code change:
git diff --find-renames <base>...<head>. The base is the merge base, not the tip of the base branch. If not expressing a diff, read the code to be visualised.Write the document to
.pr-lens/graph.json, followingreferences/graph-document.md.references/example.graph.jsonis a valid reference with three lanes, all four delta states, a hero edge, a seven-step flow, a nested drill-down tree and a six-step walkthrough. Read it before writing your first document — quicker than reading the reference.Validate, and fix.
npx @coldtea/pr-lens-cli@latest validate .pr-lens/graph.jsonFix every failure and run it again. Do not render an invalid document; do not "work around" a failure by deleting the element it names.
Render.
npx @coldtea/pr-lens-cli@latest render .pr-lens/graph.json --theme lightRender light by default unless the user requests another theme. The SVGs, the manifest and
drawn.graph.jsonland in.pr-lens/, which the CLI adds to the repository's .gitignore. Do not commit any of it — these files are rebuilt from the diff on demand. Each SVG is named after its view, theme and content hash;manifest.jsonlists them by lens and view.
4b. Canvas push — OPTIONAL, opt-in. Only when the user explicitly asks for a shareable link. This publishes .pr-lens/drawn.graph.json to the third-party service prlens.dev:
npx @coldtea/pr-lens-cli@latest canvas push
It prints three links. Give the user the view link (https://prlens.dev/c/{id}): the full-screen diagram, every view on one page, no login. The edit link (ending in #w=…) lets its holder overwrite the canvas — it is a secret: leave it out of the reply unless asked, never paste it anywhere public. The embed link serves the top view as an SVG for a README. Pushing the same file again updates the same canvas, so "rename that node" is: edit, validate, render, push — the link stays the same. If the push fails, say so and tell the user where the local SVGs are and which is the top view.
Attach to a PR, when there is one. Upstream documents
gh pr create/edit/comment --attach <path>, but--attacharrived in GitHub CLI 2.99 — checkgh --versionfirst (e.g. gh 2.97 does NOT have it). With gh ≥ 2.99: write the body with a Markdown image(an HTML<img>is left as written and the file appended at the bottom instead; alt text is the one-line caption a reader without images gets), then repeat--attach <path>per referenced diagram:gh pr create --title "…" --body-file .pr-lens/body.md --attach .pr-lens/overview-light-<hash>.svgWithout
--attach, use a commit-free path:- Upload the SVGs to a gist:
gh gist create .pr-lens/<view>.svg, then reference the raw gist URL in the PR body/comment, or - Publish via the canvas link (step 4b, with user consent) and link the view URL, or
- Note the local
.pr-lens/path in the PR body so reviewers can rebuild.
Once published somewhere durable, let the CLI compose the comment markdown:
npx @coldtea/pr-lens-cli@latest comment \ --graph .pr-lens/drawn.graph.json \ --manifest .pr-lens/manifest.json \ --asset-base-url <where you published the SVGs>--graphtakesdrawn.graph.json, not the document you wrote — the CLI refuses a document its manifest does not descr- Upload the SVGs to a gist:
FAQ
Does it find bugs or security issues?
No. The skill says PR Lens is a comprehension tool, with no field for bugs or risks.
Does it need an install?
The skill runs the tool through npx, so there is no separate install step, though Node.js is needed.
Can the diagrams go on a pull request?
Yes. The skill says the GitHub CLI can attach diagrams to a PR, although that step is optional.
Details
Original description by the author
Draw code changes as animated architecture/data-flow SVGs.
Popularity
- GitHub stars
- 260k
- Ranking position
- #573
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agent-merge-conflict-arbiter
260kSettles a git merge conflict between two agents' branches as a neutral third party, producing one merged result for the repo.
antigravity-cli
260kGuides you through installing, updating, and troubleshooting the Antigravity command line tool, including its plugins, sign-in, and sandbox.
blackbox
260kLets your agent hand a coding task to the Blackbox AI command line tool, which runs several AI models and picks the best result.
dynamic-workflow
260kTeaches your agent to run large batches of similar work as a saved script, so only verified results return to the main conversation.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.