# Code Reviewer

> Review code for bugs, security issues, performance problems, and best practice violations. Use when the user asks to review code, check code quality, find bugs, or audit a file. Provides actionable feedback with severity ratings and suggested fixes.

- Skill: `sourav15mukherjee/code-reviewer` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add sourav15mukherjee/code-reviewer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sourav15mukherjee/code-reviewer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: sourav15mukherjee (https://skillmd.com/u/sourav15mukherjee)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/sourav15mukherjee/code-reviewer

---


## Code Reviewer

Perform thorough, multi-pass code reviews that catch bugs, security issues, and quality problems.

## Workflow

1. **Read the target code**
   Read all files the user wants reviewed. If they say "review my changes," run `git diff` to see what changed.

2. **Pass 1 — Correctness**
   Look for:
   - Logic errors and off-by-one bugs
   - Null/undefined reference risks
   - Unhandled promise rejections or missing error handling
   - Race conditions in async code
   - Missing input validation

3. **Pass 2 — Security**
   Check for OWASP Top 10:
   - SQL injection (string concatenation in queries)
   - XSS (unescaped user input in HTML)
   - Command injection (user input in shell commands)
   - Sensitive data exposure (API keys, passwords in code)
   - Missing authentication/authorization checks
   - Insecure deserialization

4. **Pass 3 — Performance**
   Look for:
   - N+1 query patterns
   - Unnecessary re-renders (React)
   - Missing pagination for large datasets
   - Synchronous operations that should be async
   - Memory leaks (event listeners, intervals not cleaned up)

5. **Pass 4 — Quality**
   Check for:
   - Dead code or unused imports
   - Overly complex functions (should be split)
   - Missing error boundaries
   - Inconsistent naming conventions
   - Magic numbers without constants

6. **Generate the review**
   Format findings by severity:

   **🔴 Critical** — Must fix before merging (bugs, security)
   **🟡 Warning** — Should fix, risk of issues (performance, quality)
   **🔵 Suggestion** — Nice to have (style, readability)

## Rules

- Always provide specific line references
- Include a suggested fix for every finding
- Be constructive — explain WHY something is an issue
- Don't nitpick formatting if the project has no linter
- Acknowledge good patterns you see — reviews shouldn't only be negative
- Summarize with a confidence rating: "Safe to merge" / "Needs changes" / "Needs rework"

