Code Reviewer subagent
Claude Code subagent file in VoltAgent/awesome-claude-code-subagents (quality security). Tools: Read, Write, Edit, Bash, Glob, Grep. Model: inherit.
- Subagent
VoltAgent
Subagent
Claude Code subagent file in VoltAgent/awesome-claude-code-subagents (quality security). Tools: Read, Write, Edit, Bash, Glob, Grep. Model: sonnet.
Checked 2026-10-31
mkdir -p .claude/agents && curl -o .claude/agents/debugger.md https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/04-quality-security/debugger.mdCommands come from the project's own docs or registry entry. Check them against the source before you run them.
Loading poll...
The debugger subagent is a short Markdown file in Claude Code's documentation. Add it to .claude/agents/ and Claude can hand failures to a specialist that captures the error, narrows down the failing spot, makes the smallest fix it can and checks that the fix works, all in its own context window. Unlike the code reviewer, it can edit files. We checked the docs on 31 October 2026.
Source | Claude Code docs, "Example subagents", on code.claude.com/docs/en/sub-agents |
Maintainer | Anthropic |
Form | One Markdown file with YAML frontmatter and a system prompt |
Name |
|
Tools |
|
Model | Not set. Claude Code picks one by its model order |
Install location |
|
Writes files | Yes, through Edit; Bash can write as well |
Licence | The docs page states no licence for the example text, so treat it as a starting point and write your own version |
Cost | Free file. Its requests count toward your usage limits |
The docs introduce it as "a subagent that can both analyze and fix issues", and contrast it with the reviewer: "Unlike the code reviewer, this one includes Edit because fixing bugs requires modifying code. The prompt provides a clear workflow from diagnosis to verification."
From Claude Code's docs:
---
name: debugger
description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
tools: Read, Edit, Bash, Grep, Glob
---
You are an expert debugger specializing in root cause analysis.
When invoked:
1. Capture error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify solution works
Debugging process:
- Analyze error messages and logs
- Check recent code changes
- Form and test hypotheses
- Add strategic debug logging
- Inspect variable states
For each issue, provide:
- Root cause explanation
- Evidence supporting the diagnosis
- Specific code fix
- Testing approach
- Prevention recommendations
Focus on fixing the underlying issue, not the symptoms.Field | Value | Effect |
|---|---|---|
|
| The identifier. Required |
| "Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues." | What Claude reads to decide when to delegate. Required |
|
| An allowlist. The agent can read, search, edit existing files and run commands |
No model is set. Per the docs, when you leave it out Claude Code uses its model order: the CLAUDE_CODE_SUBAGENT_MODEL setting if you have one, otherwise generally the main conversation's model. If you run an expensive model in the main thread, the debugger will too, unless you set model: sonnet or similar.
Notice what is missing from the tool list: Write. The tools reference describes Edit as making targeted edits to specific files, and Write as the tool for creating files. A fix that needs a new file, such as a regression test, would have to go through Bash, or you add Write. For a debugger we think you want a regression test, so consider adding Write.
The prompt gives five steps, and they are the part worth keeping:
Then a process list: read logs and errors, check recent changes, form and test hypotheses, add strategic debug logging and inspect variable states. This is how experienced developers debug. It also keeps a model from guessing at a fix on the first plausible theory.
For each issue it must report the root cause, the evidence, a specific code fix, a testing approach and prevention advice. The line "Focus on fixing the underlying issue, not the symptoms" is the key instruction. Without it, models tend to wrap the failing line in a try-catch and call it done. With it, the agent is asked to explain why the bug happens, and to show evidence.
Code reviewer | Debugger | |
|---|---|---|
Job | Find problems in a diff | Find the cause of a failure and fix it |
Tools | Read, Grep, Glob, Bash | Read, Edit, Bash, Grep, Glob |
Edits files | No (no Edit or Write) | Yes |
Model field |
| Not set |
Trigger | After writing or modifying code | When errors or failures appear |
Output | Critical, Warnings, Suggestions | Root cause, evidence, fix, test, prevention |
Both appear on the same docs page and both say "use proactively" or "use immediately", which means Claude may delegate without being asked. See the code reviewer subagent for the other half.
mkdir -p .claude/agents
$EDITOR .claude/agents/debugger.mdPaste the file above. Put it in .claude/agents/ and commit it, so your team shares it. Use ~/.claude/agents/debugger.md for a personal copy across projects. Claude Code watches both folders and picks up an edit within a few seconds. A restart is needed for the first agent file in a brand-new agents directory.
Priority matters if names clash. The docs order sources as managed settings, the --agents flag, project agents, user agents and plugin agents. A project debugger beats a user one with the same name.
For a quick session-only version, the docs show the --agents flag with JSON:
claude --agents '{
"debugger": {
"description": "Debugging specialist for errors and test failures.",
"prompt": "You are an expert debugger. Analyze errors, identify root causes, and provide fixes."
}
}'That one gives no tools field, so it inherits every tool available to subagents. It is the broadest version, which is worth knowing before you use it.
If the file does not load, run claude --debug and search the log. Claude Code skips a file with no name or no description, and the reason appears only in the debug log.
Codex uses TOML files in .codex/agents/ or ~/.codex/agents/, each with name, description and developer_instructions. Codex ships built-in agents named default, worker and explorer, and its docs describe worker as "execution-focused agent for implementation and fixes", which is close to this role. Our adaptation, in .codex/agents/debugger.toml:
name = "debugger"
description = "Debugging specialist for errors, test failures and unexpected behavior."
model_reasoning_effort = "high"
developer_instructions = """
You are an expert debugger focused on root cause analysis.
1. Capture the error message and stack trace.
2. Identify reproduction steps.
3. Isolate the failure location.
4. Implement the minimal fix.
5. Verify the fix by re-running the failing command.
Report: root cause, evidence, the fix, how you tested it, and how to prevent a repeat.
Fix the underlying issue, not the symptoms.
"""Codex's docs say custom agents inherit the parent's permissions, provider and MCP servers, and that sandbox and approval settings in an agent file do not override the parent's. So how much this agent can change is decided by your Codex session, not the file.
OpenCode reads Markdown agents from .opencode/agents/ or ~/.config/opencode/agents/. The file name becomes the agent name. Our adaptation, in .opencode/agents/debugger.md:
---
description: Debugging specialist for errors, test failures and unexpected behavior
mode: subagent
temperature: 0.1
---
You are an expert debugger. Capture the error and stack trace, find the reproduction
steps, isolate the failing code, make the smallest fix and verify it by re-running.
Report the root cause, evidence, the fix, how you tested it and how to prevent a repeat.
Fix the cause, not the symptom.A low temperature suits debugging, and OpenCode's docs list temperature as an option, with values from 0.0 to 1.0. OpenCode's permission block can allow or ask for edit and bash. OpenCode's permissions page says each rule resolves to allow, ask or deny. For a debugger we would set both to ask at first.
Antigravity CLI describes subagents as concurrent background agent sessions, managed with /agents. We found no documented file format for defining a custom one, in Antigravity or in the Cursor pages we read, so check their docs. If your agent lacks custom subagents, paste the prompt body into the project rules file and ask for the workflow by name.
The example is generic. Ideas that fit its structure:
npm test -- --runInBand" beats "verify solution works".model.maxTurns stops a spiral of retries. The docs say the output returns marked as partial and Claude can resume it. That marking needs Claude Code v2.1.246 or later.isolation: worktree runs it in a temporary git worktree, so experiments never touch your working tree.memory field lets it keep notes across sessions, such as a flaky test's known cause.PostToolUse hook after Edit can run your linter, for instance.The file costs nothing. The agent's requests count against the same usage limits as your main conversation, per the docs. Debugging can be token-heavy, because logs and stack traces are long and the agent loops through run, read, edit and re-run. Two habits help: give it the exact failing command, and let the subagent hold the noisy logs, so only the summary returns to your main thread. That second point is a main reason to use a subagent at all. The docs say to use one when a side task "would flood your main conversation with search results, logs, or file contents you won't reference again".
Request | What happens |
|---|---|
"The checkout test is failing. Debug it." | Claude delegates, the agent runs the test, reads the trace, finds the cause, edits, re-runs |
"Why does this endpoint return 500 only in production?" | It reads logs and code, forms hypotheses. Without prod access it will tell you what it cannot see |
"Find the cause but do not change anything" | Say so. The agent has Edit, so state the limit in the request, or use a reviewer-style variant without Edit |
"Fix this, then review the fix" | Debugger in one subagent, code reviewer in another |
AskUserQuestion among tools removed from subagents.Option | Fits when | Notes |
|---|---|---|
This subagent | You want a debug workflow in Claude Code | Free, editable |
You want review, not fixes | No Edit tool | |
You want the general mechanism | Scope, models, hooks | |
You want ready-made agents to browse | Other debuggers exist | |
The failure is in production and tracked in Sentry | Gives the agent real stack traces | |
The bug is in the browser | Console, network and performance | |
You need to reproduce a UI bug | Scripted browser | |
You want structured step-by-step reasoning | A reasoning aid, not a debugger |
Pair this subagent with an error source. A debugger is only as good as the evidence it can reach, and Sentry or browser tooling gives it real traces.
The strength of this example is the workflow, not the file format. Capture, reproduce, isolate, minimal fix, verify is what a careful developer does, and writing it down stops a model from skipping to a guess. The closing line about symptoms versus causes is the best sentence in it.
We would change three things before using it. Add a regression-test path, so a fix leaves proof. Narrow Bash with permission rules, since Edit plus Bash is a lot of power. And add a stop rule, so a stuck agent reports instead of looping. Then read each diff the way you would read a junior developer's pull request.
This is our reading of the documentation, not a hands-on test.
.claude/agents/debugger.md with the example.maxTurns limit.isolation: worktree.See also the Claude Code cheat sheet.
A Markdown file that defines a debugging specialist for Claude Code, with a diagnose-fix-verify workflow.
The debugger can edit files. The reviewer cannot.
In .claude/agents/ for a project or ~/.claude/agents/ for all projects.
No. Claude Code picks one by its model order.
Yes, through Bash. Restrict Bash if the repo is sensitive.
Tried it with one of these? Vote below: works for me, or not.
A Markdown file from Claude Code's docs that defines a specialist for errors, test failures and unexpected behaviour. It captures the error, finds the failing spot, makes a minimal fix and verifies it, in its own context window.
The reviewer cannot edit files. The debugger includes the Edit tool, because fixing a bug means changing code. Its tools are Read, Edit, Bash, Grep and Glob.
In .claude/agents/debugger.md for a project or ~/.claude/agents/debugger.md for all your projects.
No. The example omits the model field, so Claude Code picks the model by its subagent model order, which usually follows the main conversation.
Yes, through Bash, which is in its tool list. That is also what makes it powerful and what you should watch.
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: inherit.
VoltAgent
The all-in-one WordPress community stack
Also ours: wbcomdesigns.comvapvarun.combrndle.com