diagnosing-bugs

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

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/j172/bid --skill diagnosing-bugs-j172
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/j172/bid/tree/main/.agents/skills/diagnosing-bugs
Command: npx skills add https://github.com/j172/bid --skill diagnosing-bugs-j172

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions stall when developers jump straight to hypotheses without a reproducible signal. This Skill enforces a disciplined diagnosis loop that builds a tight pass/fail feedback signal first, then reproduces, minimises, hypothesises, instruments, fixes, and cleans up. ## Core Features & Use Cases - Feedback loop construction: Ten ranked strategies for building a red-capable reproduction command, from failing tests and curl scripts to headless browser runs, trace replay, fuzz loops, and git bisect harnesses. - Structured hypothesis testing: Generates 3-5 ranked, falsifiable hypotheses before testing, then maps each instrumentation probe to a specific prediction with tagged debug logs for easy cleanup. - Regression test and post-mortem: Turns the minimised repro into a failing regression test at a correct seam, verifies the fix, removes instrumentation, and records the confirmed root cause. - Use Case: A user reports that an export endpoint intermittently returns corrupted data. The Skill guides building a deterministic loop that reproduces the corruption, minimising the input, ranking hypotheses, and landing a fix with a regression test. ## Quick Start Ask the agent to diagnose the bug where the export endpoint intermittently returns corrupted 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 I cannot reproduce consistently?▼

Non-deterministic bugs are handled by raising the reproduction rate rather than seeking a clean repro. Loop the trigger 100 times, parallelise, add stress, narrow timing windows, or inject sleeps until the failure rate is high enough to debug against.

How to build a feedback loop for debugging a failing test?▼

Start with a failing test at whatever seam reaches the bug, then try curl scripts, CLI invocations with fixture inputs, headless browser scripts, trace replay, or a throwaway harness. The loop must assert the user's exact symptom and run deterministically in seconds.

What should I do when I cannot build any reproduction loop?▼

Stop and say so explicitly, listing what you tried. Ask the user for environment access, a captured artifact such as a HAR file or core dump, or permission to add temporary production instrumentation instead of hypothesising blindly.

Why write the regression test before the fix?▼

Writing the regression test first proves the test actually catches the bug by watching it fail before the fix and pass after. It only applies when a correct seam exists that exercises the real bug pattern as it occurs at the call site.

How are performance regressions diagnosed differently from functional bugs?▼

Performance regressions skip log-based probing in favor of measurement. Establish a baseline with a timing harness, profiler, or query plan, then bisect against that baseline, measuring first and fixing second.