Skip to main content
subagent CX Codex

code-reviewer · chriswiles — Claude Code subagent: code review and security

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

no license ★ 6,091 updated 2026-01-06

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/code-reviewer.md
Open on GitHub

What code-reviewer 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.

What it helps with

  • 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 for the agent

  • 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

How to install code-reviewer

Manually: put the files in place

.claude/agents/code-reviewer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about code-reviewer

How do I install code-reviewer in Claude Code?

Place the agent file at .claude/agents/code-reviewer.md in the project root. Claude Code picks up subagents from that directory automatically.

What does the code-reviewer subagent do?

After each code change it runs git diff and npm run lint, then checks typing, loading states, error handling, mutation UI patterns, and security, grouping findings by severity.

Which model does code-reviewer use?

The frontmatter sets model: opus. Change that field to switch to a different model.

Similar subagents

All subagents for Code review and refactoring →

code-reviewer by other authors comes first.

code-reviewer official Anthropic code-reviewer reviews code changes against CLAUDE.md project rules and flags material defects. Run it before a commit or pull request. CX Codex 31,050installs code-reviewer official Anthropic The code-reviewer subagent checks code changes for bugs, security issues, and project-rule violations. Use it when a review should focus on findings that matter. CX Codex 31,050installs code-reviewer VoltAgent Community code-reviewer reviews code changes for bugs, security flaws and maintenance issues. Use it before merging complex work or auditing a project. CX Codex 31,050installs code-reviewer Affaan Mustafa The code-reviewer subagent reviews code changes for security vulnerabilities, bugs, performance problems, and style violations. Run it immediately after writing or modifying code to catch issues before they reach production. CX Codex ★ 6,739repo stars code-reviewer VoltAgent code-reviewer — a subagent for comprehensive code review covering maintainability, design, and risk factors beyond correctness. Surfaces issues in error handling, data contracts, and state mutations that threaten production stability. CX Codex ★ 6,505repo stars typescript-react-reviewer dotneet typescript-react-reviewer — a code review skill for TypeScript and React 19 apps. Catches hook anti-patterns, state mutations and type safety gaps before you merge. CX Codex +1 9,000installs generic-react-code-reviewer travisjneuman generic-react-code-reviewer walks your React/TypeScript diff for bugs, security holes, render costs and accessibility gaps. Fits right before a commit or when a pull request lands on your desk. CX Codex +1 148installs generic-code-reviewer travisjneuman generic-code-reviewer inspects code diffs for security risks, runtime errors, bundle bloat, and WCAG AA gaps. It adapts checks to your project stack and enforces workflow rules from CLAUDE.md. CX Codex +1 147installs verification-loop affaan-m The verification-loop skill checks a code change through build, types, lint, tests, security searches, and diff review. Run it after a feature or refactor, or before a PR. CX Codex +1 7,200installs lint-and-validate davila7 The lint-and-validate skill runs linting, type checks, and security audits after code changes. Use it to keep project checks in the editing loop. CX Codex +1 96installs convex-reviewer convex convex-reviewer walks Convex code through auth, validator, index and reactivity checks. Useful before you ship backend functions. CX Codex +1 44,100installs

From the same set11

The whole set →
pr-review pr-review inspects pull requests through the GitHub CLI against project standards and posts tiered review notes. CX Codex +1 ★ 6,091repo stars code-quality code-quality reviews TypeScript files in a chosen directory, runs npm checks, and groups findings by severity. Use it before a code change or review. CX Codex +1 ★ 6,091repo stars docs-sync docs-sync is a Claude Code command that compares documentation with recent code changes and flags inconsistencies. It catches outdated examples, incorrect API signatures, and mismatched parameter types. CX Codex +1 ★ 6,091repo stars github-workflow github-workflow manages Git branches, Conventional Commits, and pull requests according to team conventions. Helpful for keeping repository history structured and tidy. CX Codex ★ 6,091repo stars ticket Handles the full ticket workflow: fetch task details from JIRA or Linear, explore related code, implement changes, and create a linked PR. Reduces manual sync between issue tracker and repository. CX Codex +1 ★ 6,091repo stars systematic-debugging systematic-debugging enforces a four-phase troubleshooting protocol rooted in root cause analysis. Ideal for tracking down broken test suites or runtime errors without trial-and-error edits. CX Codex +1 ★ 6,091repo stars graphql-schema The graphql-schema skill sets conventions for GraphQL queries, mutations, and type generation. It fits projects that use Apollo Client. CX Codex +1 ★ 6,091repo stars formik-patterns formik-patterns adds Formik form recipes to Claude: Yup schemas, field handlers, a submit flow and multi-step forms. CX Codex +1 ★ 6,091repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open