- Home
- Skills
- Testing & Debugging
- Advanced Code Reviewer & Bug Fixer
Works with the AI Agents you already use
Advanced Code Reviewer & Bug Fixer
Advanced code review and debugging agent for identifying logic flaws, security risks, and performance bottlenecks.
$19.99
Advanced Code Reviewer & Bug Fixer
Example session with this skill installed
Review this TypeScript function for concurrency issues and provide a fix:
async function updateBalance(userId: string, amount: number) {
const user = await db.users.find(userId);
user.balance += amount;
await db.users.save(user);
}
- Read your context and instructions
- Compiled the advanced code reviewer
I have analyzed the provided updateBalance function. It contains a critical concurrency defect.
Finding: Race Condition in Read-Modify-Write Cycle
| Attribute | Detail |
|---|---|
| Severity | High |
| Confidence | High |
| Location | updateBalance function |
| Impact | Data corruption / Lost updates to user balance |
Analysis
The current implementation fetches the user object, modifies the balance in application memory, and then saves it back. If two requests for the same userId occur simultaneously, they will both read the same initial balance, calculate their respective updates, and the last one to save will overwrite the other, leading to a "lost update" scenario.
Fix
Use an atomic database update to ensure the increment happens at the engine level, or implement optimistic locking.
async function updateBalance(userId: string, amount: number) {
// Use an atomic increment to prevent race conditions
await db.users.update(userId, {
balance: { increment: amount }
});
}
Regression Test
- Initialize a user with a balance of 100.
- Fire two concurrent calls to
updateBalance(userId, 50)usingPromise.all. - Expected: Final balance is 200.
- Actual (Original Code): Final balance is 150.
Next steps
- Verify if your database driver supports atomic increments (e.g., Prisma, Mongoose, or raw SQL
SET balance = balance + ?). - Review other financial or counter-based logic in the codebase for similar patterns.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Manual code reviews often miss subtle race conditions, security vulnerabilities, and N+1 query patterns. Traditional linters catch style issues but fail to detect logic flaws that lead to production outages.
What it does
- Identifies logic defects like off-by-one errors, broken state transitions, and null pointer risks.
- Conducts deep security audits for injection, unsafe deserialization, and cryptographic misuse.
- Analyzes performance bottlenecks including blocking I/O and unnecessary memory allocations.
- Generates targeted regression tests to reproduce and verify fixes for identified bugs.
Frameworks & tools
Supports TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C/C++, and SQL. Specific patterns for React, Next.js, and backend API architectures.
Why this beats prompting it yourself
This skill follows a structured multi-mode engine that forces evidence-based reasoning rather than speculative guessing. It produces prioritized scorecards and regression tests that standard LLM prompts typically overlook.
Use cases
- Reviewing complex Pull Requests for hidden regressions and architectural violations.
- Debugging production stack traces to find the root cause and a safe remediation.
- Performing security-first audits on sensitive authentication or data handling logic.
- Identifying test gaps in critical business modules to improve reliability.
Known limitations
Cannot execute code or verify benchmarks in a live environment. Performance and security claims are based strictly on source analysis and supplied context.
Requires source code or diffs. Cannot execute code or provide real-time benchmarks. Scope is limited to provided project context.
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 any payment.
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 1 month ago
Permissions
No special permissions declared or detected