reviewer · ruvnet — Claude Code subagent: what it does, how to install
A reviewer persona for Claude that reads a change like a senior engineer: behaviour, security holes, slow paths, standards, docs. You get a summary with critical issues.
no license ★ 850 updated 2026-10-26
.claude/agents/reviewer.mdWhat reviewer does
The agent takes the role of a senior reviewer and goes over a change on five fronts: what the code actually does, where it can be attacked, what will be slow, how it sits with the project's conventions, and whether the docs keep up. The file ships worked examples of the usual offenders — a raw userId interpolated into SQL, a password written to the log, a loop that fires one query per user, a class holding four unrelated jobs.
Two hooks bracket the run. Ahead of the review it pulls similar past reviews from claude-flow memory, including cases where problems slipped through, and writes a five-point checklist. Afterwards it saves a scored record of the outcome and, when nothing critical surfaced and more than 10 issues were found, starts a pattern training pass with npx claude-flow neural train.
Both hooks shell out to npx claude-flow. On a machine without that CLI the memory lookups and the training step never happen; you are left with the written checklist and whatever the model can do from the agent file alone.
What it helps with
- catch an SQL injection in the payment handler
- drop the N+1 when loading users with their posts
- check whether one class is doing persistence, email and reports at once
- produce a review summary with critical issues and strengths
- match the API docs against what the code really does
Example prompts for the agent
- Review
src/api/payments.tsfor amount validation and unsafe database queries. - Walk this pull request and point out slow paths like N+1 lookups.
- Write up a review of the
ordersmodule with critical issues first.
How to install reviewer
Manually: put the files in place
.claude/agents/reviewer.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/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/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 reviewer
How do I install reviewer in Claude Code?
Place the subagent file at .claude/agents/reviewer.md.
What does reviewer do?
It reviews code on five fronts: behaviour, security, performance, coding standards and documentation. The output leads with strengths, then lists critical issues with line references.
Do the hooks need claude-flow?
Yes. Both hooks call npx claude-flow — one searches stored reviews, the other records the score and runs pattern training. Without that CLI those steps do not run.
Similar subagents
All subagents for Code review and refactoring →reviewer by other authors comes first.