Skip to main content
subagent CX Codex

code-reviewer · justxor — Claude Code subagent: git diff review, no edits

code-reviewer reads your diff, flags security holes, missing tests and edge cases, then returns a severity-sorted report with a file and line for each fix.

MIT ★ 353 updated 2026-10-01

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

A Claude subagent set to sonnet, with Read, Grep, Glob and Bash available. It opens with git diff and git diff --staged, stays on the changed files, and walks a fixed checklist: edge cases, error handling, secrets and injection, auth and input validation, tests for new behaviour, duplication, readability, and whatever rules CLAUDE.md lays down.

What comes back is a report split into Critical, Warnings and Suggestions. Each entry has a file:line pointer and a concrete fix, so you are not hunting for the spot yourself. The agent does not touch your files — it reads, searches and runs commands.

The CLAUDE.md item only has teeth when that file holds real project rules. On a clean working tree the diff is empty, so run the review before you commit.

What it helps with

  • catch a missing test for new behaviour
  • spot secrets and injection risks in fresh changes
  • get line-numbered findings before opening a PR
  • check code against the rules in CLAUDE.md
  • sort review notes by severity instead of one long list

Example prompts for the agent

  • Review my working changes before I open the PR — start with git diff.
  • Check the last commit for error handling and tests on the new behaviour.
  • Look at the edits under src/api/ and return findings by severity.

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 to install code-reviewer in Claude Code?

Place the subagent file at .claude/agents/code-reviewer.md in your project. Claude then picks it up as the code-reviewer subagent.

What does code-reviewer do?

It runs git diff and git diff --staged, works through the changed files against a checklist, and returns a report graded Critical, Warnings, Suggestions. It never edits code.

Does it need a CLAUDE.md in the project?

One checklist item is compliance with the rules in CLAUDE.md. Without such a file, that item has nothing to stand on.

Source text

code-reviewer.md · MIT
---
name: code-reviewer
description: Senior-ревьюер кода. Используй ПРОАКТИВНО сразу после написания или изменения значимого объёма кода, а также перед созданием PR.
tools: Read, Grep, Glob, Bash
model: sonnet
---

Ты senior-инженер, проводящий ревью. Ты НЕ редактируешь файлы — только анализируешь.

При вызове:
1. Выполни `git diff` (и `git diff --staged`), сфокусируйся на изменённых файлах.
2. Проверь:
   - корректность и граничные случаи
   - обработку ошибок
   - безопасность: секреты, инъекции, авторизация, валидация ввода
   - наличие тестов для нового поведения
   - дублирование и читаемость
   - соответствие правилам из CLAUDE.md
3. Верни отчёт по приоритетам (Критично / Предупреждения / Предложения), каждый пункт с `файл:строка` и конкретным исправлением.

Будь конкретным и кратким. Не хвали без причины, не придумывай проблем.

© justxor · MIT · justxor/claude-code-pro-course

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 ChrisWiles code-reviewer — a subagent for Claude Code that checks newly written or modified code against project standards, TypeScript strict mode, and security patterns. CX Codex ★ 6,091repo stars 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 gem-reviewer official github gem-reviewer is a GitHub Copilot subagent that performs independent reviews of plans, code, and configurations. It identifies risks and potential issues in development workflows. CX Codex +1 ★ 41,430repo stars code-documentation-code-reviewer Seth Hobson code-documentation-code-reviewer — a code review subagent that hunts for vulnerabilities, performance bottlenecks and configuration mistakes. Useful when changes head to production and you want a second pass. CX Codex ★ 42,780repo stars gsd-code-reviewer davepoon The gsd-code-reviewer subagent inspects code changes for bugs, vulnerabilities, and quality flaws, saving findings to REVIEW.md. It runs through /gsd:code-review or directly. CX Codex ★ 3,785repo stars security-reviewer shinpr security-reviewer weighs finished code against the security rules your project set for itself and answers with the fixes that cannot be skipped. CX Codex ★ 720repo stars thermos cursor thermos runs two code-review subagents in parallel as background tasks, then folds their findings into one prioritised report. CX Codex +1 2,400installs

From the same set15

The whole set →
debugger The debugger subagent reproduces errors and failing tests, tracks down their cause, then checks the fix. Use it when a stack trace or unexpected behavior needs investigation. CX Codex ★ 353repo stars docs-writer docs-writer — a subagent that updates README, API docs, code comments, and ADRs whenever your code changes. It verifies actual behavior and keeps examples aligned with reality. CX Codex ★ 353repo stars pr-description pr-description generates clear pull request titles and descriptions by inspecting branch commits and diffs against main. CX Codex +1 ★ 353repo stars architect The architect subagent examines a project before implementation, compares design options, and lays out a change plan. Use it to scope a feature or a major refactor. CX Codex ★ 353repo stars write-tests write-tests generates unit tests for a chosen file or function while matching existing project patterns. It runs new checks and flags discovered bugs instead of bending assertions. CX Codex +1 ★ 353repo stars commit This skill reviews your working changes and creates a git commit in Conventional Commits format. Use it when you want an agent to make a commit that follows the repository’s message style. CX Codex +1 ★ 353repo stars refactor Runs refactoring as a sequence of small, behavior-preserving steps. Use it when you ask the agent to split a module or remove duplication. CX Codex +1 ★ 353repo stars release-notes Generates release notes and CHANGELOG entries between Git tags or from the latest tag to HEAD using Conventional Commits. CX Codex +1 ★ 353repo stars

Project sponsors

Companies that keep this analytics open