PR Lens

Review code 100X faster

PR lens draws animated architecture and data flow diagrams, inside the pull request, so you can see the change before you read a single line

Install the app

Not Mermaid.

A custom renderer built for humans. With zero cognitive overload

  1. See code through a new lens

    See what truly matters before you read any line of code. Software is changing. The way we read it is as well

  2. Rich visuals

    Depth, weight, glyph and colour carry meaning. Not dark lines on white boxes.

  3. Additions, changes and deletions in context

    What is new, what was touched and what was taken out, visually linked. You see it before you read it.

  4. The whole system, not just the diff

    A pull request touches one part and moves several. The parts it did not touch stay on the page, so you build a model of the system rather than a patch

  5. Animated data flow

    See how the system moves and connect the dots faster.Animation is usually a distraction. Here it is intentional

It arrives where you already are

One comment on the pull request, rewritten on every push

One document. Every lens.

A deterministic render from a strongly typed schema

{
  "kind": "graph",
  "lenses": [
    "architecture",
    "data-flow"
  ],
  "lanes": [
    { "id": "api", "label": "API" }
  ],
  "nodes": [
    {
      "id": "health-route",
      "label": "GET /health",
      "kind": "route",
      "delta": "modified",
      "lane": "api"
    }
  ]
}

Lanes, nodes and edges, each carrying what the change did to it. Nothing in here says how to draw anything.

Architecture
Data flow
Drill-down

It scales with the diff

A one file fix and a monorepo refactor get the same treatment. Only what changed, grouped into the lanes it changed in.

A single endpoint changed. The render says so and stops.

Drawn from real pull requests

Famous PRs redrawn with PR Lens

react/react#13968

Implement the experimental Hooks proposal behind a feature flag

nodejs/node#41749

lib: add fetch

kubernetes/kubernetes#14175

Add Basic Ingress resource type for L7 Loadbalancing - Init Version

rust-lang/rust#31954

implement the `?` operator

See every one in the Hall of Fame

Powered by Lens

A new kind of render. A pure function from a schema-checked document to an SVG, optimised for one thing; being understood at a glance.

import { render } from "@coldtea/pr-lens-renderer";

const { svg } = render(doc, { lens: "architecture", theme: "dark" });
Zero dependencies
The schema it validates against, and nothing else. No layout engine, no browser, no runtime of its own
Deterministic
Text is measured against an embedded table rather than a font engine, so a CI runner with no fonts installed draws the same bytes as your laptop
No JavaScript in the output
Motion is animateMotion in the markup. That is why a diagram still moves inside a GitHub comment, where scripts are stripped
Not only pull requests
If it is code, it can be drawn. Use it in a blog post, a documentation site, or a local tool. The schema is the same, and the renderer is the same
Read the renderer

Turn it on

Install the App and every pull request in the repositories you pick gets drawn. Or hand the prompt to the agent you already have open.

Install the GitHub App

Pick the repositories once. Every pull request opened in them is drawn and redrawn on each push, with no key of yours anywhere in it.

Add to GitHub
Free for open source
Set up PR Lens (prlens.dev) for me. It draws each pull request as animated architecture and data-flow diagrams, inside the pull request itself.

1. Install the agent skill: `npx skills add coldteadotai/pr-lens`. It reasons with whatever model my coding agent already runs, so there is no key for me to set up.

2. Walk me through installing the GitHub App at https://github.com/apps/coldtea-pr-lens on every repository where I review pull requests. It posts one sticky comment per pull request and updates it on every push. The App runs on Gemini today, with no model key of mine involved.

3. If I'd rather run it from CI on a key of my own, offer the Action instead: `.github/workflows/pr-lens.yml` using `coldteadotai/pr-lens/packages/action@v0` with a `GEMINI_API_KEY` repository secret. The Action asks Gemini by default and also speaks OpenAI or any compatible endpoint, on whichever key I supply.

4. Then prove it: diagram the most recent change in this repository and show me the rendered SVGs.
or