debug

debug is a command for Claude Code from juanmhidalgo/claude-plugins. It costs 31 tokens per session (1,657 once invoked), scanned A, original, MIT.

A command for diagnosing errors or unexpected software behavior before attempting a fix.

In plain words
What is it for?
Use it for failing tests, broken builds, regressions, and problems in the user interface, backend, database, build tools, external services, or tests themselves.
Why use it?
It provides a step-by-step investigation that preserves evidence, identifies the failing part, fixes the underlying cause, and verifies the result.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the debug plugin — 2 skills, 2 commands shipped together

Good fit Use it for failing tests, broken builds, regressions, and problems in the user interface, backend, database, build tools, external services, or tests themselves.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/juanmhidalgo/claude-plugins/debug
Install

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.

Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Made for: Claude Code.

Or install debug, the plugin that ships this one along with the rest of its 2 skills, 2 commands.

Wrote 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.

agentmods badge for debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/debug/github.svg)](https://agentmods.dev/commands/juanmhidalgo/claude-plugins/debug)
Your own site
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/debug"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/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.

agentmods 80×15 button for debug

Your own site · 80×15
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/debug"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,657 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.01657
Opus 5.5 $0.00012 $0.00663
Sonnet 5.5 $0.00006 $0.00331
Haiku 4.5 $0.00003 $0.00166

Measured 2d ago against content hash 4a5e6a559b7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debug scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Start with a failing test at whatever level reaches the bug. If that doesn't fit, see [feedback-loops.md](../skills/debugging-strategies/references/feedback-loops.md) for the other ways to build one (curl script, CLI dif
debug/commands/debug.md · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

  • Branch: !git branch --show-current
  • Recent commits: !git log --oneline -10

<best_practices> @debug/skills/debugging-strategies/SKILL.md </best_practices>

Systematic Debugging Workflow

Error or failing behavior: $ARGUMENTS

Follow the Stop-the-Line Rule. Do NOT add new features or push past failures.

Step 1: Build a feedback loop (gate)

Everything after this step consumes a feedback loop: one command that goes red on this bug and green once it is fixed. With one, the cause gets found; without one, reading code produces theories, not answers. Spend the effort here.

Start with a failing test at whatever level reaches the bug. If that doesn't fit, see feedback-loops.md for the other ways to build one (curl script, CLI diff, headless browser, replayed capture, bisect harness, differential run) and for flaky and performance bugs.

Exit criterion. Name ONE command that you have already run, and show it with its output (secrets redacted), that is:

  • Red-capable: it drives the real code path and asserts the user's exact symptom, not "it didn't crash"
  • Deterministic: same verdict every run (for a flaky bug, a pinned and high reproduction rate)
  • Fast: seconds, not minutes
  • Agent-runnable: it runs without a human clicking. The one exception is a human-run script (way 10 in the reference) when nothing else reaches the bug: say so, and the user's run of it counts as the command

No such command, no Step 2. If you notice yourself reading code to build a theory before it exists, come back here.

If you cannot build one, stop and say so: list what you tried, then ask the user for (a) access to an environment that reproduces it, (b) a redacted captured artifact (HAR file, log dump, request payload), or (c) permission to add temporary instrumentation. During a live incident, mitigation may come before the loop (see /debug:incident).

Read the full file on GitHub · 152 lines

Changes

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.

  1. 2d ago Changed · +25 lines 4a5e6a559b7f
  2. 1mo ago First seen · 127 lines · 31 tokens per session scan A 0efea248a1eb

Subscribe to this mod's changes

debug is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 2d ago), licensed MIT. It adds 31 tokens to every session and 1,657 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.