diagnose

Diagnose bugs and performance regressions by testing ranked hypotheses against a reproducible feedback loop.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/kieranpotts/skills --skill diagnose-kieranpotts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/kieranpotts/skills/tree/main/skills/diagnose
Command: npx skills add https://github.com/kieranpotts/skills --skill diagnose-kieranpotts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When something is broken, throwing, failing, or has regressed in performance and the cause is not obvious from reading the code, guessing wastes time and produces unverified fixes. This Skill drives a disciplined debugging loop that confirms exactly one root cause with observed evidence before any repair is attempted. ## Core Features & Use Cases - Feedback loop construction: Builds a fast, deterministic, agent-runnable pass/fail signal for the bug (failing test, curl script, headless browser, replay harness, bisection) before forming any hypothesis. - Ranked hypothesis testing: Generates 3-5 falsifiable hypotheses, then instruments one variable at a time until exactly one cause survives, with every elimination backed by an observation. - Evidence-based handover: Produces a handover containing the symptom, verbatim repro command, confirmed causal chain, a deliberately failing regression test, and a suggested remedy — without applying any fix. - Use Case: A user reports that tenant B intermittently sees tenant A's dashboard data. The agent builds a failing isolation test, ranks hypotheses (cache key, session token, race condition), confirms the cache key omits the tenant ID, and hands over the diagnosis with a red regression test for the fix step. ## Quick Start Diagnose why this endpoint intermittently returns the wrong tenant's data and leave a failing regression test.

Frequently Asked Questions about diagnose

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

FAQPage Schema
How do I debug a bug whose cause is not obvious from the code?▼

Build a fast, deterministic feedback loop that reproduces the failure first, then generate 3-5 ranked falsifiable hypotheses and test them one variable at a time. Confirm exactly one cause through direct observation before attempting any fix.

How to diagnose a performance regression in an application?▼

Establish a numerical baseline with a profiler, timing harness, or query plan, then bisect against a threshold. Treat the benchmark as the feedback loop and make the regression test a benchmark assertion rather than a functional test.

Does this skill fix the bug after finding the cause?▼

No. It stops at a confirmed cause and hands over the evidence: symptom, repro command, ranked hypotheses, causal chain, a failing regression test, and a suggested remedy. Applying the repair is a separate step with its own verification.

What happens when a bug cannot be reproduced locally?▼

Capture a production artifact such as a HAR file, request log, or database snapshot and replay it locally. If no feedback loop can be built at all, the agent stops and reports what it needs rather than guessing at a cause.

When should I not use a hypothesis-based debugging process?▼

Skip it when a compiler, linter, or type-checker has already named the cause, since that is mechanical repair with nothing to diagnose. It is also unnecessary for bugs whose cause is obvious from reading the code.