- Home
- Skills
- Code Quality & Review
- Prove-It Code Review: Bugs Proven by Failing Tests
Works with the AI Agents you already use
Prove-It Code Review: Bugs Proven by Failing Tests
Most AI code reviews give you a list of "possible issues", and you spend the next hour checking which ones are real.
$5
Prove-It Code Review: Bugs Proven by Failing Tests
Example session with this skill installed
Review my last commit for bugs before I merge it.
- Read your context and instructions
- Compiled the prove-it code review
Four bugs are proven in the last commit (2cd33a1), and the first two are serious. I added a failing test for each to cache_test.go. I haven't changed cache.go, because you asked for a review and not fixes. The existing 3 tests passed with -race before I added mine.
| # | Severity | Scenario | Proof | Status |
|---|---|---|---|---|
| 1 | 🔴 | Set(k, v, 0) is documented as "never expires", but Get returns a miss straight away. e.expires is the zero time, so time.Now().After(e.expires) is always true (cache.go, Get). The janitor does check IsZero(), so only Get is wrong. | TestGet_ZeroTTLNeverExpires fails with Get(a) = "", false | unfixed |
| 2 | 🔴 | Get increments c.stats while holding only RLock. Concurrent readers race, and counts are lost. | TestGet_ConcurrentStatsRace fails with Hits = 3008, want 8000, and -race reports DATA RACE | unfixed |
| 3 | 🟠 | Calling Close() twice panics with close of closed channel. A defer c.Close() combined with an explicit shutdown call would trigger it. | TestClose_Twice fails | unfixed |
| 4 | 🟠 | New(0) or a negative interval makes time.NewTicker panic inside the janitor goroutine. That kills the whole process and recover in the caller can't catch it. | TestNew_NonPositiveInterval crashes the test binary with panic: non-positive interval for NewTicker | unfixed |
Evidence
- I ran
go test -race ./.... The 4 new tests fail for the reasons in the table. Test 2 failed on its first run and I haven't repeated it. - The
Hits = 3008figure is a lost-update count. It will vary between runs, but the-racereport is deterministic.
Possible fixes, if you want them
- #1: treat a zero
expiresas "never expires" inGet, the same way the janitor does. - #2: use
LockinGet, or make the counters atomic. - #3: wrap the
closeinsync.Once. - #4: reject or default a non-positive interval in
New.
Plausible, not proven
Getnever deletes expired entries, so they stay in memory until the janitor's next tick. That's fine with a short interval, but the tests usetime.Minute.- The
Set/Getsignatures changed (Newnow takes an interval,Settakes a ttl), which breaks every existing caller. It's fine if you're the only user, but worth knowing before you merge.
Not reviewed: the janitor's deletion logic under load, and whether go 1.27.1 in go.mod is the version you intend.
Do you want me to apply the fixes and check that each new test fails again without its fix?
Connects securely to your tools. The creator never sees your data.
About this skill
Most AI code reviews give you a list of "possible issues", and you spend the next hour checking which ones are real. This skill does that work for you.
Every bug it reports comes with a test that fails because of it. What it can't prove is labeled "plausible" with the reasoning, or dropped.
What it does
- Finds the scope: your uncommitted changes, the last commit, a branch against its base, a PR, or the files you name. It reads every changed line in full, plus the code around it.
- Runs your existing tests first, so failures that were already there aren't blamed on the change.
- Attacks the change category by category: boundaries, concurrency, I/O and network failures, lifecycle and crashes, time zones, errors, security, resource leaks and broken contracts.
- Proves each finding with the smallest failing test, written in your own test framework and file layout. Timing bugs are made deterministic or repeated until they fail.
- Fixes only when you ask, and then runs a mutation check: it undoes the fix and confirms the test fails again, so the test really covers the bug.
- Reports a table of scenario → proof → status, the commands it ran, and what it did not review. It never claims "no bugs".
Why it's different
- Evidence, not opinions. No false alarms to triage.
- Regression tests included. The proving tests stay in your codebase.
- Safe with your work. It never runs
git reset,checkout,stashorcleanon uncommitted changes, and without your request it changes test files only. - Language checklists for Go, TypeScript/JavaScript and Python (typed nils, missing
awaits, mutable defaults, naive datetimes...). Any other language with a test runner works with the general method.
Works best for
- Checking a change before you merge or open a PR.
- Reviewing code an AI agent just wrote.
- Concurrency, caching, networking and other code where bugs hide in edge cases.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Requires a functional local test environment and test runner. Cannot verify bugs needing external infrastructure like live databases or third-party APIs.
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 buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 18 days ago
- Software
- Your project's test runner
Gittsc
Node.jsvitestjest
Permissions
It reads the changed code and the code around it, runs your tests, linter and type checker, and writes the failing tests that prove each bug. It edits non-test code only when you ask for fixes. It never runs git commands that discard uncommitted work, and it makes no network calls of its own.