debug-RCA

A step-by-step debugging command for finding the cause of a reported software problem.

In plain words
What is it for?
Use it for runtime errors, logic bugs, and performance problems by checking logs, recent changes, traces, timings, and minimal test cases.
Why use it?
It gives developers a repeatable way to reproduce an issue, inspect evidence, narrow its location, and compare expected with actual behavior.

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/mort-lab/excel-mcp/debug-rca
Clone the repo
git clone --depth 1 https://github.com/mort-lab/excel-mcp

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 592 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00000 $0.00592
Opus 5 $0.00000 $0.00296
Sonnet 5 $0.00000 $0.00118
Haiku 4.5 $0.00000 $0.00059

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

Security

Grade A, and why

debug-RCA scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Test with curl/Postman first
Origin

This is a copy

100% identical to debug-RCA — 220 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/development/debug-RCA.md · 109 lines

How it starts

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

Debug Issue

Systematically debug and diagnose the reported problem.

Problem Description

$ARGUMENTS

Debugging Process

  1. Reproduce the Issue

    • Get exact steps to reproduce
    • Verify you can see the same problem
    • Note any error messages or logs
    • Document the expected vs actual behavior
  2. Gather Information

    # Check recent changes
    git log --oneline -10
    
    # Look for error patterns in logs
    # Search for related error messages
    
  3. Isolate the Problem

    • Binary Search: Comment out code sections to narrow down
    • Git Bisect: Find when the bug was introduced
    • Logging: Add strategic log statements
    • Debugger: Set breakpoints if applicable
  4. Common Debugging Strategies

    For Runtime Errors

    • Read the full stack trace
    • Identify the exact line causing the error
    • Check variable values at that point
    • Verify assumptions about data types

    For Logic Errors

    • Add print/log statements to trace execution
    • Verify each step produces expected results
    • Check boundary conditions
    • Test with minimal reproducible example

    For Performance Issues

    • Add timing measurements
    • Check for N+1 queries
    • Look for inefficient algorithms
    • Profile if necessary

    For Integration Issues

    • Verify external service is accessible
    • Check authentication/credentials
    • Validate request/response formats
    • Test with curl/Postman first
  5. Root Cause Analysis

    • Why did this happen?
    • Why wasn't it caught earlier?
    • Are there similar issues elsewhere?
    • How can we prevent this class of bugs?
  6. Implement Fix

    • Fix the root cause, not just symptoms
    • Add defensive programming if needed
    • Consider edge cases
    • Keep fix minimal and focused, follow KISS
  7. Verify Resolution

    • Confirm original issue is fixed
    • Check for regression
    • Test related functionality
    • Add test to prevent recurrence
  8. Document Findings

Read the full file on GitHub · 109 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 · 109 lines · 0 tokens per session scan A 5e23896bfbe0

Subscribe to this mod's changes

debug-RCA is a command published in the GitHub repository mort-lab/excel-mcp (5 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 592 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to debug-RCA, differing in 220 lines, and is treated as a copy.