- Home
- Skills
- Code Quality & Review
- Review Memory: Bug-Pattern Checks for Code Review
Works with the AI Agents you already use
Review Memory: Bug-Pattern Checks for Code Review
by Igor Boruch
Coding agents review code with whatever they happen to remember.
Free
Review Memory: Bug-Pattern Checks for Code Review
Example session with this skill installed
Review my staged changes before I open the PR (git diff --staged). It adds a payout endpoint and changes the withdrawal service.
- Read your context and instructions
- Compiled the review memory
Review: payout endpoint (2 files changed)
Findings
| # | Severity | Where | Issue |
|---|---|---|---|
| 1 | High | src/payments/payout.ts:14 | The idempotency key comes from req.body.idempotencyKey. A client can replay one key to suppress a legitimate payout, or rotate keys to get paid twice. |
| 2 | High | src/wallet/withdraw.service.ts:22-25 | The balance is read, checked and written in separate statements. Two concurrent withdrawals both pass the check (double spend). |
Failing scenario for #2: balance 100; requests A and B (80 each) both read 100, both pass balance >= amount, both write 20, so 160 is paid out from a balance of 100.
Suggested fixes
- Derive the dedupe key server-side from
(userId, payoutRequestId)and back it with a unique index. - Make the debit atomic:
UPDATE wallet SET balance = balance - $1 WHERE user_id = $2 AND balance >= $1, and treat 0 updated rows as insufficient funds.
Checked against review memory
idempotency-key-from-client: Found (#1)check-then-write-race: Found (#2)balance-without-ledger: Checked, fine. A ledger row is written in the same transaction.external-call-inside-db-transaction: Checked, fine. The provider call happens after commit.test-pins-nothing: Can't tell. There are no tests in this diff; add one that fails on the old code.
Next steps: fix #1 and #2, add a concurrent-withdrawal test, then run the review again on the new diff.
Connects securely to your tools. The creator never sees your data.
About this skill
Coding agents review code with whatever they happen to remember. Review Memory gives them a searchable library of the bugs that most often slip past review, each with a concrete "where to look" check, and makes the agent actually run those checks.
What it does
- Searches 46 general bug patterns across 13 failure modes for the ones that match your diff
- For each match, runs its "where to look" step and reports Found (file:line + the failing scenario), Checked, fine, or Can't tell
- Re-reads a short always-check list: client-supplied idempotency keys, check-then-write races, tests that pin nothing, migrations that lock busy tables, external calls inside database transactions
Measured, not vibes
Retrieval is evaluated in CI on a blind held-out set of 40 cases: the right pattern is in the top 3 for 80% of cases, vs 51% for a flat notes file. Every miss is listed in the repo.
Setup
Requires the free, open-source review-memory MCP server (Node.js 20+):
claude mcp add review-memory -- npx -y review-memory-mcp
Cursor, Windsurf and other MCP clients: command npx, args ["-y", "review-memory-mcp"].
Good to know
- Read-only by default. Optionally, your team files its own lessons into the repo (
.review-memory/lessons.json) and reviews them in PRs like any other change. - An empty result means no known pattern matched, not that the change is safe.
- Source and eval: the open-source review-memory-mcp project (MIT), on npm and GitHub
Requires review-memory MCP server. Not useful for UI/CSS-only changes. Write access for new lessons is disabled by default.
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
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 8 days ago
- Free with an Agensi account
- Software
Node.js
Git
Permissions
What's inside
Frequently Asked Questions
New in Code Quality & Review
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.