# Code Review

> Reviews code for bugs, style, and best practices. Use when reviewing PRs or checking code quality.

- Skill: `majiayu000/code-review-72` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/code-review-72`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/code-review-72/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/code-review-72

---


# Code Review

## Checklist

**Correctness:** Logic errors, edge cases, off-by-one, resource leaks, race conditions, error handling

**Security:** Input validation, injection (SQL/XSS), auth/authz, secrets exposure, CSRF

**Performance:** N+1 queries, redundant work, memory leaks, blocking I/O, missing indexes

**Maintainability:** Clear naming, single responsibility, DRY, test coverage

## Severity

| Level | Action |
|-------|--------|
| CRITICAL | Security/data-loss risk — must fix |
| MAJOR | Bug/performance — should fix |
| MINOR | Code smell — consider fixing |
| STYLE | Formatting — optional |

## Comment Format

```
### [SEVERITY] Brief description
**File:** path:line
**Issue:** What's wrong
**Suggestion:** Proposed fix
```

## Flag These

- `== true/false` → use boolean directly
- `catch(e) {}` → swallowed error
- Magic numbers → named constants
- Deep nesting → early returns
- Commented-out code → delete it

