pr-lens — Claude Code skill: architecture diagrams, how to install
Draws code changes or parts of a codebase as animated architecture and data-flow diagrams — standalone or in a pull request.
npx skills add coldteadotai/pr-lens --skill pr-lens -a claude-codeWhat pr-lens does
The agent writes one JSON document; pr-lens renders it into a self-contained animated SVG that GitHub displays in comments with no scripts. The diagram opens as a live canvas: you can step through the architecture and ask questions. The validate command names the exact wrong field, so the agent fixes its own document.
Run via npx @coldtea/pr-lens-cli@latest <command> — nothing to install first. The skill file is a discovery stub; the actual workflow loads from the CLI with npx @coldtea/pr-lens-cli@latest skill, so instructions always match the installed version.
Works with any coding agent (Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Copilot). No model key needed when the agent writes the document itself.
What it helps with
- visualise architecture of a code change
- add a diagram to a pull request comment
- explain data flow through the system
- validate a diagram JSON before rendering
Example prompts for the agent
- Draw an architecture diagram for the changes in this PR
- Show the data flow through
authandsessions - Visualise how the new payment module works
How to install pr-lens
1Skills CLI (Vercel)
npx skills add coldteadotai/pr-lens --skill pr-lens -a claude-code2Manually: put the files in place
~/.claude/skills/pr-lens/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pr-lens/
1Skills CLI (Vercel)
npx skills add coldteadotai/pr-lens --skill pr-lens -a codex2Manually: put the files in place
.agents/skills/pr-lens/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add coldteadotai/pr-lens --skill pr-lens -a cursor2Manually: put the files in place
.cursor/skills/pr-lens/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install coldteadotai/pr-lens pr-lens2Manually: put the files in place
.github/skills/pr-lens/SKILL.md1Skills CLI (Vercel)
npx skills add coldteadotai/pr-lens --skill pr-lens -a gemini-cli2Platform CLI
gemini skills install https://github.com/coldteadotai/pr-lens --path skills/pr-lensManually: put the files in place
.devin/skills/pr-lens/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add coldteadotai/pr-lens --skill pr-lens -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about pr-lens
How to install pr-lens in Claude Code?
Run npx skills add coldteadotai/pr-lens --skill pr-lens -a claude-code. The file will appear at ~/.claude/skills/pr-lens/SKILL.md.
What does pr-lens do?
It draws code changes or parts of a codebase as animated architecture and data-flow diagrams. The agent writes a JSON document, pr-lens renders it as an SVG that GitHub displays in comments.
Does pr-lens require an API key?
No. When the agent writes the diagram JSON document itself, no model key is needed.
Source text
SKILL.md · MIT
--- name: pr-lens description: "WHAT: Draws a code change or part of a codebase as an animated architecture or data-flow diagram, on its own or in a pull request. WHEN: asked to diagram, visualise or explain a change or a system, or when a pull request should carry a diagram. KEYWORDS: PR Lens, diagram, architecture, data flow, visualise, visualize, pull request" --- # PR Lens Animated architecture and data-flow diagrams for code changes and codebases. The agent writes one JSON document, and PR Lens draws it. Run: `npx @coldtea/pr-lens-cli@latest <command>`. Nothing to install first. ## Start here This file is a discovery stub, not the usage guide. Before running any PR Lens command, load the actual workflow content from the CLI: ```bash npx @coldtea/pr-lens-cli@latest skill # start here: write, validate, render, share npx @coldtea/pr-lens-cli@latest skill references # the graph document field by field, the config format, a full example ``` The CLI serves skill content that always matches the installed version, so instructions never go stale. The content in this stub cannot change between releases, which is why it just points at `skill`. ## Why PR Lens - Works with any coding agent (Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Copilot) - Draws one self-contained animated SVG that GitHub shows in a comment, with no scripts - `validate` names the exact field that is wrong, so the agent can fix its own document - Opens as a live canvas you can step through and ask questions on - Needs no model key when the agent writes the document itself
© coldteadotai · MIT · coldteadotai/pr-lens