- Home
- Skills
- Code Quality & Review
- AI Code Review Skill: Every Bug Gets a Failing Test
More screenshots
Works with the AI Agents you already use
AI Code Review Skill: Every Bug Gets a Failing Test
Code review for Claude Code, Cursor and Codex that proves each serious bug with a test it ran. Fewer nitpicks, no guessing.
Free
AI Code Review Skill: Every Bug Gets a Failing Test
Example session with this skill installed
Review my current branch before I merge it.
- Read your context and instructions
- Compiled the ai code review
Verdict: BLOCK · 2 findings (2 proven) · Tests: node --test passed (6)
The guard has two holes that turn the login page into an open redirect.
1. [CRITICAL · Proven] src/returnTo.js:3,18: the subdomain regex matches hosts that only start with example.com
What happens: TRUSTED_ORIGIN has no end anchor, so https://example.com.evil.test/… and https://example.com@evil.test/… pass. After login the user lands on an attacker's host.
Evidence:
$ node --test test/review-proof-open-redirect.test.js
https://example.com.evil.test/login -> browser lands on example.com.evil.test
https://example.com@evil.test/login -> browser lands on evil.test
Fix: compare url.hostname against an allowlist instead of regex-matching url.href.
2. [CRITICAL · Proven] src/returnTo.js:15-16: a same-origin URL with a // path becomes a protocol-relative redirect
(Real output from the public benchmark, trimmed.)
Connects securely to your tools. The creator never sees your data.
About this skill
Most AI code reviews bury you in "possible issues" and leave you to check each one. This one proves the serious ones.
What it does
- Reads past the diff: finds every caller of the changed code, including files the PR never touched.
- Tries to disprove each suspicion before reporting it, so noise gets dropped.
- For every Critical and High finding it writes the smallest failing test, runs it, and shows you the output.
- Ends with a clear verdict: BLOCK, REQUEST CHANGES, APPROVE WITH NOTES or APPROVE.
Proof, not promises (public blind benchmark, 18 PRs with seeded bugs)
- Both reviewers found 15/15 seeded bugs. The difference is trust.
- Claude Haiku: 94% precision vs 74%, 5 nitpicks vs 25.
- Claude Opus: 19/19 Critical/High findings proven by a test, 9 nitpicks vs 18.
- Cases, answer keys and raw reviews are public: github.com/Ces107/agent-forge/tree/main/bench/code-review
Why this beats prompting "review this PR" A plain prompt finds the same bugs. This adds the part prompts skip: refuting its own guesses and attaching a test you can run, so you stop re-checking every comment.
Known limitations
- Detection is not better than a good prompt (a tie in our benchmark); the gain is precision and proof.
- Proving a bug needs a runnable test setup in your repo.
- It only creates new test files; it never edits your code.
Good for pull requests, AI-written code and security-sensitive changes (races, IDOR, open redirects, cache leaks). Works in Claude Code, Cursor, Codex CLI, Copilot and any SKILL.md agent. Read-only on your code; proof tests go in new files you can keep.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
This skill has been used 9 times.
Trust & safety
Security scan
Security scan passed 28 days ago
- Free with an Agensi account
Requires