code_reviewer — Claude Code subagent for code review
The code_reviewer Claude Code subagent reviews code changes for defects, security risks, and test gaps. It takes a diff and relevant repository context as input.
no license ★ 776 updated 2026-11-12
.claude/agents/code_reviewer.mdWhat code_reviewer does
code_reviewer examines a change set and returns a Markdown report with an overall assessment, review scope, and findings ranked by severity. Each finding includes its location, likely consequence, a practical fix, and a way to verify it. The report also states plainly when it finds no actionable issue.
Findings must be supported by the diff or repository context; speculation cannot be presented as fact. The agent needs the changes and relevant details about surrounding code, requirements, or tests. It does not claim tests passed without evidence that they ran.
What it helps with
- spot defects in a diff and describe their consequences
- identify security and performance risks in code changes
- check whether tests cover the changed behavior
- get a concrete fix for each actionable finding
Example prompts for the agent
- Review this diff and suggest fixes for confirmed issues.
- Check these changes for security risks and point to the affected code.
- Assess whether the tests cover these changes and suggest verification steps.
How to install code_reviewer
Manually: put the files in place
.claude/agents/code_reviewer.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/code_reviewer.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/code_reviewer.mdCursor also reads .claude/agents/
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?
Add the agent file at .claude/agents/code_reviewer.md.
What does code_reviewer do?
It reviews code changes and produces a Markdown report with evidence, consequences, fixes, and verification suggestions for its findings.
What should I provide to code_reviewer?
Provide the changes as a diff, patch, changed files, or code excerpt, along with relevant repository context such as requirements and test evidence.