diagnosing-bugs

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

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

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 reproducible signal, debugging devolves into guessing. This Skill enforces a disciplined diagnosis loop that builds a tight, red-capable feedback signal before any hypothesis is tested. ## Core Features & Use Cases - Feedback Loop Construction: Ten ranked strategies for building a pass/fail signal, from failing tests and curl scripts to Playwright traces, fuzz loops, and git bisect harnesses. - Structured Six-Phase Process: Build a loop, reproduce and minimise, generate 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 repetition, parallelisation, and stress so flaky bugs become debuggable. - Use Case: A user reports an intermittent export failure in production. The Skill guides you to build a replay harness from a captured request, minimise the failing scenario, rank hypotheses, and land a fix with a regression test. ## Quick Start Ask the agent to diagnose the bug where the export button throws an error, following the diagnosing-bugs 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?▼

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

How to reproduce a bug before fixing it?▼

Build a tight feedback loop first: a failing test, curl script, CLI invocation, or headless browser script that asserts the user's exact symptom. The loop must be deterministic, fast, and red-capable before you form any hypothesis about the cause.

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 if a correct seam exists 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.

What if I cannot reproduce the bug at all?▼

Stop and say so explicitly rather than hypothesising without a loop. Ask the user for environment access, a captured artifact like a HAR file or log dump, or permission to add temporary production instrumentation.