# code-reviewer

code-reviewer — a subagent for Claude Code that checks newly written or modified code against project standards, TypeScript strict mode, and security patterns.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 6091 repo stars
- Author: ChrisWiles
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ChrisWiles/claude-code-showcase/tree/HEAD/.claude/agents/code-reviewer.md
- Updated: 2026-01-06
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/chriswiles-code-reviewer

## What it does

The subagent targets Claude Code and kicks in right after any edit. It opens with `git diff` to focus on changed files, then runs `npm run lint` before going through the diff line by line.

TypeScript checks cover three things: `any` is banned in favour of `unknown`, `interface` is preferred over `type` for plain shapes, and `as Type` assertions must be justified. Loading and empty states get their own critical category — a bare `if (loading)` without `!data` causes a spinner flash on every refetch, and a `FlatList` missing `ListEmptyComponent` is flagged the same way. For mutations, the subagent checks that buttons carry both `isDisabled={loading}` and `isLoading={loading}`, and that `onError` shows a toast.

The agent runs on the opus model and lives at `.claude/agents/code-reviewer.md`. The same rules can be applied from `.codex/agents/code-reviewer.toml` or `.cursor/agents/code-reviewer.md` depending on your editor.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/code-reviewer.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/code-reviewer.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/code-reviewer.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ChrisWiles/claude-code-showcase/tree/HEAD/.claude/agents/code-reviewer.md

## When to use it
- Catch exposed API keys and missing input validation at boundaries
- Flag direct data mutation instead of immutable spread updates
- Enforce the correct state order: Error → Loading → Empty → Success
- Detect missing `isDisabled` on mutation buttons that allow double-clicks
- Verify every `FlatList` has a `ListEmptyComponent`

## Example prompts
- Review the changes in `UserList.tsx` against project standards
- Run a code review after edits to the auth module
- Analyse the latest `git diff` and report TypeScript violations

## Similar
- [typescript-react-reviewer](https://affpapa.org/en/nevibecode/skills/typescript-react-reviewer.md) — skill · 9000 installs
- [generic-react-code-reviewer](https://affpapa.org/en/nevibecode/skills/generic-react-code-reviewer.md) — skill · 148 installs
- [generic-code-reviewer](https://affpapa.org/en/nevibecode/skills/generic-code-reviewer.md) — skill · 147 installs
- [verification-loop](https://affpapa.org/en/nevibecode/skills/verification-loop.md) — skill · 7200 installs
- [lint-and-validate](https://affpapa.org/en/nevibecode/skills/lint-and-validate.md) — skill · 96 installs
- [convex-reviewer](https://affpapa.org/en/nevibecode/skills/convex-reviewer.md) — skill · 44100 installs

## Other versions with the same name
- [code-reviewer · anthropics](https://affpapa.org/en/nevibecode/agents/anthropic-code-reviewer.md) — 31050 installs
- [code-reviewer · anthropics](https://affpapa.org/en/nevibecode/agents/code-reviewer.md) — 31050 installs
- [code-reviewer · voltagent](https://affpapa.org/en/nevibecode/agents/voltagent-community-code-reviewer.md) — 31050 installs
- [code-reviewer · worldflowai](https://affpapa.org/en/nevibecode/agents/affaan-mustafa-code-reviewer.md) — ★ 6739 repo stars
- [code-reviewer · voltagent](https://affpapa.org/en/nevibecode/agents/voltagent-code-reviewer.md) — ★ 6505 repo stars

From the same set: [chriswiles/claude-code-showcase](https://affpapa.org/en/nevibecode/by/chriswiles/claude-code-showcase.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
