Code Review — Real Bugs, Security & Performance

    by Pavithran

    1

    Most code reviews are either a rubber stamp or a style argument.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Code Review — Real Bugs, Security & Performance

    Example session with this skill installed

    Review this Python function for security issues:

    def get_user(request):
        user_id = request.args.get('id')
        query = f"SELECT * FROM users WHERE id = '{user_id}'"
        return db.execute(query)
    
    • Read your context and instructions
    • Compiled the code review

    I have completed the review of the provided Python function. I ran scripts/review_scan.py which identified 1 Critical finding.

    Code review — get_user function

    Verdict: REQUEST CHANGES

    Findings

    • Critical — pasted_code:3 — The SQL query is constructed using an f-string with direct user input from request.args. This allows an attacker to bypass authentication or extract the entire database via SQL injection.
      Fix: Use parameterized queries: db.execute("SELECT * FROM users WHERE id = %s", (user_id,)).

    Not flagged

    • Info: Variable naming — I considered flagging the generic request name but it matches common Flask/Django patterns and does not impact correctness.
    • Low: Missing type hints — While helpful for maintainability, the lack of hints is not a defect in this context.

    Next steps

    1. Implement the parameterized query fix immediately.
    2. Verify if other functions in this module use string formatting for SQL.
    3. Add a unit test that passes a quote character in the id parameter to ensure the fix works.

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

    About this skill

    Most code reviews are either a rubber stamp or a style argument. This skill does the real thing: it finds the defects that will break in production, rates them by severity, and suggests concrete fixes — and it knows what NOT to flag, so the author doesn't learn to ignore the next review. 1) Run the scanner, then triage. A pattern detector (review_scan.py, standard library only) scans Python and JavaScript/TypeScript for concrete defects — SQL injection, eval(), hardcoded secrets, shell=True, unsafe deserialisation, bare except:, mutable default arguments, == None, innerHTML XSS, Math.random() tokens, loose ==, and more — each with a code, a severity, and a suggested fix. Then the agent triages every finding by reading the line: a scanner finding is a lead, not a verdict. 2) Read the code for what the scanner cannot see. The skill walks through correctness (trace the happy path by hand), security (auth, injection, secrets, expiry, limits), data flow, error handling, concurrency, and performance — in that order. This is the part no tool does, and it is where the serious findings live: a delete endpoint with no ownership check, a function that sums items[:-1] and undercharges every order, a transfer that deducts before the destination is found. 3) Rate every finding by severity. A five-level rubric (Critical / High / Medium / Low / Info) with upgrade and downgrade rules: rate the impact, not the cleverness; rate the reachable impact; when torn between two levels, pick the higher one and say why. Never rate a style nit above Low. 4) Decide what NOT to flag. Style the project already has, naming and formatting, formatter-owned details, preferences disguised as defects, hypotheticals with no trigger — all go in a 'Not flagged' section with one line of reason each. That section is the proof the reviewer looked. 5) Write the review and validate it. A fixed report format (verdict, findings with severity + file:line + fix, 'Not flagged' section) checked by a second script (review_checklist.py) that enforces the discipline: no verdict without findings, no finding without a severity, a location, and a fix, and no APPROVE with an open Critical or High finding. What's inside: SKILL.md (step-by-step process, decision criteria, severity definitions, good/bad review comments, constraints), two Python scripts (standard library only — no network, no credentials), three reference guides (severity rubric, common bug patterns, security review checklist), and three full before/after reviews with real scanner output: a Python auth module (10 scanner findings + 2 manual findings), a JavaScript comment widget (6 + 2), and a clean rate limiter that earns an APPROVE. Tested, honestly: 33 checks, 33 passed — the scanner flags all 28 planted defects across 3 files and reports 0 findings on 6 clean files; a manual review caught all 4 logic bugs the scanner correctly missed (off-by-one, a method checked as a boolean, an unexpired token, a deduct-before-lookup); the checklist validator passes the good report 7/7 and fails each of 4 bad reports on exactly its one intended check; all 3 example review reports pass 7/7. The full evidence, including the 6 defects found and fixed during testing, is in TEST-REPORT.md. The limits are stated there too: the skill has not been run inside a buyer's live agent, the scanner has not been run on a large real-world codebase, and the JavaScript checks are line-based heuristics (the Python ones use the AST and are precise). Works in Claude, ChatGPT, Cursor, Codex and Gemini CLI — any agent that reads SKILL.md. Python 3.8+ only; no installs, no accounts.

    Optimized for Python and JS/TS only. Requires Python 3.8+ for internal scripts. Does not flag stylistic preferences or formatting issues.

    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 8 days ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables
    Listed8 days ago

    What's inside

    Frequently Asked Questions

    This skill prioritizes production-breaking defects like SQL injection, race conditions, and logic errors over stylistic preferences. It uses a structured triage process to filter out false positives and ensure every flagged issue is reachable and impactful.

    The skill is optimized for Python, JavaScript, and TypeScript environments. It requires access to your source code or diffs and functions best when integrated into workflows supporting Python 3.8+ for its internal scanning scripts.

    Each review includes a detailed report with file and line references, a severity rating from Info to Critical, concrete code fixes, and a 'Not flagged' log to verify the audit's depth.

    Yes, it is specifically designed for high-stakes modules like authentication handlers and payment processing where security vulnerabilities and silent logic failures are most costly.

    The skill is delivered as a ready-to-use agent capability; simply provide the target code or pull request data to the agent, and it will follow its internal multi-step inspection protocol automatically.

    New in DevOps & Cloud

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.