In short: I built ReviewReplay, an open-source tool that replays bugs your team already fixed to an AI code reviewer and grades every finding. On 12 real Python bugs, a review skill made Claude Code's serious findings more precise (72% to 82%). On 9 JavaScript, TypeScript and Go bugs it went the other way (91% to 79%). Four of the 21 bugs were missed in every run. Everything is committed, so you can check each number.
The question
Teams are adopting AI code review on faith. Public benchmarks use shared, public pull requests, and those may already be in the model's training data. A team wants to know something narrower: on bugs from our own codebase, which reviewer should we use, did our new review prompt or skill help, and what does it cost in dollars and false alarms?
Every bug-fix commit in your history points at a bug that once shipped, so your git history is already an answer key.
The pipeline
- Mine: for each fix commit, find the commit that introduced the bug. ReviewReplay uses two signals: the commit or pull request the fix message names, and
git blameon the lines the fix rewrites (the SZZ method). When both agree, that's the strongest evidence. - Draft an answer key: a model reads the fix and the buggy diff and writes down what the bug is, where and why. A person confirms each case by reading the upstream fix.
- Replay: the project is exported at the parent commit with no
.git, so the reviewer can't find the later fix, and the buggy change is applied as uncommitted edits. - Review: each reviewer runs read-only, three times per bug. Claude Code runs with an allow-list (
Read,Grep,Glob,git diff/log/show/status). - Grade each finding, then report recall, precision, false alarms and cost with 95% bootstrap intervals, paired by bug.
pip install git+https://github.com/GgauravJ05/reviewreplay cd your-repo reviewreplay doctor # git, claude, Python and the cache folder; spends nothing reviewreplay init --dry-run # which fixed bugs it would use; spends nothing reviewreplay init # mine your fixed bugs into draft cases reviewreplay run --cases .reviewreplay/cases --out .reviewreplay/results --include-drafts --dry-run The last line prints the number of reviews, the cost and the time before anything runs. A stopped run picks up where it left off.
Reviewers are JSON files
A reviewer is called a subject. This is the one I tested, Claude Code with code-review-skill pinned to a commit:
{ "name": "code-review-skill-invoked", "skill": {"name": "code-review-skill", "repo": "https://github.com/awesome-skills/code-review-skill", "commit": "4850184"}, "invoke": true, "credit": "awesome-skills/code-review-skill (MIT). Invoked explicitly with /code-review-skill." } Any other CLI reviewer is a command that prints a review. It runs read-only in a throwaway copy:
{ "name": "codex", "command": ["codex", "exec", "--sandbox", "read-only", "{prompt}"] } There are examples for Codex CLI, Gemini CLI and Claude Code's /code-review in reviewreplay/subjects/examples/.
Grading free text
This was the hard part. My first grader was one LLM judge, and it gave the same finding two different labels on two runs. Now each review is split into findings, and each finding goes through these steps:
- A location gate. A finding has to land within 3 lines of the known bug to count as finding it. Up to 15 lines away it still goes to the judges.
- Four votes, from Claude Sonnet three times and Claude Opus once. The majority label wins (same bug, another real problem, false alarm or unsure). With no majority the finding is contested, and
compare --drop-contestedreruns the numbers without those findings. - A code check for serious
unsureclaims.reviewreplay verifygives a read-only checker the project, the change and, when a claim is about a library, that library's source from PyPI as of the change date. The checker must quote the lines that decide the claim. A script checks that every quote exists in those files, and a verdict without a real quote stays unsure.
On the Python bugs, 30 claims went to the code check: 15 were confirmed as real problems, 13 were refuted, 2 stayed unsure. One example: five reviews claimed py7zr treats an empty list as "no filter". With py7zr 1.1.0's source, the checker refuted all five, because only targets is None turns the filter off.
Sonnet's majority and Opus agree on 81% of findings on the Python bugs (Cohen's κ 0.74) and 83% on the JS/TS/Go bugs (κ 0.77). That's two models agreeing with each other. No person has labelled a grading sample yet, and that is the next thing the grading needs.
Results
Claude Code (claude-sonnet-5-5) alone against the same model with code-review-skill, three runs per bug each. Planted bugs were too easy (both found almost all of them), so these are real bugs in full repositories.
| 12 Python bugs, 36 reviews each | Alone | With the skill |
|---|---|---|
| Found the bug | 26 / 36 | 27 / 36 |
| Precision of serious findings | 72% | 82% (paired +10 pts [+1, +16]) |
| Serious false alarms | 13 | 10 |
| Mean cost per review | $0.065 | $0.097 |
Projects: click, werkzeug, attrs, rich, jsonschema, black, Hugging Face datasets, accelerate, peft.
| 9 JS, TS and Go bugs, 27 reviews each | Alone | With the skill |
|---|---|---|
| Found the bug | 21 / 27 | 18 / 27 |
| Precision of serious findings | 91% | 79% (paired −13 pts [−19, +2]) |
| Serious false alarms | 5 | 10 |
| Median cost per review | $0.046 | $0.071 |
Projects: axios, hono, gin, testify, cobra, urfave/cli, logrus.
The Python interval excludes zero. The JS/TS/Go interval includes it, so that one is a lean; with contested findings dropped it's −12 [−17, −5]. I don't know yet whether the flip comes from the languages or from these particular projects. Either way, a skill that helps on one codebase can hurt on another, and if I had tested only Python I'd have recommended it everywhere.
A logrus deadlock showed a second effect. Claude Code alone found it in all 3 runs and rated it minor each time. The skill rated it important or blocking twice. Precision and recall don't show that, which is why every finding keeps the severity the reviewer gave it.
The four bugs nobody caught
On the first 4 real bugs, Claude Code found the bug 23 times in 24. Across 21 bugs, these 4 were missed in all six reviews each:
| Case | What broke |
|---|---|
| black (real-011) | A new f-string tokenizer state sends a multi-line string inside braces down the wrong branch |
| peft (real-012) | A new LoRA conv layer copies kernel size, stride and padding but drops dilation and padding_mode |
| axios (real-016) | AxiosError became a native Error subclass, so message is non-enumerable and {...err} drops it |
| cobra (real-018) | A new named CompletionFunc type stops some downstream projects compiling |
In axios and cobra the line that caused the bug is in the diff and every review read it. The break is in code the diff doesn't touch: callers that spread or log the error, and projects that pass cobra their own function type. That's 2 cases, so it's a pattern to test with more cases. If it holds, a reviewer prompt that asks who calls the changed code would be worth trying.
Run it in CI
The GitHub Action re-scores your reviewer whenever its subject file or your cases change, and comments the scorecard on the pull request:
- uses: GgauravJ05/reviewreplay@main with: subjects: baseline,our-reviewer anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} Setup and cost are in docs/github-action.md.
Limits
Twelve and nine bugs are small samples with wide intervals. The judges are models, checked against each other and not yet against people. One reviewer model and one skill were tested. Every review, extraction, vote and code check is committed under results/, so you can audit or regrade any of it.
Contributing
The hono case (real-021, the first TypeScript one) came from @Black-sys-dot, the project's first outside contribution. If you know a bug that shipped in a permissively licensed project, there's an issue template for proposing it, and docs/ADDING_A_CASE.md walks through the rest.
Next I'm running Codex CLI, Gemini CLI and Claude Code's /code-review on the same 21 bugs, starting with the four nobody caught.
Repo: https://github.com/GgauravJ05/reviewreplay
code-review-skill is MIT licensed and was tested at commit 4850184. Its issue #32, which asked whether anyone had measured its impact, started this project.








