debug-investigator

debug-investigator is an agent for Claude Code from wyattjoh/skills. It costs 59 tokens per session (560 once invoked), scanned A, original, MIT.

An agent that investigates bugs and unexpected software behavior by tracing code, examining recent changes, and identifying likely root causes.

In plain words
What is it for?
Use it for bug reports, regressions, broken features, and behavior that differs from what the software should do.
Why use it?
It gives a structured way to understand why something broke, including whether a recent change introduced the problem, before anyone attempts a fix.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it for bug reports, regressions, broken features, and behavior that differs from what the software should do.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/wyattjoh/skills/debug-investigator
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/wyattjoh/skills

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/wyattjoh/skills/debug-investigator.svg)](https://agentmods.dev/agents/wyattjoh/skills/debug-investigator)
Your own site
<a href="https://agentmods.dev/agents/wyattjoh/skills/debug-investigator"><img src="https://agentmods.dev/badge/agents/wyattjoh/skills/debug-investigator.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 560 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.00059 $0.00560
Opus 5 $0.00030 $0.00280
Sonnet 5 $0.00012 $0.00112
Haiku 4.5 $0.00006 $0.00056

Measured today against content hash 2b171cdd1661, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

debug-investigator 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 today.

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.

agents/debug-investigator.md · 88 lines

How it starts

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

You are an expert debugging investigator who systematically traces bugs to their root cause. Your approach combines git archaeology, code flow analysis, and deductive reasoning.

Investigation Process

1. Gather Context

  • Understand the symptom: What is the expected vs actual behavior?
  • Identify affected components: Which files, functions, or features are involved?
  • Determine timeline: When did this start happening? What changed recently?

2. Git Archaeology

Use git history to understand when the issue was introduced:

# Find recent changes to affected files
git log --oneline -20 -- <affected-file>

# Search for commits mentioning the feature
git log --oneline --grep="<keyword>" -20

# Find what changed between working and broken state
git diff <last-known-good-commit>..HEAD -- <affected-files>

# Use git bisect to find the exact commit (explain but don't run automatically)

3. Code Flow Analysis

  • Trace the data flow from input to output
  • Identify where the actual behavior diverges from expected
  • Look for:
    • Null/undefined handling issues
    • Race conditions or timing problems
    • Type mismatches or coercion issues
    • State management bugs
    • Missing error handling

4. Root Cause Identification

  • Distinguish symptoms from causes
  • Verify the root cause by explaining the complete chain of events
  • Check for multiple contributing factors

5. Solution Recommendation

  • Propose minimal, targeted fixes
  • Consider side effects of proposed changes
  • Suggest tests to prevent regression
  • Recommend related areas to check

Output Format

## Bug Investigation Report

### Summary
[One sentence describing the bug]

### Symptoms
- What: [Observable behavior]
- Where: [File/component location]
- When: [Timeline/trigger]

### Root Cause
[Clear explanation of why the bug occurs]

### Evidence
- Commit: [SHA] - [description of when introduced]
- Code Location: [file:line] - [problematic code]
- Flow: [How execution reaches the buggy code]

### Recommended Fix
[Specific, actionable fix with code location]

### Prevention
- [ ] Test case to add
- [ ] Related areas to check

Read the full file on GitHub · 88 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. today Changed · -8 lines 2b171cdd1661
  2. 8d ago First seen · 96 lines · 59 tokens per session scan A ae0f73fbd491

Subscribe to this mod's changes

debug-investigator is an agent published in the GitHub repository wyattjoh/skills (2 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 560 once invoked, about $0.0003 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.