Code Review Board

    by GlowHalo

    1

    Review a diff or pull request for real bugs before merge: four reviewer lenses (one model applying each in turn) check each other and tag findings CONFIRMED, CORROBORATED or DISPUTED.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+23 more

    Code Review Board

    Example session with this skill installed

    Use the Code Review Board on this (a sample I wrote). Please tell me if it is safe to merge.

    PR "Add webhook for order refunds" (fictional shop backend, Python/Flask):

    --- a/app/refunds.py
    +++ b/app/refunds.py
    @@ -0,0 +1,20 @@
    +import os, requests
    +from flask import request, jsonify
    +from app import app, db
    +
    +API_KEY = "demo_key_do_not_use_123"
    +
    +@app.route("/webhook/refund", methods=["POST"])
    +def refund_webhook():

    • data = request.get_json()
    • order_id = data["order_id"]
    • order = db.execute(f"SELECT * FROM orders WHERE id = '{order_id}'").fetchone()
    • amount = order["total"]
    • r = requests.post("https://payments.example.com/refund",
    •                  json={"order": order_id, "amount": amount},
      
    •                  headers={"Authorization": API_KEY})
      
    • db.execute(f"UPDATE orders SET status='refunded' WHERE id='{order_id}'")
    • for item in db.execute("SELECT * FROM items WHERE order_id = ?", (order_id,)):
    •    stock = db.execute("SELECT qty FROM stock WHERE sku = ?", (item["sku"],)).fetchone()
      
    •    db.execute("UPDATE stock SET qty = ? WHERE sku = ?", (stock["qty"] + item["qty"], item["sku"]))
      
    • return jsonify(ok=True)
    • Read your context and instructions
    • Compiled the code review board

    Phase 1 — Lens findings

    Mode: one lens at a time (each lens finished before the next began)

    🔒 Security Skeptic

    S1. No authentication on the webhook (refund_webhook, line 8). No signature check, shared secret, or IP allowlist. Anyone who finds /webhook/refund can POST {"order_id": "<any id>"} and trigger a real refund and a restock for any order.

    S2. SQL injection via order_id (lines 11 and 16, f-string queries). A payload like x' OR '1'='1 on the UPDATE marks every order refunded; the SELECT can be abused to probe other data.

    S3. Hardcoded payment credential (line 5). It sits in source, so it ends up in forks, CI logs and backups. The value is not repeated here. os is already imported, so an env-var lookup was probably intended.

    S4. No input validation. order_id can be any JSON type or empty; nothing constrains it before it reaches SQL and the payment API.

    ⚙️ Reliability Realist

    R1. Not idempotent. Nothing checks whether the order is already refunded. Webhook senders retry routinely, so a duplicate delivery means a double refund and a double restock.

    R2. Payment response ignored (r, lines 13-15). On a 4xx/5xx the order is still marked refunded and stock is still returned.

    • R3. No timeout on requests.post. If the payment host hangs, the worker hangs with it.

    R4. Ordinary bad input crashes with a 500: get_json() returning None (line 10 TypeError), missing order_id (KeyError), unknown order (order is None, line 12 TypeError), SKU missing from stock (line 19 TypeError, mid-loop).

    R5. Side effects are ordered unsafely. The external refund (line 13) happens before any local record exists. If the process dies after the POST, nothing marks the order as pending, so a retry refunds again.

    R6. Lost-update race on stock (lines 18-19). Read-modify-write in Python means two concurrent refunds, or a refund racing a sale, overwrite each other.

    • R7. No db.commit() visible in the handler, so the status and stock updates may never persist.

    🧹 Maintainability Pragmatist

    M1. Inconsistent query style. f-strings (lines 11, 16) sit next to parameterized queries (lines 17-19) in one function; the next editor will copy whichever they see first.

    • M2. Dead code that signals unfinished intent: os is imported but unused, and r is assigned but never read.

    M3. Everything is in the route handler (parsing, lookup, payment call, state change, inventory), so none of it can be tested without Flask and a live payment endpoint.

    • M4. Always returns ok=True, bare 'refunded' literal, and SELECT * with column access by name. A caller or log reader cannot tell what happened, and a schema change breaks it silently.

    🚀 Performance Pessimist

    P1. N+1 queries in the restock loop. Each item costs a SELECT plus an UPDATE, so a 50-line order is about 100 round trips; one UPDATE stock SET qty = qty + ? WHERE sku = ? per item does the same work.

    • P2. Blocking outbound HTTP call on the request thread with no timeout (same root cause as R3). A slow provider ties up Flask workers.

    Phase 2 — Cross-examination

    • [S1 no auth] Challenge: none, nothing in the diff verifies the caller. Corroborated by Reliability: "A forged or replayed request behaves like a duplicate delivery; with R1 an attacker can refund one order repeatedly."
    • [S2 SQL injection] Challenge: none, order_id goes straight from JSON into an f-string. Corroborated by Reliability: "Even benign IDs containing ' break the query." Corroborated by Maintainability (M1 is the root cause).
    • [S3 hardcoded credential] Challenge from Maintainability: "The value is named as a demo placeholder, so it is not a live leak in this sample." Rebuttal from Security: "The pattern is the bug; the real key lands on the same line." The challenge lowers severity for this value only. Corroborated by Maintainability (M2: the unused os import points to the intended env-var fix).
    • [S4 input validation] Challenge: none. Corroborated by Reliability (R4: wrong types and missing fields crash the handler).
    • [R1 idempotency] Challenge: none, there is no status check anywhere. Corroborated by Security: "It turns S1 into repeatable theft."
    • [R2 payment response ignored] Challenge: none. Corroborated by Security: "The record claims money moved when it did not, which poisons fraud and dispute investigations." Corroborated by Maintainability (M2: r is unused; M4: always ok=True).
    • [R3 / P2 no timeout] Flagged independently by Reliability and Performance. Challenge: none.
    • [R4 crashes on bad input] Corroborated by Security (S4) and Maintainability (M4: every failure looks the same to the caller). Challenge: none.
    • [R5 side-effect ordering] Challenge from Maintainability: "db is not shown and may wrap the handler in a transaction." Rebuttal from Reliability: "The external refund cannot be rolled back by any DB transaction." The challenge only touches the DB part, which is covered under R7. Corroboration from other lenses: none.
    • [R6 stock race] Corroborated by Performance: "The atomic qty = qty + ? fix for P1 also removes the race." Challenge: none.
    • [P1 N+1] Challenge from Reliability: "Orders usually have few items, so impact is low." That argues severity, not correctness, so the finding stands. Corroborated by Reliability (R6 shares the same fix).
    • [R7 missing db.commit()] Challenge from Maintainability: "db comes from app and is not in the diff; it may autocommit or commit in a teardown hook." Challenge from Security: none. This is a concrete reason for doubt.
    • [M3, M4] No challenges and no cross-lens corroboration beyond what is noted above. These are testability and clarity issues.

    Phase 3 — Board verdict

    [CORROBORATED] SQL injection through f-string queries (lines 11, 16). Fix: parameterized ? placeholders as on lines 17-19, and validate order_id format first.
    2.

    [CORROBORATED] Unauthenticated webhook (line 8). Fix: verify an HMAC signature header from the payment provider with hmac.compare_digest and reject otherwise.
    3.

    [CORROBORATED] Not idempotent; duplicate or replayed deliveries double-refund and double-restock. Fix: UPDATE orders SET status='refunding' WHERE id=? AND status='paid' and proceed only if rowcount == 1; also send an idempotency key to the payment API.
    4.

    [CORROBORATED] Payment API result ignored; the order is marked refunded even if the refund failed (lines 13-16). Fix: r.raise_for_status() or check the body, and only update status and stock on confirmed success.
    5.

    [CORROBORATED] No timeout on the outbound call (R3/P2). Fix: requests.post(..., timeout=(3, 10)) and handle requests.RequestException.
    6.

    [CORROBORATED] Missing input validation and crashes on bad or missing data (S4/R4). Fix: 400 on missing or invalid JSON or order_id, 404 on unknown order, explicit handling of a missing stock row.
    7.

    [CORROBORATED] Hardcoded API credential (line 5). Fix: os.environ["PAYMENTS_API_KEY"]. The value is a placeholder here and Maintainability's severity challenge is noted, but the pattern must not ship.
    8.

    [CORROBORATED] Stock lost-update race plus N+1 queries (R6/P1). Fix: UPDATE stock SET qty = qty + ? WHERE sku = ?, which is atomic and removes the SELECT.
    9.

    [CONFIRMED] Refund fires before any local record exists (R5). Fix: record a refunding state before the external call so a crash is recoverable and reconcilable.
    10.

    [CONFIRMED] Handler does everything, always returns ok=True, uses SELECT * and a bare status literal (M3/M4, low priority). Fix: extract a process_refund(order_id) function, use named constants and explicit columns, return meaningful status codes.
    11.

    [DISPUTED] Missing db.commit() / transaction scope (R7) — challenge: "db is not in the diff and may autocommit or commit on teardown." Human judgment call: check app/__init__.py.

    Merge recommendation: Block merge — 8 CORROBORATED findings, including two independently exploitable security issues (unauthenticated refund trigger and SQL injection) that together let anyone refund arbitrary orders repeatedly. Fix items 1-6 at minimum before re-review.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Reviews pasted code changes with a three-phase board process. Phase 1: four reviewer lenses (security, reliability, maintainability, performance) review one at a time. Phase 2: each lens challenges or corroborates the other lenses' findings to cut false positives. Phase 3: one verdict tags every finding CONFIRMED, CORROBORATED or DISPUTED and ends with a merge recommendation. Disputed items appear with the challenge beside them. Secrets or PII found in the diff are flagged by file/line without echoing the value. It does not run code, set up CI, or review from memory: if no diff is provided it asks for one. The lenses are roles applied by one model (or by sub-agents if your agent supports them), so the cross-checks are self-checks; spot-check the findings. Anthropic, OpenAI and OpenClaw are trademarks of their respective owners. This Skill is an independent product and is not affiliated with, endorsed by, or sponsored by any of them.

    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.

    Static analysis only. Cannot detect environment-specific runtime errors or infrastructure-level misconfigurations not present in the code diff.

    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

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 20 days ago

    Permissions

    Read Files
    Write Files
    Listed1 month ago
    Updated14 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard AI reviewers that tend to be overly agreeable, this skill uses an adversarial multi-lens process (Security, Reliability, Maintainability, and Performance) that forces the agent to cross-examine its own findings and filter out low-value noise.

    The skill is optimized for use with claude-code, codex, and openclaw, but it can be integrated into any environment that supports diff-based input and multi-step agent reasoning.

    The board requires the source code or a pull request diff to be visible in the prompt context; it does not currently execute the code in a sandbox or perform dynamic runtime analysis.

    You receive the complete adversarial workflow configuration, including the four specialized reviewer personas and the three-phase synthesis logic, ready to be imported into your preferred agent framework.

    Yes, it is language-agnostic and performs effectively on any language visible in a text-based diff, though it excels at spotting patterns in TypeScript, JavaScript, and Python.

    Setup is straightforward: once purchased, you simply import the skill into your agent's library and trigger it by providing a code block or diff with the "review" command.

    New in Code Quality & Review