Debugger subagent
Claude Code subagent file in VoltAgent/awesome-claude-code-subagents (quality security). Tools: Read, Write, Edit, Bash, Glob, Grep. Model: sonnet.
- Subagent
VoltAgent
Subagent
Claude Code subagent file in VoltAgent/awesome-claude-code-subagents (quality security). Tools: Read, Write, Edit, Bash, Glob, Grep. Model: inherit.
Checked 2026-10-31
mkdir -p .claude/agents && curl -o .claude/agents/code-reviewer.md https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/04-quality-security/code-reviewer.mdCommands come from the project's own docs or registry entry. Check them against the source before you run them.
Loading poll...
The code-reviewer subagent is a short Markdown file from Claude Code's documentation. Drop it in .claude/agents/ and Claude gets a specialist that reads your latest git diff, checks it against a review list and reports findings in three priority groups, all inside its own context window. The docs call it read-only, but it keeps the Bash tool, so read the safety section. We checked the docs on 31 October 2026.
Source | Claude Code documentation, "Example subagents" section on code.claude.com/docs/en/sub-agents |
Maintainer | Anthropic |
Form | One Markdown file with YAML frontmatter and a system prompt |
Name |
|
Tools in the example |
|
Model in the example |
|
Install location |
|
Licence | Not stated for the example text on the docs page. |
Cost | Free file. The subagent's requests count toward your usage limits |
Restart needed | Usually not. Claude Code watches the agents folders |
This is not a package or a plugin. It is about 30 lines of text you can read in a minute. The value is in how it is built, and what you change for your team.
This is the example from Claude Code's docs.
---
name: code-reviewer
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
tools: Read, Grep, Glob, Bash
model: inherit
---
You are a senior code reviewer ensuring high standards of code quality and security.
When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately
Review checklist:
- Code is clear and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation implemented
- Good test coverage
- Performance considerations addressed
Provide feedback organized by priority:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider improving)
Include specific examples of how to fix issues.Field | Value | What it does |
|---|---|---|
|
| The identifier. Only |
| "Expert code review specialist. Proactively reviews ... Use immediately after writing or modifying code." | The text Claude reads to decide when to delegate |
|
| An allowlist. Leaving out Edit and Write blocks direct file edits |
|
| Uses the same model as your main conversation |
The description does the routing. Claude's docs say "Claude uses each subagent's description to decide when to delegate tasks". The words "Proactively" and "Use immediately after writing or modifying code" invite automatic delegation. If you do not want a review after every small edit, change the description to something like "Use when the user asks for a review". The docs also warn that descriptions cost context. When the combined descriptions of all your custom subagents go past 15,000 tokens, Claude Code warns at startup.
The body is the system prompt. A subagent gets only that prompt plus basic environment details such as the working directory. It does not get Claude Code's own system prompt. So the prompt has to carry everything the agent needs to know.
It has three parts:
git diff, focus on modified files, start reviewing. That anchors the review to recent changes, not the whole repository, which keeps it fast and cheap.Claude Code docs also list three reasons to use a subagent: it preserves context by keeping exploration out of your main thread, it enforces constraints through limited tools, and it can route work to cheaper models. A reviewer fits the first two well.
Create the file in your project:
mkdir -p .claude/agents
$EDITOR .claude/agents/code-reviewer.mdPaste the file above. Check .claude/agents/ into version control so your team shares and improves it. For all projects, use ~/.claude/agents/code-reviewer.md instead. Claude Code watches both folders and picks up an added or edited file within a few seconds. Three cases need a restart: the first agent file in a brand-new agents directory, edits in a folder added with --add-dir, and sessions started with --disable-slash-commands.
The docs say you can ask Claude to write a subagent for you. The /agents command lists the ones you have. If a file does not load, run claude --debug and look in the log for the reason. Claude Code skips a file with no name, or with a name but no description, and it writes the reason only to the debug log. You can also run claude plugin validate .claude/agents to find frontmatter that does not parse.
claude --agents '{
"code-reviewer": {
"description": "Expert code reviewer. Use proactively after code changes.",
"prompt": "You are a senior code reviewer. Focus on code quality, security, and best practices.",
"tools": ["Read", "Grep", "Glob", "Bash"],
"model": "sonnet"
}
}'This is from the same docs page. It is not saved to disk, which suits testing and scripts.
You can let Claude delegate automatically, or ask: "Use the code-reviewer subagent to look at my last commit". See subagents for the full picture of invoking, foreground and background runs.
Not the same file. Codex custom agents are TOML files in ~/.codex/agents/ or .codex/agents/, and each needs name, description and developer_instructions. Codex's own docs include a reviewer example. Our adaptation of this page's checklist, in .codex/agents/reviewer.toml:
name = "reviewer"
description = "Code reviewer for recent changes. Use after code is written or modified."
model_reasoning_effort = "medium"
developer_instructions = """
Review the recent git diff like an owner. Do not edit files.
Check readability, naming, duplication, error handling, secrets, input validation,
test coverage and performance. Report Critical, Warnings and Suggestions,
with a concrete fix for each.
"""The Codex docs say custom agents inherit the parent's permissions, provider and MCP servers, and that settings like sandbox_mode in the agent file do not override the parent. So the "do not edit" rule here lives in the instructions, not in a tool allowlist. To limit the agent's tools, Codex lets you set feature keys such as features.shell_tool to false.
OpenCode takes Markdown files in ~/.config/opencode/agents/ or .opencode/agents/, or a JSON agent block in opencode.json. The file name becomes the agent name. Our adaptation, in .opencode/agents/code-reviewer.md:
---
description: Reviews recent changes for quality, security and maintainability
mode: subagent
permission:
edit: deny
---
You are a senior code reviewer. Run git diff, focus on modified files, and report
Critical issues, Warnings and Suggestions, with a specific fix for each.This follows OpenCode's agents page, whose own example denies edit for a reviewer. OpenCode's permission block is closer to real enforcement than a prompt line, because it controls the tool itself. [VERIFY: whether bash: deny blocks git diff and whether a bash allow rule for git diff * is the right fix, on opencode.ai/docs/permissions].
Antigravity CLI describes subagents as concurrent background agent sessions you monitor with /agents. We found no documented file format for custom subagents on the pages we read.. Gemini CLI is now Code Assist enterprise only.
. We have not confirmed that it reads Claude Code's .claude/agents/ files.
The docs describe this example as "a read-only subagent that reviews code without modifying it". The reason given is that it excludes Edit and Write. That is true as far as it goes. But Bash is in the allowlist, and a shell can write files, run git commit, delete things and call the network. The subagent also inherits your permission rules, so what it can do with Bash depends on what you allow. In the docs, a subagent inherits the parent's permission rules.
So "read-only" here is a convention, not a guarantee. Options, in rising strictness:
Option | How | Trade-off |
|---|---|---|
Rely on the prompt | Keep the example as is | Cheapest, weakest |
Limit Bash by permission rules | Allow only | Needs setup, works across agents |
Drop Bash |
| The reviewer can no longer run |
Use a hook | A | More work, most control |
Use |
| Inherits more than you may want |
The docs say disallowedTools is applied first, then tools, and that a specifier such as Bash(git push *) in disallowedTools still removes the whole Bash tool. Do not rely on that for fine-grained blocking. Use permission rules or hooks for that. [VERIFY: how permission rules with Bash(git diff *) patterns apply inside a subagent, on code.claude.com/docs/en/permissions].
The example is generic. A reviewer earns its keep when it knows your rules. Ideas that follow from the file's structure:
tests/".model: sonnet or haiku makes reviews cheaper. inherit follows the main model, which may be your most expensive.maxTurns stops a runaway review and returns partial output, which the docs say you can resume. Partial marking needs Claude Code v2.1.246 or later, per the docs.skills field injects full skill content at startup, so the reviewer can load your team's checklist as a skill. See skills.memory field (user, project or local) lets it learn across sessions, for example which false positives you dismissed.isolation: worktree runs the agent in a temporary git worktree, so even a stray write does not touch your checkout.color helps you spot it in the task list.The file is free. The subagent sends its own requests, and they count toward the same usage limits as your main conversation, per the docs. A review of a small diff is cheap. A review of a large diff, with Grep and Read calls across many files, is not. Routing it to a smaller model with the model field is the main lever. Keep diffs small, and ask for review per commit, not per day.
Request | What happens |
|---|---|
"Review my last commit" | Claude delegates, the subagent runs |
"Review the auth changes only" | The subagent narrows to those paths, if you name them |
"Review and then fix the critical issues" | Review in the subagent, then fixes in the main thread, which has Edit |
"Run the reviewer in the background while I keep working" | The docs describe foreground and background runs. Background subagents keep a limited set of built-in tools |
A good pattern from the docs' own wording: the reviewer reports, the main conversation fixes. That keeps the reviewer's context clean and avoids a reviewer marking its own homework.
.claude/agents/ is code your team runs. Review changes to it like changes to a CI script.git diff shows. A diff of staged and committed changes can differ, so name the range you want.AskUserQuestion from subagents.claude --debug shows unknown fields.Option | Fits when | Notes |
|---|---|---|
This subagent | You want a review specialist inside Claude Code | Free, editable |
You need diagnosis and a fix, not review | Same docs page, has Edit | |
You want the general mechanism | Covers scope, models, hooks | |
You want a collection of ready-made agents | Browse before you write your own | |
You want agents, commands and settings together | Community catalog | |
You want reusable review guidance, loaded on demand | Lighter than a subagent | |
You want reviews on pull requests | Reads and comments on PRs |
It is a good example because it is small and honest about its shape: a clear description, a short tool list, a workflow, a checklist and a format. Copy it, then spend your time on the checklist, since that is where your standards live.
Two cautions. The "read-only" label oversells it while Bash is on the list, so decide how much that matters for your repo. And the proactive description can trigger reviews you did not want, which spend tokens. Start with a manual trigger, and switch to proactive once you like the output.
This is our reading of the documentation, not a hands-on test.
.claude/agents/code-reviewer.md with the example.sonnet for cost or inherit for consistency.claude --debug if it does not load.See also the Claude Code cheat sheet.
A Markdown file that gives Claude Code a review specialist working in its own context window.
In .claude/agents/ for a project or ~/.claude/agents/ for all projects.
It lacks Edit and Write, but Bash can still change things, so restrict it if that matters.
From the description field. The example invites automatic use after code changes.
Not as the same file. Both have their own formats, shown above.
Tried it with one of these? Vote below: works for me, or not.
A Markdown file with YAML frontmatter that gives Claude Code a specialist for reviewing recent changes. It runs in its own context window, reads the git diff and returns findings grouped as critical, warnings and suggestions.
In .claude/agents/ for one project, checked into version control, or ~/.claude/agents/ for all your projects. Claude Code detects the file within a few seconds in most cases.
The docs call it read-only because it lacks Edit and Write. But it includes Bash, which can run commands that change files, so for strict read-only use you must restrict Bash further.
From the description field. The example says to use it immediately after writing or modifying code, so Claude may delegate to it without being asked.
Not as the same file. Codex uses TOML files in .codex/agents/ and OpenCode uses Markdown files in .opencode/agents/ or JSON in opencode.json. The idea carries over, the file format does not.
Loading poll...
Loading reviews…
Only members can review this page. Sign in
Claude Code subagent file in VoltAgent/awesome-claude-code-subagents (quality security). Tools: Read, Write, Edit, Bash, Glob, Grep. Model: sonnet.
VoltAgent
The all-in-one WordPress community stack
Also ours: wbcomdesigns.comvapvarun.combrndle.com