diagnosing-bugs

Diagnose hard bugs and performance regressions through a structured feedback-loop workflow.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/dulltackle/kangkang-skills --skill diagnosing-bugs-dulltackle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/dulltackle/kangkang-skills/tree/main/diagnosing-bugs
Command: npx skills add https://github.com/dulltackle/kangkang-skills --skill diagnosing-bugs-dulltackle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions resist casual code reading and single-hypothesis guessing. This Skill enforces a disciplined six-phase diagnosis loop that builds a tight, red-capable feedback signal before any hypothesis is tested, preventing wasted effort on unfalsifiable theories. ## Core Features & Use Cases - Feedback Loop Construction: Builds a deterministic, fast, agent-runnable pass/fail signal using failing tests, curl scripts, headless browser runs, trace replays, fuzz loops, or bisection harnesses. - Structured Hypothesis Testing: Generates 3-5 ranked, falsifiable hypotheses, then instruments with tagged debug logs or debugger breakpoints, changing one variable at a time. - Regression Lockdown: Writes the regression test before the fix at a correct seam, then cleans up all debug instrumentation and throwaway prototypes. - Use Case: A user reports that an export endpoint intermittently returns corrupted data. The Skill guides building a curl-based loop that reproduces the failure at a high rate, minimising the repro, ranking hypotheses, and landing a fix with a regression test. ## Quick Start Ask the agent to diagnose the failing export endpoint by building a reproduction loop and following the phased debugging workflow.

Frequently Asked Questions about diagnosing-bugs

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

FAQPage Schema
How do I debug a bug that only happens sometimes?

For non-deterministic bugs, raise the reproduction rate instead of chasing a clean repro: loop the trigger 100 times, parallelise, add stress, and narrow timing windows. A 50%-flake bug is debuggable; keep increasing the rate until the failure is frequent enough to instrument.

How to reproduce a bug before fixing it?

Build a tight feedback loop first: a failing test, curl script, CLI invocation, or headless browser run that asserts the user's exact symptom. The loop must be deterministic, fast, and able to go red on this specific bug before any hypothesis is tested.

What is the best way to debug performance regressions?

For performance regressions, avoid log-based debugging. Establish a baseline measurement with a timing harness, profiler, or query plan, then bisect between known-good and known-bad states. Measure first, fix second.

When should I write a regression test for a bug fix?

Write the regression test before the fix, but only at a correct seam where the test exercises the real bug pattern as it occurs at the call site. If no correct seam exists, document that architectural gap instead of writing a shallow test.

Why does single-hypothesis debugging fail on hard bugs?

Single-hypothesis debugging anchors on the first plausible idea and wastes time. Generate 3-5 ranked, falsifiable hypotheses with explicit predictions before testing any of them, and show the list to the user for domain-knowledge re-ranking.