debug

A read-only procedure for investigating problems found during manual testing. It examines logs, stored data when relevant, Git state, and the difference between expected and actual behavior.

In plain words
What is it for?
Collecting the steps to reproduce an issue, checking application errors and recent changes, verifying database or file state, and reporting likely causes.
Why use it?
It helps identify the cause of a problem without changing the files or system state being investigated.

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/pyrex41/skill-manager/debug
Clone the repo
git clone --depth 1 https://github.com/pyrex41/skill-manager

Made for: Claude Code.

Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 562 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.00009 $0.00562
Opus 5 $0.00005 $0.00281
Sonnet 5 $0.00002 $0.00112
Haiku 4.5 $0.00001 $0.00056

Measured yesterday against content hash 161fa740bead, 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 yesterday.

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/cl/debug.md · 103 lines

How it starts

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

Debug

You are tasked with investigating issues encountered during manual testing. This is a read-only investigation command.

Getting Started

If given a plan/ticket file: Acknowledge the file and ask: "What specifically went wrong? What were you testing?"

If invoked without parameters: Ask: "What issue are you encountering? Please describe:

  • What you were trying to do
  • What happened instead
  • When did it last work correctly (if known)"

Available Investigation Tools

Logs

  • Application logs in standard locations
  • Service-specific logs
  • Error logs and stack traces

Database (if applicable)

  • Query current state
  • Check recent events/transactions
  • Verify data consistency

Git State

  • Current branch and commits
  • Uncommitted changes
  • Recent history

Investigation Process

Step 1: Understand the Problem

  • Read any context provided (plan, ticket, description)
  • Check git status for current state
  • Identify what should be happening vs. what is happening

Step 2: Investigate in Parallel

Spawn parallel task agents to examine:

  • Logs: Look for errors, warnings, unexpected patterns
  • State: Check database or file state
  • Code: Verify the implementation matches expectations

Step 3: Present Findings

Structure your debug report:

## Debug Report

### Problem Summary
[What went wrong in one sentence]

### Evidence Found

#### From Logs
- [Relevant log entries with timestamps]
- [Error messages or stack traces]

#### From State
- [Database state or file contents]
- [Expected vs. actual values]

#### From Code
- [Relevant code paths]
- [Any mismatches between implementation and expectation]

### Root Cause Analysis
[Most likely explanation based on evidence]

### Recommended Next Steps
1. [First thing to try]
2. [Alternative if that doesn't work]
3. [Escalation path if needed]

### What I Couldn't Check
- [Things outside investigation scope]
- [Missing access or tools]

Important Constraints

  • This is investigation only - no file editing
  • Focus on evidence - don't speculate without data
  • Be systematic - check logs, state, and code
  • Present clearly - make findings easy to act on

Read the full file on GitHub · 103 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. yesterday First seen · 103 lines · 9 tokens per session scan A 161fa740bead

Subscribe to this mod's changes

debug is a command published in the GitHub repository pyrex41/skill-manager (3 stars, last pushed 6mo ago), licensed MIT. It adds 9 tokens to every session and 562 once invoked, about $0.0000 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-31.