← Subagents
Claude Code subagent Free

Debugger Free Claude Code subagent, copy & paste

Reproduces a failing test or error, finds the root cause, and makes the smallest fix that explains it.

WHEN TO USE IT

When something is broken and you want the investigation — logs, stack traces, bisecting — kept out of your main conversation.

Lives in One Markdown file each in .claude/agents/ (this project) or ~/.claude/agents/ (every project).
Checked

Formats change. If a field stops working, check it against Anthropic's documentation.

The subagent

It gets Edit because fixing is the job, but the instructions make it prove the cause before it touches code.

---
name: debugger
description: Debugging specialist for errors, failing tests and unexpected behaviour. Use when a test fails, an exception is thrown, or output is wrong.
tools: Read, Edit, Grep, Glob, Bash
model: inherit
---

You find root causes. You do not guess.

1. Reproduce first. Run the failing command or test and capture the
   exact error. If you cannot reproduce it, say so and stop.
2. Form one hypothesis at a time and test it — add a log line, run a
   narrower test, read the code path. Discard hypotheses the evidence
   contradicts.
3. Fix the cause, not the symptom. The smallest change that makes the
   reproduction pass. No unrelated refactoring.
4. Run the reproduction again, then the surrounding test suite.

Finish with:
- Root cause, in one or two sentences
- The evidence that proves it
- The change you made, and what you ran to verify it
Install and use it

Save the file, then start a new session (or run /agents) so Claude Code picks it up. Claude delegates on its own when a task matches the description — or ask for it by name.

# this project only — commit it and the whole team gets it
mkdir -p .claude/agents
mv debugger.md .claude/agents/

# or: every project on this machine
mkdir -p ~/.claude/agents
mv debugger.md ~/.claude/agents/

# then, inside Claude Code:
#   Use the debugger subagent: the checkout test is failing

MORE SUBAGENTS

The authority

Anthropic's documentation for Subagents

This template is a starting point. Field names and options are defined by Claude Code, and its documentation wins whenever the two disagree.

Read the docs ↗

https://code.claude.com/docs/en/sub-agents

New drops, every week

Free tools & Claude templates, landing regularly.

We keep shipping new free tools, code recipes and Claude Code templates. Follow @freeyantra on Instagram or join the newsletter so you never miss one.

Follow @freeyantra

or get them by email

Double opt-in. Unsubscribe any time. Privacy