Review code 100X faster

PR Lens draws animated architecture and data flow diagrams, inside the pull request, so you can understand the change and catch what could break before you read a single line. Open it on a live canvas to walk through it, or click any part to see its code

Code review for human understanding

What a human reviewer needs to know to judge a change, even when an agent wrote it

What changed?

See which parts of your app were added, changed or removed, at a glance

What else does it touch?

See the other parts of your app that depend on this change, even the ones the diff never touches

How does a request move now?

Follow a request step by step, and see the data it carries at each step

The request the POST /email/batch arrow carries, open in a panel beside the diagram

What could break?

Get warned about bugs, security holes and design problems in the same comment. Autofix any of them, or hand them to your coding agent

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. Additions, changes and deletions in context

    Understand the change in context of your system architecture. What changed, what's removed, and what new components are introduced

  3. 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

  4. Animated data flow

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

  5. Understand relevant data schemas

    Follow the data as it moves through your app. Click any arrow to see the request and response it carries, and what the change did to them

  6. Drill down to code when it matters

    Go from the picture to the code in one click. The diff opens right beside the diagram, so you never lose your place

  7. Comment right where you are

    Comment on any line while the problem is in front of you. It lands on the pull request in GitHub, under your own account

  8. Ask your agent, and watch it show you

    Every canvas is live. Connect your agent to drill even deeper when needed

It arrives where you already are

One comment on the pull request, rewritten on every push

Works where your code lives

Install the App on GitHub, or connect GitLab or Bitbucket. Your next pull request gets the comment

A guided tour of every change

Open the link on any pull request and PR Lens walks you through the change, one step at a time, zooming in on the part that matters at each step

Try it on a real pull request

Catch what could break

The review marks each problem on the diagram, so you can see what it could break

Ranked by risk
Each finding says how serious it is, so you fix what matters first
Shown on the diagram
You see which part of your app it's in, and what that part talks to
Fixed in one click
Autofix it, or hand it to your coding agent with the prompt already written

One document. Every lens.

Every view is drawn from one typed document, so the same change always gives the same picture

graph.jsonschema 0.7
{
  "kind": "graph",
  "lenses": [
    "architecture",
    "data-flow"
  ],
  "lanes": [{
    "id": "api",
    "label": "API"
  }],
  "nodes": [{
    "id": "signup-route",
    "label": "POST /signup",
    "lane": "api",
    "delta": "modified"
  }],
  "edges": [{
    "from": "signup-route",
    "to": "welcome-service",
    "kind": "event",
    "delta": "added"
  }]
}

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

ArchitectureWhat the change added, changed and removed, lane by lane
Data flowThe calls a request makes, in the order it makes them
Drill-downOne part of the change, opened up on its own

It scales with the diff

Small fix or big refactor, you only see what changed and where it lives in your app

One thing changed, so you see one box. You can still click it to dig into the code

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 renderer. 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
It only needs the schema it checks against. There is nothing else to install
Deterministic
The same input always gives the same picture. A CI server with no fonts installed draws exactly what your laptop draws
No JavaScript in the output
The animation lives inside the SVG itself. That is why a diagram still moves in a GitHub comment, where scripts are blocked
Not only pull requests
Anything that is code can be drawn. Use it in a blog post, in your docs, or in a tool on your own machine

No matter how smart machines get, the future is still human.

We're building for a world where you stay in charge of your software, and understand it well enough to guide the AI agents that write it.

Ohans E.CEO, Coldtea

Turn it on

Add PR Lens to GitHub, GitLab or Bitbucket, and every new pull request is explained and reviewed. Or paste the prompt into the coding agent you already use

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.

Free for open source
Set up PR Lens (prlens.dev) for me. PR Lens reviews each pull request and explains it with animated diagrams that show how the code fits together and how data moves through it.

1. Install the agent skill: `npx skills add coldteadotai/pr-lens`. It uses whatever model my coding agent already runs, so I don't need to set up a key.

2. Connect PR Lens to the repositories where I review pull requests. If my code is on GitHub, help me install the App at https://github.com/apps/coldtea-pr-lens. If it's on GitLab, send me to https://prlens.dev/gitlab. If it's on Bitbucket, send me to https://prlens.dev/bitbucket. On all three, PR Lens then posts one comment on each pull request, with the diagrams and a code review that flags bugs and security problems, and updates it every time I push. It runs on its own key, so I don't need one.

3. If I'm on GitHub and would rather run it in CI with my own key, offer the GitHub Action instead. Add `.github/workflows/pr-lens.yml` using `coldteadotai/pr-lens/packages/action@v0`, with my key saved as a repository secret called `GEMINI_API_KEY`. The Action uses Gemini by default, but it also works with OpenAI or any compatible endpoint. Tell me the Action draws the diagrams but does not include the code review, which only comes with step 2.

4. If I want to skip step 2, first tell me what I'd miss. With only the skill, I don't get the code review. A pull request is drawn only when I ask you, and the drawing doesn't update when I push. I also won't get the pull request's page on prlens.dev, where I can take a guided tour of the change, click any part to see its code, use agent mode, and comment on the pull request.

5. Finally, show me it works: draw the latest change in this repository and show me the diagrams.
or