Create a read-only Claude Code reviewer
Give a review subagent only the file-reading tools it needs.
Originally posted · Published here · 1 source · Resume reading
A Claude Code subagent can review files with its own instructions and restricted tools. The official documentation includes a reviewer that has Read, Glob and Grep, without editing tools. [1]
Create the reviewer file
Save this configuration, based on the documented reviewer example, as .claude/agents/code-reviewer.md in your project: [1]
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---
Review the specified files. Report concrete defects and their locations.The project directory shares the agent with that repository. A personal agent belongs under ~/.claude/agents/. The body supplies its instructions; the frontmatter selects its tools and model. [1]
Give it a specific review
Ask Claude to use the code-reviewer on a named file or change. Inspect the returned findings against the code. This tool list cannot run tests, so a review from this agent does not establish that the tests passed.
Keep fixes in a separate step. Review the proposed edits before applying them.
Keep this guide
Filed under Claude Code
Sources
- Claude Code custom subagentscode.claude.com
Next in this stack
Keyword SPEC
Five Claude Code habits for spec-first development
Keyword HOOKLIGHT
Use Claude Code hooks for status notifications
Keyword SLIDES
Choose a slide tool for Claude Code