🚀 Maximize your product's SEO. Submit to 240+ directories in 1-click with DirSubmit. Launch Now
PR Lens by Coldtea.ai logo

PR Lens by Coldtea.ai

See code through a new lens

2026-09-07

Product Introduction

  1. Definition: PR Lens by Coldtea.ai is an open-source, AI-powered code visualization and analysis tool. Technically, it is a deterministic diagram renderer that generates animated architecture and data flow diagrams directly from a structured schema of a codebase or a specific code change (like a Git diff). It operates as a GitHub App, a GitHub Action, a CLI tool, and a skill for AI coding agents.
  2. Core Value Proposition: PR Lens exists to drastically reduce the cognitive load of code review, especially for AI-generated pull requests and large-scale refactors. Its primary value is enabling developers to review the shape and architecture of a change visually before reading a single line of code, transforming a wall of textual diffs into an intuitive, animated diagram.

Main Features

  1. Animated Architecture & Data Flow Diagrams: PR Lens automatically generates two primary diagram types ("lenses") from code changes. The Architecture Lens visualizes components (like services, APIs, data stores) and their relationships. The Data Flow Lens animates the sequence and movement of data between these components. Motion is achieved using SVG's <animateMotion> element, allowing animations to work even in environments like GitHub comments where JavaScript is stripped.
  2. Deterministic, Schema-Driven Rendering: The core of PR Lens is a pure function that renders diagrams from a strongly typed JSON schema. This schema describes lanes (e.g., "API", "Services"), nodes (components), and edges (relationships), along with their change states (new, modified, removed). The renderer has zero dependencies, uses an embedded text measurement table (not system fonts), and produces identical SVG output anywhere, ensuring consistency from local development to CI/CD pipelines.
  3. Multi-Platform Integration: The visualization engine is delivered through multiple interfaces. The GitHub App installs on repositories and automatically posts/updates a comment with diagrams on every pull request push. The GitHub Action allows custom, API-key-driven execution within CI workflows. The CLI tool and AI Agent Skill (npx skills add coldteadotai/pr-lens) enable local analysis and integration with AI coding assistants like Cursor or Windsurf, using the model already configured in the agent.

Problems Solved

  1. Pain Point: The overwhelming cognitive load of parsing large, complex, or AI-generated pull requests. Traditional line-by-line diff review is inefficient for understanding architectural impact, data flow changes, and refactoring scope across dozens of files.
  2. Target Audience: The primary users are Engineering Leads, Senior Developers, and DevOps Engineers responsible for reviewing and merging critical code changes. It is also invaluable for Open Source Maintainers reviewing community contributions and Developers working with AI pair-programmers to quickly validate the structural correctness of AI-suggested changes.
  3. Use Cases: Essential for reviewing: a major monorepo refactor impacting 30+ components; an AI-generated feature PR adding a new service and queue; a performance optimization that changes a data flow pattern (e.g., moving from per-item to batch processing); and onboarding, where a new team member needs to understand system architecture through recent changes.

Unique Advantages

  1. Differentiation: Unlike static diagramming tools (Mermaid, Draw.io) or architecture discovery tools, PR Lens is change-centric and integrated directly into the developer workflow. It is not a general-purpose diagrammer but a specialized renderer optimized for visualizing diffs. Unlike other PR summary bots, it provides rich, animated visual context, not just textual summaries.
  2. Key Innovation: Its "lens" concept—a deterministic, themable visual filter for code structure—is the core innovation. The separation of the schema (what changed) from the renderer (how to draw it) allows for consistent, embeddable, and scriptable visualizations. The use of native SVG animations ensures portability and security, making it the first tool to deliver animated architectural insights within a GitHub PR comment.

Frequently Asked Questions (FAQ)

  1. How does PR Lens handle private code or intellectual property? When using the official GitHub App, analysis runs on Coldtea.ai's secure infrastructure using Gemini AI, and no code is permanently stored. For maximum control, you can run the open-source GitHub Action or CLI with your own API key (OpenAI, Gemini, or compatible endpoint), keeping all code and analysis within your private environment.
  2. Is PR Lens only for GitHub and pull requests? While its primary integration is with GitHub PRs, the core technology is agnostic. The schema and renderer can be used to visualize any code structure from local directories, CI pipelines, or documentation. The open-source renderer (@coldtea/pr-lens-renderer) can be embedded in blogs or internal tools to generate diagrams from any code snapshot.
  3. What programming languages and frameworks does PR Lens support? PR Lens works by analyzing the structure and dependencies within a codebase, typically inferred from file paths, imports, and configuration files. It is most effective with modern, structured applications (e.g., Node.js/TypeScript, Python, Go monorepos) but does not rely on language-specific parsers. Its effectiveness scales with the clarity of the project's architectural boundaries.
  4. How does PR Lens compare to traditional CI/CD status checks? PR Lens is a complementary tool, not a replacement. CI checks answer "does the code work?" (tests, builds). PR Lens answers "what did the code change?" at an architectural level. It provides qualitative context about the change's shape and impact, which is crucial for human review and architectural governance.
  5. Is PR Lens truly free for open-source projects? Yes. The GitHub App is free for public repositories. The entire codebase, including the renderer and action, is open-source under the permissive MIT license, allowing unlimited use, modification, and distribution for any project.

Submit to 240+ Directories with 1-Click

Maximize your product's SEO and drive massive traffic by automatically submitting it to over 240 curated startup directories using DirSubmit.

Related Products

Subscribe to Our Newsletter

Get weekly curated tool recommendations and stay updated with the latest product news