Works with the AI Agents you already use

    Review Memory: Bug-Pattern Checks for Code Review

    by Igor Boruch

    1

    Coding agents review code with whatever they happen to remember.

    Free

    Security scanned
    Review Memory: Bug-Pattern Checks for Code Review

    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

    #SeverityWhereIssue
    1Highsrc/payments/payout.ts:14The 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.
    2Highsrc/wallet/withdraw.service.ts:22-25The 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

    1. Derive the dedupe key server-side from (userId, payoutRequestId) and back it with a unique index.
    2. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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.jsGit

    Permissions

    Terminal / Shell
    Read Files
    Network Access
    Listed8 days ago

    What's inside

    Frequently Asked Questions

    It checks each change against 46 general bug patterns (idempotency, race conditions, auth, migrations, injection and more), and for every pattern that matches it runs a concrete "where to look" check and reports found, fine or can't tell. A linter checks syntax and style rules; this checks for logic failures that usually only show up in production.

    This skill is designed for any AI agent that supports the Model Context Protocol (MCP); once the server is connected, the agent can autonomously search and apply the pattern library to your diffs.

    Yes. Run the server with REVIEW_MEMORY_ALLOW_WRITES=1 and your team's lessons are saved to .review-memory/lessons.json in your repo, so new patterns are reviewed in a PR like any other change. Each lesson must be a general pattern with a concrete where-to-look check, or it is rejected.

    It is strongest on backend and full-stack changes: payments and money handling, database migrations, auth and permissions, webhooks, background jobs, external API calls and public API contracts. It adds little for CSS, copy or documentation-only changes.

    It is free. The skill is the SKILL.md that tells your agent when to check a change and how to report. The review-memory MCP server it uses is a separate, free, open-source npm package (review-memory-mcp, MIT) with 46 patterns and an eval suite.

    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.

    Free