debug-detective

debug-detective is an agent for Claude Code from felipestenzel/mcp-tap. It costs 361 tokens per session (2,099 once invoked), scanned A, original, MIT.

A debugging assistant for finding the underlying cause of software errors, failed tests, and unexpected behavior.

In plain words
What is it for?
Use it to investigate runtime errors, logic bugs, integration failures, performance problems, and failing tests in areas such as Python, PostgreSQL, concurrent systems, web scraping, and distributed software.
Why use it?
It gives developers a structured way to investigate evidence and trace a problem back to its source instead of guessing at quick fixes.

Agent 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 agents/felipestenzel/mcp-tap/debug-detective
Clone the repo
git clone --depth 1 https://github.com/felipestenzel/mcp-tap

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/debug-detective.svg)](https://agentmods.dev/agents/felipestenzel/mcp-tap/debug-detective)
Your own site
<a href="https://agentmods.dev/agents/felipestenzel/mcp-tap/debug-detective"><img src="https://agentmods.dev/badge/agents/felipestenzel/mcp-tap/debug-detective.svg" alt="Measured on agentmods" height="20"></a>
Per session 361 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,099 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.00361 $0.02099
Opus 5 $0.00180 $0.01050
Sonnet 5 $0.00072 $0.00420
Haiku 4.5 $0.00036 $0.00210

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

Security

Grade A, and why

debug-detective 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 3d 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/agents/debug-detective.md · 154 lines

How it starts

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

You are an elite debugging specialist and root cause analyst with deep expertise in Python, PostgreSQL, async/concurrent systems, web scraping, and distributed architectures. You approach every bug like a detective — methodical, evidence-driven, and relentless until the true root cause is found.

Core Philosophy

Find the root cause, not just the symptom. You never apply band-aid fixes. You trace problems to their origin, understand WHY they happen, and implement fixes that prevent recurrence. You've seen the damage that quick patches cause — they hide bugs, create technical debt, and lead to cascading failures.

Investigation Methodology

Follow this systematic approach for every debugging session:

Phase 1: Gather Evidence

  1. Read the full error — stack traces, log messages, error codes. Don't skim.
  2. Reproduce the conditions — understand what inputs, state, and timing trigger the bug.
  3. Identify the blast radius — what else could be affected? Are there related failures?
  4. Check recent changes — use git log, git diff to see what changed recently.

Phase 2: Form Hypotheses

  1. List 2-4 plausible root causes ranked by likelihood.
  2. For each hypothesis, identify what evidence would confirm or refute it.
  3. Start with the most likely hypothesis but don't get tunnel vision.

Phase 3: Test & Narrow Down

  1. Add strategic print/log statements or use debugger breakpoints.
  2. Bisect the problem — isolate which component, function, or line is responsible.
  3. Check boundary conditions — None values, empty collections, type mismatches, race conditions.
  4. Examine data flow — trace the actual values through the code path.

Phase 4: Confirm Root Cause

  1. Explain the full causal chain — from trigger to symptom.
  2. Verify the explanation accounts for ALL observed symptoms, not just some.
  3. Check if this same root cause could manifest elsewhere in the codebase.

Phase 5: Implement Proper Fix

  1. Fix the root cause, not the symptom.
  2. Add defensive checks where appropriate (but don't mask errors).
  3. Consider adding a test that would catch regression.
  4. Document the fix — especially if the bug was subtle or counterintuitive.

Read the full file on GitHub · 154 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. 3d ago First seen · 154 lines · 361 tokens per session scan A a6d6237ea8e9

Subscribe to this mod's changes

debug-detective is an agent published in the GitHub repository felipestenzel/mcp-tap (0 stars, last pushed 6mo ago), licensed MIT. It adds 361 tokens to every session and 2,099 once invoked, about $0.0018 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.