debugging

A structured command for investigating software problems through quick triage, known-issue searches, testable hypotheses, and recorded team knowledge. It can investigate without changing the main repository or use an isolated worktree—a separate working directory for changes.

In plain words
What is it for?
Use it to investigate errors such as API timeouts, search existing team knowledge, test possible causes, document the outcome, and optionally make changes in a separate worktree.
Why use it?
It replaces ad-hoc debugging with a repeatable investigation and reduces the chance of repeating solutions the team already knows. Isolation allows experimental fixes without directly altering the main working copy.

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/yassinello/claude-plugin-prd-workflow/debugging
Clone the repo
git clone --depth 1 https://github.com/Yassinello/claude-plugin-prd-workflow

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,042 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.00010 $0.04042
Opus 5 $0.00005 $0.02021
Sonnet 5 $0.00002 $0.00808
Haiku 4.5 $0.00001 $0.00404

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

Security

Grade A, and why

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

.claude/commands/debugging.md · 699 lines

How it starts

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

Debugging Command

Fast, systematic debugging with hypothesis testing and team knowledge capture, with optional worktree isolation.

Purpose

Transform chaotic debugging into efficient investigation with:

  • Quick triage and pattern recognition
  • Known issues search before reinventing solutions
  • Hypothesis-driven testing
  • Team knowledge documentation

NEW in v0.4.4: Automatic context detection - run from Main OR from worktree directly! v0.4.3: Support for worktree isolation with --worktree flag for debugging sessions requiring code modifications.

Context Detection (Auto)

The /debugging command automatically detects where you run it from:

From Main Repository

# Working directory: ~/Documents/watchora
$ /debugging "Check API timeout"
→ Behavior: Read-only investigation on Main (default)
→ Optional: Add --worktree for code modifications

From Debug Worktree

# Working directory: ~/Documents/watchora/worktrees/debug
$ /debugging "Check API timeout"
→ Behavior: Automatically uses worktree (no --worktree needed!)
→ Syncs, locks, creates branch, works in current directory

Key Point: If you have a dedicated Cursor window open on worktrees/debug/, you can use /debugging directly from there!

Usage

# From Main: Investigate on Main (read-only, quick)
/debugging "Check why API returns 500"

# From Main: With worktree isolation (modifications needed)
/debugging "Memory leak in WebSocket handler" --worktree

# From Worktree: Auto-detects worktree context
cd worktrees/debug/
/debugging "Memory leak issue"  # Automatically uses worktree!

# Manage active session (works from anywhere)
/debugging --resolve          # Complete and document
/debugging --abort            # Cancel session
/debugging --status           # Show current status
/debugging --pause            # Pause session
/debugging --resume           # Resume paused session

# Migrate from Main to worktree
/debugging --to-worktree      # Move current session to worktree

# List past sessions
/debugging --list             # Show all debug sessions

Read the full file on GitHub · 699 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 First seen · 699 lines · 10 tokens per session scan A 148649bdd5f3

Subscribe to this mod's changes

debugging is a command published in the GitHub repository Yassinello/claude-plugin-prd-workflow (12 stars, last pushed 9mo ago), licensed MIT. It adds 10 tokens to every session and 4,042 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.