AI Code Reviewer Pro

    by Zeyad Mohamed

    1

    Systematic code auditing that identifies logic flaws, security risks, and performance bottlenecks with concrete fixes.

    $2

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    AI Code Reviewer Pro

    Example session with this skill installed

    Review this Express.js route for a user profile update. It takes a JSON body and updates the MongoDB document based on the session ID.

    • Read your context and instructions
    • Compiled the ai code reviewer

    I have reviewed the Express.js route for the user profile update. The code is functional but contains a significant security risk regarding mass assignment and lacks proper error handling for database connection failures.

    Code Review Report

    Summary
    The implementation successfully handles the basic update flow but is vulnerable to unintended field modification. The most critical risk is the lack of input filtering, which allows users to overwrite restricted document fields like isAdmin or accountStatus.

    Findings

    CRITICAL-01: Mass Assignment Vulnerability

    • Location: app.patch('/profile', ...) line 14
    • Issue: The code passes req.body directly into the Mongoose findByIdAndUpdate method.
    • Why it is a problem: A malicious user can include fields they shouldn't have access to in their JSON payload, such as {"isAdmin": true}, gaining unauthorized privileges.
    • Suggested fix:
    // Corrected: Explicitly pick allowed fields
    const { bio, displayName, avatarUrl } = req.body;
    const updateData = { bio, displayName, avatarUrl };
    const user = await User.findByIdAndUpdate(req.session.userId, updateData, { new: true });
    

    MEDIUM-01: Unhandled Promise Rejection

    • Location: app.patch('/profile', ...) lines 12-18
    • Issue: The database call is not wrapped in a try/catch block or passed to an error handler.
    • Why it is a problem: If the MongoDB connection drops or a validation error occurs, the Node.js process might crash or hang without sending a response to the client.
    • Suggested fix:
    try {
      const user = await User.findByIdAndUpdate(req.session.userId, updateData, { new: true });
      res.json(user);
    } catch (err) {
      next(err); // Pass to Express error handler
    }
    

    Quick wins

    • Add { new: true } to the Mongoose query to ensure the response contains the updated document rather than the old one.
    • Use a 404 status code if User.findByIdAndUpdate returns null.

    What is done well

    • Correct use of req.session.userId ensures users can only update their own records.
    • Use of PATCH instead of PUT correctly reflects the partial update nature of the request.

    Next steps

    1. Implement the input filtering fix to prevent privilege escalation.
    2. Add a global error handling middleware to manage database exceptions.

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

    About this skill

    Code reviews often descend into bikeshedding over style while missing critical logic flaws and security vulnerabilities. This skill provides a systematic audit of code snippets, files, or diffs to identify high-impact risks before they reach production. It moves beyond simple linting to trace data flows and identify architectural weaknesses.

    What it does

    • Multi-dimension analysis targets correctness, security, performance, reliability, and maintainability.
    • Severity-ranked reporting prioritizes critical blockers and security holes over minor refactors.
    • Logic verification traces data paths to find unhandled cases and off-by-one errors.
    • Security auditing checks for injection risks, exposed secrets, and broken authentication.
    • Actionable refactoring provides corrected code blocks for every identified issue.

    How it works

    1. Contextual analysis identifies the language, framework, and intended behavior.
    2. Data flow tracing follows inputs from entry points to external systems or storage.
    3. Five-point evaluation runs the code against a checklist of common failure modes.
    4. Verification phase confirms findings to eliminate speculative noise or false positives.
    5. Structured reporting delivers a categorized list of findings with specific line references.

    Frameworks & tools

    This skill is language-agnostic and works with any modern programming language or framework. It is particularly effective for reviewing REST/GraphQL APIs, concurrency logic, and data processing scripts.

    Why this beats prompting it yourself

    Standard prompts often produce generic advice or focus on trivial naming conventions. This skill enforces a strict verification step and requires concrete failure scenarios for every finding, ensuring you get technical depth rather than superficial feedback.

    Use cases

    • Reviewing critical PRs for hidden race conditions or memory leaks.
    • Auditing legacy code for security vulnerabilities and injection risks.
    • Optimizing data processing loops that exhibit N+1 or complexity issues.
    • Validating error handling and retry logic in distributed systems.

    Known limitations

    Does not perform live execution or dynamic analysis. Effectiveness depends on the amount of context provided in the snippet or file.

    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.

    Frequently Asked Questions

    The AI Code Reviewer is language-agnostic and performs equally well across JavaScript, Python, Go, Rust, and other modern frameworks, specifically targeting architectural logic rather than just syntax.

    Unlike standard prompts that often focus on naming conventions, this skill uses a multi-step verification process to identify 'silent' killers like race conditions, N+1 query patterns, and data flow vulnerabilities.

    No, this skill performs static analysis based on the provided code; it does not execute your code in a sandbox or have access to your live production environment.

    The skill expects code snippets, full files, or Git diffs; providing surrounding context such as the framework used or the intended function of the module will significantly improve the depth of the audit.

    Upon purchase, you receive the full skill integration for your AI agent, including the multi-dimension analysis logic and the structured reporting templates.

    The AI Code Reviewer is designed to be compatible with most major AI agent platforms that support custom skill or tool integration; please check your specific agent's documentation for 'Custom Skill' compatibility.

    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.