klh-systematic-debugging

Diagnose bugs through a four-phase root cause analysis methodology.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/klh/skills --skill klh-systematic-debugging-klh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: klh-systematic-debugging
Source: https://github.com/klh/skills/tree/main/.well-known/agent-skills/klh-systematic-debugging
Command: npx skills add https://github.com/klh/skills --skill klh-systematic-debugging-klh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often apply quick patches that mask symptoms instead of fixing the underlying issue, leading to recurring bugs and regressions. This Skill enforces a disciplined debugging process that requires identifying the root cause before any fix is attempted. ## Core Features & Use Cases - Four-Phase Framework: Root cause investigation, pattern analysis, hypothesis testing, and verified implementation. - Five Failure Modes Checklist: Explicitly checks for hallucinated actions, scope creep, cascading errors, context loss, and tool misuse during reviews. - Scenario Playbooks: Step-by-step procedures for test failures, runtime errors, regressions, and intermittent failures. - Use Case: When a test suite fails after a refactor, use this Skill to trace the failing assertion back through the call chain, form a single hypothesis, and implement one verified fix instead of trial-and-error patching. ## Quick Start Use the systematic debugging skill to investigate why this test is failing and find the root cause before fixing it.

Frequently Asked Questions about klh-systematic-debugging

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

FAQPage Schema
How do I debug a failing test systematically?

Read the full error message and stack trace, identify which assertion failed, verify the test setup and fixtures, then trace the unexpected value back to its source. Form one hypothesis, test it, and only then implement a fix.

What is root cause analysis in debugging?

Root cause analysis traces an error from where it manifests back through the call chain to where the problem actually originated. The goal is to fix the original trigger rather than patching symptoms where the error appears.

How do I debug intermittent test failures?

Intermittent failures usually indicate race conditions, shared mutable state, async ordering issues, or timing dependencies. Add deterministic waits or proper synchronization, and reproduce the failure consistently before attempting a fix.

When should I stop trying to fix a bug?

Stop after three consecutive failed fix attempts. Repeated failures signal architectural problems rather than a simple bug, so document your findings and discuss the design with the team before continuing.

How do I find which commit introduced a bug?

Use git bisect to binary-search the commit history and identify the exact breaking change. Then compare the change with the previous working version to find which assumption was violated.