Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/dwarvesf/dwarves-kitnpx agentmods add commands/dwarvesf/dwarves-kit/debugWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/dwarvesf/dwarves-kit/debug)<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/debug"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/debug/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/dwarvesf/dwarves-kit/debug"><img src="https://agentmods.dev/badge/commands/dwarvesf/dwarves-kit/debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00102 | $0.03069 |
| Opus 5.5 | $0.00041 | $0.01228 |
| Sonnet 5.5 | $0.00020 | $0.00614 |
| Haiku 4.5 | $0.00010 | $0.00307 |
Grade A, and why
debug 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 1mo 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 — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are debugging a defect, regression, or test failure. You are not here to guess. Random fixes waste time and create new bugs.
Bracket the phase for timing before starting: bash lib/gate/gate-ledger.sh outcome <rid> debug start.
Scope and triggers
In a kit-adopted repo this replaces superpowers:systematic-debugging: a superset of it, adding the Phase 0 feedback loop, an on-disk ledger, and the guess-fix guard.
The Iron Law
NO FIX WITHOUT A RECORDED ROOT CAUSE.
You may not edit code to "fix" the bug until the ledger's ## Root cause is filled with the actual cause, traced to its source. A symptom patch is a failure, not a fix.
Before you start: open the ledger
Pick a short <slug> for this bug, sanitized to [a-z0-9-]+ (lowercase, digits, hyphens only; no spaces, no /, no .). Reject anything else; never let a slug contain a path separator.
Write .claude/debug/<slug>.md from this template, and append to it before each action, not after, so a context reset shows what you were about to do:
## Symptoms
(immutable: exactly what was reported, the error text, the failing test name)
## Root cause
## Evidence
(append: timestamp / what you checked / what you found / what it implies)
## Eliminated
(append: each hypothesis you falsified + the evidence that killed it)
## Fix attempts
(append: a count; the 3-fix wall reads this)
## Resolution
(the fix + the verification result)
Leave ## Root cause blank until you have actually found it. While it is blank, the anti-rationalization hook will block any guess-fix "done" claim and send you back here. That is intended.
Escaped-defect marker. If this defect traces to a SHIPPED spec whose test plan
should have caught it, record the indictment so lane telemetry can aggregate test-design
quality per spec: bash lib/gate/gate-ledger.sh action <slug> "escaped-from=<spec-slug>". Skip
when the defect predates the kit or traces to no spec; never guess the spec.
Phase 0: Build a feedback loop
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.
- 1mo ago Changed · +10 lines 3c6a43342538
- 1mo ago Changed · +12 lines f737d00a31b3
- 2mo ago Changed · +10 tokens per session 8b153ffc547e
- 2mo ago Changed · +4 lines · -39 tokens per session 4facf6c07b4c
- 2mo ago Changed · +105 tokens per session ad7f13ac388a
- 2mo ago Changed cb89c0d50587
- 2mo ago Changed d5de2fcb2377
- 3mo ago First seen · 125 lines · 26 tokens per session scan A ad0c29013378
debug is a command published in the GitHub repository dwarvesf/dwarves-kit (15 stars, last pushed yesterday), licensed MIT. It adds 102 tokens to every session and 3,069 once invoked, about $0.0004 per session on Opus 5.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.
debug compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| debugdwarvesf/dwarves-kit | Command | 15 | yesterday | MIT | A | 102 | Claude Code |
| cleanupSuperClaude-Org/SuperClaude_Framework | Command | 24k | 4d ago | MIT | A | 16 | Claude Code |
| cloudflare-durable-objects:debugsecondsky/claude-skills | Command | 257 | yesterday | MIT | A | 33 | Claude Code |
| cloudflare-durable-objects:migratesecondsky/claude-skills | Command | 257 | yesterday | MIT | A | 32 | Claude Code |
| cloudflare-durable-objects:optimizesecondsky/claude-skills | Command | 257 | yesterday | MIT | A | 32 | Claude Code |
| kiro-validate-gapgotalab/cc-sdd | Command | 3.8k | 1mo ago | MIT | A | 0 | Claude Code |
| cloudflare-queues:troubleshootsecondsky/claude-skills | Command | 257 | yesterday | MIT | A | 18 | Claude Code |