explaingit

ashishkosana/review-lens

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

review-lens is an LLM code review tool that checks a git diff across four lenses, then adversarially re-verifies each finding to cut false positives.

Mindmap

mindmap
  root((review-lens))
    What it does
      Reviews git diffs
      Four review lenses
      Adversarial verification
      Ranked findings
    Tech stack
      Python
      Anthropic API
      GitHub Actions
    Use cases
      PR code review
      CI severity gating
      Precision evaluation
    Design
      Pure core functions
      Structured LLM output
      Human stays in loop

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Review a pull request's diff for correctness, security, performance, and missing tests before merging.

USE CASE 2

Run review-lens as a GitHub Action that comments on PRs and fails CI on severe findings.

USE CASE 3

Use the built-in evaluation harness to measure how much the verification pass improves precision.

What is it built with?

PythonAnthropic APIGitHub Actions

How does it compare?

ashishkosana/review-lens0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity3/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Demo mode needs no API key, real usage requires an Anthropic API key.

Permissive MIT license, free to use, modify, and distribute including commercially.

In plain English

review-lens is a code review tool that uses a large language model to review a git diff, but is built to avoid the common problem of an AI reviewer confidently flagging things that are not actually wrong. It reviews changed code through four separate lenses at once, correctness, security, performance, and test coverage, then runs a second adversarial pass that tries to disprove each finding before showing it to you. Only findings that survive that self-checking step get reported, which trades catching a few less obvious issues for far fewer false alarms. You can try it instantly without an API key using a built in demo mode, which shows example findings like a SQL injection caused by building a query with a raw string, or a missing check for a database row that does not exist. For real use on your own code, you set an Anthropic API key and point the tool at a diff, either your current uncommitted changes, a specific commit range, or a saved diff file. Results can be printed to the terminal, formatted as markdown for a pull request, or posted directly as a GitHub pull request comment through an included GitHub Action, which can also fail a check based on how severe the findings are. Internally the project is built around a small interface for talking to the language model, so most of the code, including diff parsing, ranking findings, and rendering output, is tested without needing an API key or network access at all. Only one small part of the code actually calls the Anthropic API. The tool also includes an evaluation harness with a labeled set of example diffs, some containing known bugs and some clean, used to measure precision and recall and prove that the verification pass genuinely reduces false positives rather than just sounding like it should. The README is clear that the pass or fail check the tool can produce is a convenience, not a security guarantee, since a language model reading untrusted diff text can in theory be talked out of flagging a real problem, so a human should always stay in the loop rather than merging purely because the check passed. The project is licensed under MIT.

Copy-paste prompts

Prompt 1
How do I run review-lens --demo to see example findings without an API key?
Prompt 2
Set up review-lens as a GitHub Action that fails CI on blocker-severity findings.
Prompt 3
Explain how review-lens's adversarial verification pass reduces false positive findings.
Prompt 4
How do I run review-lens's evaluation harness to measure precision and recall on the labeled dataset?

Frequently asked questions

What is review-lens?

review-lens is an LLM code review tool that checks a git diff across four lenses, then adversarially re-verifies each finding to cut false positives.

What language is review-lens written in?

Mainly Python. The stack also includes Python, Anthropic API, GitHub Actions.

What license does review-lens use?

Permissive MIT license, free to use, modify, and distribute including commercially.

How hard is review-lens to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is review-lens for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.