Agent skill · nousresearch
pr-lens
Draw code changes as animated architecture/data-flow SVGs.
What it needs
About 6k tokens when loaded.
What this skill does
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 via npx @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. 1. 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. 2. Write the document to .pr-lens/graph.json, following references/graph-document.md. references/example.graph.json is 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. 3. Validate, and fix. Fix every failure and run it again. Do not render an invalid document; do not "work around" a failure by deleting the element it names. 4. Render. Render light by default unless the user requests another theme. The SVGs, the manifest and drawn.graph.json land 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. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills nousresearch/pr-lens