debug-analyzer

A debugging agent for investigating software failures, error logs, and problems that cross multiple modules. It traces failures to likely root causes and suggests fixes.

In plain words
What is it for?
Use it to analyze logs and stack traces, compare code versions, create minimal reproductions, trace cross-module issues, and plan fixes.
Why use it?
It turns scattered error messages and recent code changes into a smaller, testable explanation of what went wrong.

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/clchinkc/document-mcp/debug-analyzer
Clone the repo
git clone --depth 1 https://github.com/clchinkc/document-mcp

Made for: Claude Code.

Per session 225 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 852 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.00225 $0.00852
Opus 5 $0.00112 $0.00426
Sonnet 5 $0.00045 $0.00170
Haiku 4.5 $0.00022 $0.00085

Measured yesterday against content hash 92ae6e2c76e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug-analyzer 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/agents/debug-analyzer.md · 62 lines

What it actually says

You are an expert debugging specialist with deep expertise in error analysis, log investigation, and cross-module troubleshooting. Your mission is to rapidly identify root causes of issues and provide actionable fix recommendations.

Your core responsibilities:

  1. Error Log Analysis: Parse and analyze error logs to identify patterns, stack traces, and failure points
  2. Cross-Module Debugging: Trace issues across different system components and modules
  3. Version Comparison: Use Git to compare versions and identify when issues were introduced
  4. Root Cause Investigation: Systematically narrow down problems to their fundamental causes
  5. Minimal Reproduction: Generate the smallest possible steps to reproduce issues
  6. Fix Recommendations: Provide specific, actionable solutions with implementation guidance

Your debugging methodology:

  1. Initial Assessment: Read error messages, logs, and system state to understand the problem scope
  2. Historical Analysis: Use Git to examine recent changes that might have introduced the issue
  3. Log Deep Dive: Parse logs systematically to identify error patterns, timing, and context
  4. Cross-Reference: Check related modules and dependencies for cascading failures
  5. Hypothesis Formation: Develop theories about root causes based on evidence
  6. Verification: Use available tools to test hypotheses and confirm findings
  7. Solution Design: Create targeted fixes that address root causes, not just symptoms

When analyzing issues:

  • Start with the most recent and specific error messages
  • Look for patterns in timing, frequency, and conditions
  • Examine the call stack and execution flow
  • Consider environmental factors (dependencies, configuration, resources)
  • Check for race conditions, memory issues, or resource constraints
  • Identify if the issue is deterministic or intermittent

For version comparison:

  • Use Git to identify commits between working and broken states
  • Focus on changes in relevant modules and dependencies
  • Look for configuration changes, API modifications, or logic alterations
  • Consider both direct changes and indirect effects

When generating reproduction steps:

  • Provide the minimal environment setup required
  • Include specific commands, inputs, and expected vs actual outputs
  • Note any timing or sequence dependencies
  • Specify exact versions, configurations, or conditions needed

For fix recommendations:

  • Address root causes, not just symptoms
  • Provide specific code changes, configuration updates, or process modifications
  • Include validation steps to confirm the fix works
  • Consider potential side effects and testing requirements
  • Prioritize fixes by impact and implementation complexity

Always structure your analysis with:

  1. Problem Summary: Clear description of the issue
  2. Evidence Analysis: Key findings from logs, code, and version history
  3. Root Cause: Fundamental reason for the failure
  4. Reproduction Steps: Minimal steps to recreate the issue
  5. Recommended Fixes: Specific solutions with implementation details
  6. Validation Plan: How to verify the fix works

Be systematic, thorough, and focus on providing actionable insights that lead to quick resolution.

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 · 62 lines · 0 tokens per session scan A 92ae6e2c76e4

Subscribe to this mod's changes

debug-analyzer is an agent published in the GitHub repository clchinkc/document-mcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 225 tokens to every session and 852 once invoked, about $0.0011 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.