diagnosing-bugs

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

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

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 six-phase 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. - Ranked Hypothesis Testing: Generates 3-5 falsifiable hypotheses, then instruments with tagged debug logs or debugger breakpoints, changing one variable at a time. - Regression Test & Cleanup Discipline: Writes the regression test before the fix at a correct seam, then removes all tagged instrumentation and throwaway prototypes. - Use Case: A user reports an intermittent export failure in production. The Skill drives creation of a replay harness from a captured request, minimises the repro, tests ranked hypotheses, and lands a fix with a regression test. ## Quick Start Diagnose this bug: the export endpoint intermittently returns a 500 error under load, build a reproduction loop and find the root cause.

Frequently Asked Questions about diagnosing-bugs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to reproduce a production bug locally?▼

Capture a real network request, payload, or event log to disk and replay it through the code path in isolation. Alternatively, build a throwaway harness that spins up a minimal subset of the system exercising the bug with a single function call.

How do I use git bisect to find a regression?▼

Automate a bisection harness that boots the code at a given state, checks for the bug, and repeats, then hand it to git bisect run. The harness must assert the exact user symptom so each bisect step returns a trustworthy pass/fail verdict.

Why should I write a regression test before the fix?▼

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 seam exists where the test exercises the real bug pattern, that architectural gap is itself a finding to flag.

When should I not use a hypothesis-first debugging approach?▼

Never hypothesise before a red-capable feedback loop exists; jumping to theories without a reproduction command is the exact failure this discipline prevents. If you genuinely cannot build a loop, stop and request environment access or captured artifacts from the user.