Purpose
PR Lens is designed to solve the problem of diffs being difficult to quickly understand during code review. It transforms code changes in a Pull Request (PR) into animated architecture diagrams and data flow diagrams, presented directly within the PR, allowing reviewers to first understand the overall shape and scope of impact of the changes before deciding whether to read the code line by line.
Main Capabilities
- Draws animated architecture and data flow diagrams within the PR to show what changed.
- Uses rich visual elements (depth, weight, glyphs, color) to carry meaning, rather than traditional black lines on a white background.
- Shows additions, modifications, and deletions in context, visually linking them so reviewers see first and read second.
- Not only shows the diff itself but also retains the parts untouched by the changes, helping build a model of the entire system.
- Provides animated data flow, showing how the system moves, helping connect nodes faster.
- One comment per PR, rewritten on every push, with the comment linking to the canvas.
- The canvas supports panning, zooming, theme selection, and can play or step through changes by pressing W.
- Rendering is deterministic based on a strongly typed schema, consisting only of lanes, nodes, and edges, with no drawing instructions.
- Adapts to diffs of different sizes: a single-file fix and a monorepo refactor receive the same treatment, showing only the changed parts grouped by their lane.
How to Use
- Install the GitHub App: select a repository once, and thereafter it will automatically draw when each PR is opened and redraw on every push.
- Or install the skill via the command line:
npx skills add coldteadotai/pr-lens, then give the prompt to an already open agent.
Use Cases
- Any team or individual that needs to review code, especially developers who want to quickly understand large or complex changes.
- Suitable for changes of various sizes, such as monorepo refactors and single-file fixes.
- Examples show well-known PRs redrawn by PR Lens, such as react/react#13968, nodejs/node#41749, kubernetes/kubernetes#14175, rust-lang/rust#31954.
Limitations
- The materials do not provide information such as pricing, specific supported languages or frameworks, compatibility requirements, performance data, or privacy policy.