diagnosing-bugs

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

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/The-Focus-AI/walking-thoughts --skill diagnosing-bugs-the-focus-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/The-Focus-AI/walking-thoughts/tree/main/.agents/skills/diagnosing-bugs
Command: npx skills add https://github.com/The-Focus-AI/walking-thoughts --skill diagnosing-bugs-the-focus-ai

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, developers guess at causes and ship unverified fixes. This Skill enforces a disciplined diagnosis loop that builds a tight, red-capable reproduction before any hypothesis is tested. ## Core Features & Use Cases - Feedback Loop Construction: Builds a fast, deterministic pass/fail signal using failing tests, curl scripts, CLI fixtures, Playwright browser automation, trace replay, fuzz loops, or git bisect harnesses. - Structured Six-Phase Process: Guides reproduction and minimization, ranked falsifiable hypotheses, single-variable instrumentation with tagged debug logs, regression-test-first fixes, and cleanup with post-mortem. - Human-in-the-Loop Fallback: Ships a scripts/hitl-loop.template.sh bash template that drives a human through manual reproduction steps and captures observations as parseable KEY=VALUE output. - Use Case: A user reports the export button intermittently throws in production. The Skill builds a Playwright loop that reproduces the failure at a high rate, minimizes the scenario, tests ranked hypotheses one variable at a time, and lands a fix guarded by a regression test. ## Quick Start Ask the agent to diagnose the bug where the export button throws an error, and have it build a failing reproduction 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 sometimes?

For non-deterministic bugs, raise the reproduction rate instead of seeking a clean repro: loop the trigger 100 times, parallelize, add stress, and narrow timing windows. A 50% flake is debuggable; keep increasing the rate until your feedback loop reliably goes red.

How to reproduce a bug before fixing it?

Build a tight feedback loop first: a failing test, curl script, CLI fixture, or Playwright script that asserts the user's exact symptom and runs in seconds. Do not form hypotheses until one command exists that goes red on this specific bug.

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 such as a HAR file or log dump, or permission to add temporary production instrumentation before proceeding.

How do I debug a performance regression?

For performance regressions, avoid log-based probing. Establish a baseline measurement with a timing harness, performance.now(), a profiler, or query plans, then bisect between known states to isolate the cause before fixing.

When should I write a regression test for a bug fix?

Write the regression test before the fix, but only at a seam that 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 that gives false confidence.