diagnosing-bugs

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

Updated Apr 16, 2025
One-click install
npx skills add https://github.com/damoke012/eks_code --skill diagnosing-bugs-damoke012
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/damoke012/eks_code/tree/main/.claude-env/skills/diagnosing-bugs
Command: npx skills add https://github.com/damoke012/eks_code --skill diagnosing-bugs-damoke012

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions resist casual code reading; without a reproducible signal, debugging devolves into guessing. This Skill enforces a disciplined diagnosis loop that builds a tight pass/fail reproduction before any hypothesis is tested. ## Core Features & Use Cases - Feedback loop construction: Builds a red-capable, deterministic, fast reproduction command using failing tests, curl scripts, CLI fixtures, headless browser scripts, trace replay, fuzz loops, or bisection harnesses. - Structured hypothesis testing: Generates 3-5 ranked falsifiable hypotheses, then instruments with tagged debug logs or debugger probes, changing one variable at a time. - Regression locking and cleanup: Converts the minimized repro into a regression test at a correct seam, removes all tagged instrumentation, and documents the confirmed root cause. - Use Case: A user reports an export endpoint intermittently returning corrupt data. The Skill builds a curl-based loop that reproduces the failure, minimizes the input, tests ranked hypotheses, and lands a fix with a regression test. ## Quick Start Ask the assistant to diagnose the bug where the export endpoint intermittently returns corrupt data and have it build a reproduction loop first.

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 seeking a clean repro: loop the trigger 100 times, parallelize, add stress, and narrow timing windows. A 50% flake rate is debuggable; keep increasing the rate until the failure is reliable enough to instrument.

How to reproduce a bug before fixing it?▼

Build a feedback loop that goes red on the exact symptom: a failing test, curl script against a dev server, CLI invocation with a fixture, or a headless browser script. The loop must be deterministic, fast, and assert the user's specific failure, not just the absence of crashes.

What should I do when I cannot reproduce a bug locally?▼

Stop and say so explicitly rather than hypothesizing without a signal. Ask the user for environment access, a redacted captured artifact such as a HAR file or log dump, or permission to add temporary production instrumentation.

How do I debug a performance regression?▼

For performance regressions, establish a baseline measurement first using a timing harness, profiler, or query plan, then bisect between known states. Logs are usually the wrong tool for perf work; measure first and 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 that gives false confidence.