debug

Trace call and data flows to diagnose bugs and propose minimal fixes.

Updated Sep 9, 2024
One-click install
npx skills add https://github.com/axel-kaliff/dotfiles --skill debug-axel-kaliff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/axel-kaliff/dotfiles/tree/main/claude/.claude/skills/debug
Command: npx skills add https://github.com/axel-kaliff/dotfiles --skill debug-axel-kaliff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a disciplined, repeatable workflow to discover the true root cause of bugs, test failures, and unexpected runtime behavior so fixes address the underlying fault rather than superficial symptoms.

Core Features & Use Cases

  • Reproduce & Observe: Capture exact error output, failing test traces, and the file:line of runtime exceptions to establish a reliable reproduction.
  • Trace & Diagnose: Follow call chains upward and data origins backward, use git history or blame when intent is unclear, and apply the Five Whys to escalate from symptom to design assumption.
  • Hypothesis-driven Testing: Generate 2–3 distinct hypotheses, gather targeted evidence, and report concise hypothesis results before changing code.
  • Scope, Trade-offs & Minimal Fix: Classify fixes as in-scope, adjacent, or out-of-scope, weigh trade-offs, request user approval when appropriate, and aim for minimal, validated changes that resolve the whole class of failures.

Quick Start

Ask the skill to analyze a specific failing test or error by providing the full error output, relevant file:line, and any recent code changes so it can produce hypotheses, evidence-to-collect, and a recommended minimal fix.

Frequently Asked Questions about debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is root cause analysis for debugging and when should I use it?

Root cause analysis for debugging is a structured workflow to find the true underlying fault causing unexpected behavior or failing tests. Use it when superficial symptom fixes fail to resolve recurring runtime exceptions or test failures across codebases.

How do I debug a failing test using hypothesis-driven troubleshooting?

Debug a failing test by first reproducing the exact error trace, then generate two to three distinct hypotheses for the root cause. Gather targeted evidence for each hypothesis before changing code to ensure the fix resolves the entire class of failures.

What's the best way to trace call chains and data flows to diagnose runtime exceptions?

The best way to diagnose runtime exceptions is to follow call chains upward and trace data origins backward. Use git history or blame to clarify code intent, then apply the Five Whys technique to escalate from the symptom to the faulty design assumption.

Can I use git history to understand unexpected production behavior and code intent?

Yes, you can use git blame and history to understand code intent when diagnosing unexpected production behavior. Tracing recent code changes helps establish reliable reproduction steps and provides context for generating accurate root cause hypotheses.

How do I scope a minimal fix for a bug without introducing adjacent code changes?

Scope a minimal fix by classifying potential changes as in-scope, adjacent, or out-of-scope. Weigh the trade-offs of each approach, request user approval when appropriate, and aim for the smallest validated change that resolves the whole class of failures.

Why does my root cause analysis keep finding symptoms instead of the underlying fault?

Root cause analysis finds symptoms instead of faults when it skips reproduction or fails to generate distinct hypotheses. Require exact error output reproduction, trace data origins backward, and apply the Five Whys to escalate from superficial symptoms to the true design assumption.