- Category
- Developer Tools
- Rank
- No. 966Tools index
- Pricing
- Freemium
- Type
- TOOL
- Use case
- Software Testing & Quality
- Interfaces
- GitHub App · CLI · Agent Skill / Plugin
- GitHub
- 2.3k stars
- Latest release
- v0.13.1
- Date
About
PR Lens automatically generates animated architecture and data-flow diagrams for each pull request and posts them as a comment inside the PR, letting reviewers understand how a change affects the system before reading the code itself. It is distributed as a GitHub App, GitHub Action, CLI, or a skill for coding agents.
What it does
PR Lens has a language model read the diff of a pull request and write a structured description of the parts it touches and the calls between them. A renderer then turns that description into light and dark animated pictures: lanes of cards colored green for new, amber for changed and red for removed, plus a step-by-step replay of how data moves. The result lands as a comment on the pull request, with folding sections that zoom into each part, and can be pushed to a hosted page for full-size viewing or for a coding agent to answer questions on.
Why it's ranked here
The engineering choices are specific and written down. Model output is checked against a strict schema and gets exactly one correction round. Commit hashes, line counts and the pull request number come from git and overwrite whatever the model claimed. Every provider is called at temperature zero so the same diff tends to draw the same picture, and the pictures carry no script. It is MIT licensed, runs on your own model key with no PR Lens server in the analysis path, and reaches GitHub, GitLab and Bitbucket. The open question is how accurate the diagrams are, which depends on the model you bring.
What's good
Key handling is careful. The model key is read only from the environment, never a flag, so it stays out of shell history and CI logs, and the GitHub Action passes it the same way. Sign-in files are written owner-only. The local file holding hosted-page write tokens is refused outright if git would commit it. The Action only ever edits a comment posted by one named account, so nobody can plant its marker on their own comment and have it rewritten. Provider support is three request shapes rather than a vendor list, so Ollama, DeepSeek or OpenRouter work by pointing at a URL, with no new release needed.
Tradeoffs
A diagram is only as true as the model that drew it: the schema check proves the document is well formed, not that the architecture it shows is right, and there is a single repair attempt before the run fails. The GitHub Action commits rendered pictures to a separate data branch in your repository and needs a full-history checkout. The agent skill runs whatever CLI is newest at call time rather than a pinned version. The hosted GitHub App and shared canvases are governed by a policy on the project site, not by code in the files examined, and the README says free for open source without stating private-repository terms.
How to use it well
Fits teams that review sizeable changes across several services and want reviewers oriented before reading code, or anyone onboarding into an unfamiliar codebase with a coding agent. Start with the CLI on a dry run to see what would be sent, then wire the Action with a pinned version and a model you trust on code. Treat the picture as a map to check against the diff, not a substitute for reading it. Keep shared canvas edit links private, since they carry write access, and rotate the token if one leaks. It does not lint, test or judge the change; it only draws it.
Technical notes+
packages/cli/src/cli.ts dispatches eight commands (analyze, render, comment, validate, export, canvas, auth, skill) with exit codes 0/1/2. packages/cli/src/extract.ts sets MAX_ATTEMPTS = 2, tolerates fenced or prose-prefixed JSON via readJsonObject, and applyKnownFields stamps schemaVersion, provenance, lenses and stats over model output before safeParseGraphDoc from packages/schema/src/index.ts. packages/cli/src/providers/index.ts defines gemini (default model gemini-3.7-flash), openai (sends max_completion_tokens) and openai-compatible (sends max_tokens, requires --base-url and --model); resolveProvider throws MISSING_API_KEY rather than accept a key argument. packages/cli/src/auth.ts writes credentials 0600 in a 0700 directory and validates the prl_u_ token shape. packages/action/action.yml is a composite action pinning cli-version, gating comment edits on comment-author, and failing early without fetch-depth: 0. packages/renderer/src/index.ts exports contentHash and buildManifest, which the CLI README says bind a manifest to its document so mismatched pairs are refused.
Observed
- License
- MIT (LICENSE, Coldtea AI)
- Language
- TypeScript pnpm monorepo: CLI, schema and renderer packages
- Runtime
- Node.js 20.11 or later, per package.json engines
- Interfaces
- CLI on npm, composite GitHub Action, coding-agent skill, hosted GitHub App
- Model providers
- Gemini by default, OpenAI, or any OpenAI-compatible endpoint, with your own key from the environment
- Forge support
- GitHub, GitLab CI/CD component and Bitbucket pipe, per README
- Output
- Self-contained light and dark SVGs with no script or external references
- Test runner
- Vitest declared in package.json
Read from README.md, package.json, packages/cli/package.json, packages/cli/README.md, packages/cli/src/cli.ts, packages/cli/src/extract.ts, packages/cli/src/providers/index.ts, packages/cli/src/auth.ts, packages/schema/src/index.ts, packages/renderer/src/index.ts, packages/action/action.yml, PRIVACY.md, SECURITY.md, skills/pr-lens/SKILL.md, LICENSE.
Tags
Tech Stack
Media
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.