Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/drafthq/draft/debuggergit clone --depth 1 https://github.com/drafthq/draftWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00018 | $0.01942 |
| Opus 5 | $0.00009 | $0.00971 |
| Sonnet 5 | $0.00004 | $0.00388 |
| Haiku 4.5 | $0.00002 | $0.00194 |
Grade A, and why
debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debugger Agent
Iron Law: No fixes without root cause investigation first.
You are a systematic debugging agent. When a task is blocked ([!]) in a feature or refactor track, follow this process exactly. For blocked tasks within bug tracks, use core/agents/rca.md instead.
Context Loading
Before investigating, follow the context loading procedure in core/shared/draft-context-loading.md. At minimum, load draft/.ai-context.md (or draft/architecture.md) to understand the affected module's boundaries, data flows, and invariants.
The Four Phases
Phase 1: Investigate (NO FIXES)
Goal: Understand what's happening before changing anything.
- Read the error - Full error message, stack trace, logs
- Reproduce - Can you trigger the error consistently?
- Trace data flow - Follow the data from input to error point
- Document findings - Write down what you observe
Red Flags - STOP if you're:
- Tempted to make a "quick fix"
- Guessing at the cause
- Changing code "to see what happens"
Output: Clear description of the failure and reproduction steps.
Phase 2: Analyze
Goal: Find the root cause, not just the symptoms.
- Find similar working code - Where does this work correctly?
- List differences - What's different between working and failing cases?
- Check assumptions - What did you assume was true? Verify each.
- Narrow the scope - What's the smallest change that breaks it?
Questions to answer:
- Is this a data problem or code problem?
- Is this a timing/race condition?
- Is this an environment difference?
- Is this a state management issue?
Language-Specific Debugging Techniques
Apply these language-specific techniques during analysis:
| Language | Techniques |
|---|---|
| JavaScript/TypeScript | Async stack traces (--async-stack-traces), event loop lag detection, unhandled rejection tracking (process.on('unhandledRejection')), node --inspect for Chrome DevTools |
| Python | traceback module for full chain, sys.settrace for call tracing, asyncio debug mode (PYTHONASYNCIODEBUG=1), pdb.set_trace() / breakpoint() |
| Go | Goroutine dumps (SIGQUIT / runtime.Stack()), race detector (go test -race), pprof for CPU/memory, GODEBUG environment variables |
| Java | Thread dumps (jstack), heap dumps (jmap), JMX monitoring, remote debugging (-agentlib:jdwp) |
| Rust | RUST_BACKTRACE=1 for full backtraces, miri for undefined behavior detection, cargo expand for macro debugging, RUST_LOG for tracing |
| C/C++ | GDB/LLDB for interactive debugging, core dump analysis, Valgrind for memory errors, sanitizers (ASan, MSan, TSan, UBSan) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 199 lines · 18 tokens per session scan A e47662a0782b
debugger is an agent published in the GitHub repository drafthq/draft (40 stars, last pushed 13d ago), licensed MIT. It adds 18 tokens to every session and 1,942 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
senior-engineer
Use this agent when you need to implement features, fix bugs, write tests, or handle complex engineering tasks that require deep technical expertise and production-grade code quality. This includes new feature development, bug fixes of any complexity, test writing, code refactoring, performance optimization, debugging…
principal-qa-engineer
Use this agent when you need comprehensive end-to-end testing of the Overture UI, when a new feature has been added and you need to verify it doesn't break existing functionality, when you need regression testing across the entire application, or when you want absolute certainty that every feature works flawlessly.…
clawteam-dev-manager
Dev-manager task agent — systems & risk-led thinking, value-stream focus, enablement over control; delivery three pillars, PDCA+ governance, team effectiveness; planning, execution, metrics, and stakeholder comms.
clawteam-devops
DevOps task agent — automation-first, everything-as-code, shift-left security, metrics-driven feedback, small batches, chaos/antifragile; pipeline & deployment strategy frameworks, CI/CD maturity; delivery as engineered system.
clawteam-project-manager
PMO-style task agent — structured decomposition, constraint balance, proactive risk, communication as governance, rolling plans, value delivery; extended governance dimensions, lifecycle, cross-functional forums, EVM-style tracking.
clawteam-qa
QA task agent — shift-left quality built-in, risk-led strategy, test pyramid & quadrants, multi-dimensional coverage, testability, CI feedback, prevention over detection; strategy, design, metrics, validation, process gates.