- Home
- Skills
- Code Quality & Review
- AI Code Reviewer Pro
AI Code Reviewer Pro
Systematic code auditing that identifies logic flaws, security risks, and performance bottlenecks with concrete fixes.
$2
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.bodydirectly into the MongoosefindByIdAndUpdatemethod. - 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.findByIdAndUpdatereturns null.
What is done well
- Correct use of
req.session.userIdensures users can only update their own records. - Use of
PATCHinstead ofPUTcorrectly reflects the partial update nature of the request.
Next steps
- Implement the input filtering fix to prevent privilege escalation.
- 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
- Contextual analysis identifies the language, framework, and intended behavior.
- Data flow tracing follows inputs from entry points to external systems or storage.
- Five-point evaluation runs the code against a checklist of common failure modes.
- Verification phase confirms findings to eliminate speculative noise or false positives.
- 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
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
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
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.