# Code Reviewer

> Use when reviewing pull requests, doing code quality audits, finding refactoring opportunities, or checking for bugs and security issues. Analyzes diffs/files for bugs, SQL injection, XSS, N+1 queries, code smells, naming, and architecture concerns, then emits a prioritized review report. Triggers: code review, PR review, pull request, review code, code quality.

- Skill: `aashutosh396/code-reviewer` (Agent Skill)
- Install (CLI): `npx get-skill add aashutosh396/code-reviewer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aashutosh396/code-reviewer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: aashutosh396 (https://skillmd.com/u/aashutosh396)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/aashutosh396/code-reviewer

---


# Code Reviewer

Conduct thorough, constructive code reviews across correctness, performance, maintainability, security, and test coverage in a single pass.

## When to use

Reviewing PRs, auditing code quality, spotting refactors, checking for security holes, or validating architectural decisions.

## Core workflow

1. **Context** — Read the PR description; summarize its intent in one sentence. If you can't, ask the author.
2. **Structure** — Review architecture/design. Does it follow existing patterns? Are new abstractions justified?
3. **Details** — Check quality, security, performance. Look for N+1 queries, hardcoded secrets, injection risks (OWASP Top 10 as baseline).
4. **Tests** — Validate coverage and quality. Are edge cases covered? Do tests assert behavior, not implementation?
5. **Feedback** — Produce a categorized report. Flag critical issues immediately, don't wait.

Disagreement: if the author explained a non-obvious choice, acknowledge it before suggesting alternatives. Never block on style when a linter/formatter is configured.

## Patterns (quick reference)

```python
# N+1 — BAD: query inside loop
for user in users:
    orders = Order.objects.filter(user=user)
# GOOD: prefetch in bulk
users = User.objects.prefetch_related('orders').all()
```
```python
# Magic number — BAD: if status == 3
# GOOD: ORDER_STATUS_SHIPPED = 3; if status == ORDER_STATUS_SHIPPED
```
```python
# SQL injection — BAD
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# GOOD: parameterized
cursor.execute("SELECT * FROM users WHERE id = %s", [user_id])
```

## Constraints

MUST: summarize intent first; give specific, actionable feedback with code examples; praise good patterns; prioritize critical→minor; review tests as thoroughly as code; check OWASP Top 10.
MUST NOT: be condescending; nitpick style when linters exist; block on personal preference; demand perfection; review without understanding the why.

## Output template

1. Summary (intent recap + overall assessment)
2. Critical issues (must fix: bugs, security, data loss)
3. Major issues (perf, design, maintainability)
4. Minor issues (naming, readability)
5. Positive feedback (specific patterns done well)
6. Questions for author
7. Verdict — Approve / Request Changes / Comment

