diagnosing-bugs

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

2|Updated May 12, 2026
One-click install
npx skills add https://github.com/tajo9128/BioDockify-Pharma-AI --skill diagnosing-bugs-tajo9128
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/tajo9128/BioDockify-Pharma-AI/tree/main/.agents/skills/diagnosing-bugs
Command: npx skills add https://github.com/tajo9128/BioDockify-Pharma-AI --skill diagnosing-bugs-tajo9128

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and flaky performance regressions resist casual code reading; without a tight, reproducible pass/fail signal, debugging devolves into guessing. This Skill enforces a disciplined diagnosis loop that builds a red-capable reproduction command before any hypothesis is tested. ## Core Features & Use Cases - Feedback Loop Construction: Ten ranked strategies for building a tight reproduction signal, from failing tests and curl scripts to Playwright browser automation, trace replay, fuzz loops, and git bisect harnesses. - Structured Six-Phase Process: Build the loop, reproduce and minimise, generate 3-5 ranked falsifiable hypotheses, instrument with tagged debug logs, fix with a regression test, then clean up and post-mortem. - Non-Deterministic Bug Handling: Techniques to raise reproduction rates via stress loops, parallelisation, and timing injection until flaky bugs become debuggable. - Use Case: A user reports an intermittent API failure after a deploy. The Skill guides building a curl-based loop that reproduces the failure, minimising the input, ranking hypotheses, instrumenting with [DEBUG-xxxx] logs, and landing a fix with a regression test. ## Quick Start Ask the agent to diagnose the bug where the export endpoint intermittently returns a 500 error 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 intermittently?

Raise the reproduction rate instead of chasing a clean repro: loop the trigger 100 times, parallelise execution, add stress, and inject sleeps to narrow timing windows. A bug reproducible 50% of the time is debuggable; at 1% it is not, so keep increasing the rate first.

How to reproduce a bug before fixing it?

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

What is the best way to debug performance regressions?

Measure first, fix second: establish a baseline with a timing harness, performance.now(), a profiler, or a query plan, then bisect between known-good and known-bad states. Logging is usually the wrong tool for performance work because it cannot capture timing behaviour accurately.

Can git bisect be automated for debugging?

Yes. Build a bisection harness that boots the system at a given state, runs the check, and exits with a status code, then pass it to git bisect run. This works when the bug appeared between two known commits, dataset versions, or configuration states.

Why should debug logs be tagged with a unique prefix?

Tagging every debug log with a unique prefix like [DEBUG-a4f2] makes cleanup a single grep operation after the fix. Untagged logs tend to survive in the codebase permanently, while tagged logs are guaranteed to be removed during the cleanup phase.

When should you not write a regression test for a bug fix?

Skip the regression test when no correct seam exists, meaning no test location can exercise the real bug pattern as it occurs at the call site. A shallow test gives false confidence; instead document the missing seam as an architectural finding worth addressing separately.