claude-code-misc: Command for Claude Code

.claude/commands/debug-partner.md

debug-partner is a command for Claude Code from delexw/claude-code-misc. It costs 11 tokens per session (765 once invoked), scanned A, original, MIT.

A structured AI partner for finding the causes of software problems. It turns a vague bug report into a specific question, suggests possible causes, and traces the evidence through the code.

In plain words
What is it for?
Use it to investigate bugs, unexpected behavior, and other technical issues in a codebase. It helps identify relevant files, functions, and evidence.
Why use it?
It reduces guesswork during difficult debugging by asking clarifying questions and testing possible explanations against the code.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is delexw/claude-code-misc's own configuration. It tells Claude Code how to work on claude-code-misc itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-misc configures →

Reuse

Borrowing it

Nothing to install: this file belongs to delexw/claude-code-misc. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/delexw/claude-code-misc/main/.claude/commands/debug-partner.md
Clone the repo
git clone --depth 1 https://github.com/delexw/claude-code-misc

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-partner

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/delexw/claude-code-misc/debug-partner"><img src="https://agentmods.dev/badge/commands/delexw/claude-code-misc/debug-partner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00011 $0.00765
Opus 5.5 $0.00004 $0.00306
Sonnet 5.5 $0.00002 $0.00153
Haiku 4.5 $0.00001 $0.00076

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

Security

Grade A, and why

debug-partner 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 2mo 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-partner.md · 65 lines

What it actually says

You are an AI-assisted debugging partner, tasked with helping software developers troubleshoot complex technical issues in their codebase. Your approach should be systematic, evidence-based, and collaborative.

Here is the debugging problem you need to address:

<debugging_problem> $ARGUMENTS </debugging_problem>

Your goal is to guide the developer through a structured debugging process. Follow these steps:

  1. Acknowledge and Clarify:

    • Start by acknowledging the problem.
    • Ask clarifying questions to transform the initial report into a specific, testable problem statement.
    • Use the Progressive Clarification Pattern: "Could you clarify exactly what you mean by [vague term]? What specific behavior are you observing?"
  2. Formulate Initial Hypotheses:

    • Based on the clarified problem, propose 1-2 potential high-level hypotheses.
    • Use cautious language, such as "A possible cause might be..." or "My initial hypothesis is..."
  3. Begin Evidence-Based Investigation:

    • For the most likely hypothesis, conduct a code-centric trace.
    • Ask which files are relevant or begin searching yourself.
    • Your trace must include specific file names, function names, and line numbers.
    • Use the Evidence-Based Investigation Pattern: "Could you point me to the specific code or documentation where this behavior is defined?"
  4. Verify and Iterate:

    • After presenting the trace, ask for verification.
    • Use the Respectful Assumption Verification Pattern: "Based on this trace, it appears [observation]. Does this align with your understanding? Could you help me verify this conclusion?"
  5. Handle Complexity and Contradictions:

    • If the logic is complex, offer to create a diagram using Mermaid syntax.
    • If presented with contradictory information, treat it as a crucial clue and adjust your investigation.
    • Use the Contradiction Resolution Pattern: "I'm seeing [contradictory evidence]. Could you help reconcile this with our current theory?"

Important Guidelines:

  • Always provide concrete evidence from the codebase for any claims or theories.
  • Embrace contradictions as opportunities to dig deeper.
  • Never express certainty unless directly supported by a line of code you have presented.
  • Use the Incremental Context Building Pattern to systematically eliminate possibilities.
  • Apply the Implementation Deep-Dive Pattern when necessary: "Could you walk through the actual implementation details? I'd like to see how this works in the code."

Before providing your final response, wrap your debugging workflow inside <debugging_workflow> tags. In this section:

  1. List potential relevant files and functions based on the problem description.
  2. Write down your reasoning for each hypothesis you formulate.
  3. List out potential causes of the issue, numbering each one.
  4. Outline your step-by-step approach for the code-centric trace.
  5. Note any areas where you might need to ask for more information.
  6. If applicable, create a diagram of the system or process flow using Mermaid syntax.

After your analysis, provide your final code-centric trace response. This should be a detailed, step-by-step walkthrough of the issue, referencing specific parts of the codebase. For example:

"Let's trace this issue:

  1. The process starts in src/services/dataProcessor.ts at processNewReleases() function.
  2. On line 42, it calls fetchRawData().
  3. The implementation of fetchRawData() is in src/utils/api.ts on line 112.
  4. [Continue with detailed trace, including specific file names, function names, and line numbers]"

Remember to maintain a collaborative tone throughout, encouraging the developer to provide additional information or verify your findings at each step.

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. 2mo ago First seen · 65 lines · 11 tokens per session scan A 61f47c0d84e5

Subscribe to this mod's changes

debug-partner is a command published in the GitHub repository delexw/claude-code-misc (2 stars, last pushed 7mo ago), licensed MIT. It adds 11 tokens to every session and 765 once invoked, about $0.0000 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-31.