debug

debug is a command for Claude Code from adrian-d-hidalgo/nestjs-mcp-server. It costs 75 tokens per session (2,417 once invoked), scanned A, original, MIT.

A bug-investigation coordinator that examines symptoms, GitHub issues, error traces, and failing tests to find the likely underlying cause.

In plain words
What is it for?
Use it to investigate software bugs, review existing issue reports, analyze stack traces, and understand failing tests.
Why use it?
It keeps investigation separate from guessing, checks whether an issue has enough information, and avoids proposing a fix before the evidence supports one.

Command for Claude Code

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.

agentmods
npx agentmods add commands/adrian-d-hidalgo/nestjs-mcp-server/debug
Clone the repo
git clone --depth 1 https://github.com/adrian-d-hidalgo/nestjs-mcp-server

Made for: Claude Code.

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/adrian-d-hidalgo/nestjs-mcp-server/debug.svg)](https://agentmods.dev/commands/adrian-d-hidalgo/nestjs-mcp-server/debug)
Your own site
<a href="https://agentmods.dev/commands/adrian-d-hidalgo/nestjs-mcp-server/debug"><img src="https://agentmods.dev/badge/commands/adrian-d-hidalgo/nestjs-mcp-server/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,417 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00075 $0.02417
Opus 5 $0.00037 $0.01208
Sonnet 5 $0.00015 $0.00483
Haiku 4.5 $0.00007 $0.00242

Measured 5d ago against content hash 037d76c24b3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 5d 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.

.claude/commands/debug.md · 143 lines

How it starts

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

In every route the debugger agent is the executor of the deep RCA — you do not replicate its work; you invoke the agent. You load the bug-diagnosis skill as the process guide (the deprecation check, evidence before assertion, the reproduction ladder, the certainty bar) and the github-issues skill for the Mode B shape and the authorization contract.

Always propose; never create or comment without authorization.

Rows 5 and 6 are the pair most often confused. The test: does something exist and behave wrongly (bug), or does it not exist (capability)?

  • Symptom route: what fails, which export or decorator, which transport, expected vs actual.
  • Issue route: reproduction steps, the three versions (@nestjs-mcp/server, @nestjs/common, @modelcontextprotocol/sdk), the transport, expected vs actual. If a critical piece is missing → propose asking in the issue's comments and do not advance to the RCA until it is answered.
  • Failing-test route: the full failure output, not the first line.

Once the musts are met, continue and run the diagnosis (via the agent). Never invent or assume a cause, a reproduction, a duplicate, or a fix. CLAUDE.md: "A fix grounded in [Inference] is not done — get the evidence or say you couldn't and stop."

Issue route — an existing GitHub issue. 0. Check the workspace.project/tasks/issue-<N>/notes.md. If it exists, read it before investigating. It records what was already tried and ruled out; re-running a dead end is the specific waste it exists to prevent. If spec.md exists too, this issue already has an approved analysis — say so, because a new RCA may invalidate it.

  1. Read the issue and its comments (issue_read, get then get_comments) — what the reporter describes, in their words. The comments usually carry the versions and the "it also happens when…" that the body lacks.
  2. Judge report sufficiency against the Musts. If a critical piece is missing → propose a comment asking for it (add_issue_comment, under authorization — commenting on a public issue is a mutation) and do NOT advance to the RCA until it is answered. Never assume the missing facts.
  3. Light discovery. search_issues for another issue on the same symptom, open and closed. A match → STOP and raise it with a recommendation (add evidence to the existing one vs open a new one); a closed match means a regression — a new issue linking back, never a reopen. Then continue at the Shared close.

Read the full file on GitHub · 143 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. 5d ago First seen · 143 lines · 75 tokens per session scan A 037d76c24b3a

Subscribe to this mod's changes

debug is a command published in the GitHub repository adrian-d-hidalgo/nestjs-mcp-server (38 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 2,417 once invoked, about $0.0004 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.