diagnosing-bugs

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

Updated Jan 19, 2023
One-click install
npx skills add https://github.com/inkfin/dotfiles --skill diagnosing-bugs-inkfin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/inkfin/dotfiles/tree/main/dot_agents/skills/exact_diagnosing-bugs
Command: npx skills add https://github.com/inkfin/dotfiles --skill diagnosing-bugs-inkfin

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 feedback signal first, then reproduces, minimizes, hypothesizes, instruments, fixes, and cleans up. ## Core Features & Use Cases - Feedback loop construction: Ten ordered strategies for building a red-capable test signal, from failing tests and curl scripts to Playwright traces, fuzz loops, and git bisect 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 and cleanup discipline: Writes regression tests at correct seams before fixing, removes all tagged instrumentation, and records the confirmed root cause in the commit message. - Use Case: A user reports an intermittent export failure in production. The Skill guides building a replay harness from a captured request, minimizing the repro, testing ranked hypotheses, and landing a fix with a regression test. ## Quick Start Ask the agent to diagnose the bug where the export button throws an error, and have it build a reproducible feedback loop before proposing any fix.

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?

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

How to diagnose a performance regression in code?

Performance regressions need measurement before fixing. Establish a baseline with a timing harness, profiler, or query plan, then bisect between known-good and known-bad states to isolate the cause.

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

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

Why write a regression test before fixing a bug?

Writing the test first proves it actually catches the bug by watching it fail, then confirms the fix by watching it pass. If no correct test seam exists, that architectural gap is itself a finding worth flagging.

Can this debugging workflow handle bugs requiring manual UI steps?

Yes, as a last resort it uses a human-in-the-loop bash script template that prompts the user through manual steps and captures their observations as structured output for the agent to parse.