pr-lens-diagrams
Installation
SKILL.md
PR Lens diagrams
Russian version: references/README.ru.md.
PR Lens (MIT, https://prlens.dev) renders a JSON graph document into a self-contained animated SVG (SMIL <animateMotion>, no scripts). A model key is only needed for analyze (graph from a git diff); for an arbitrary diagram the agent writes the JSON itself.
Quick start
# deps: Node >= 20.11, npm, ffmpeg; Chromium is installed by the setup script
bash scripts/pr-lens-setup.sh # into $PR_LENS_HOME (default ~/.cache/pr-lens-diagrams)
bash scripts/pr-lens-build.sh my.graph.json out/ # → out/architecture.{svg,gif,mp4}, out/data-flow.{svg,gif,mp4}
- Start from
examples/bots.graph.json(4 lanes, 12 nodes, 12 edges, 1 flow). - The build validates, renders (
darkby default;lightorbothas the 3rd arg), records frames with Playwright atdeviceScaleFactor: 2, and encodes a non-dithered GIF and an MP4 (crf 18). - Env:
PR_LENS_HOME,FPS(20),MIN_WIDTH(1600),PR_LENS_CLI_VERSION,PLAYWRIGHT_VERSION. npx skills add coldteadotai/pr-lenscrashes on Node 20 (fs/promiseshas noglob); not required. Version-matched docs:npx pr-lens skill/npx pr-lens skill referencesinside$PR_LENS_HOME.- Never publish without explicit user consent:
pr-lens canvas pushputs the diagram on prlens.dev behind a view link anyone holding it can open.