diagnose

Diagnose hard bugs and performance regressions through a structured reproduce-hypothesise-fix workflow.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/santoshkal/chezmoi --skill diagnose-santoshkal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/santoshkal/chezmoi/tree/main/private_dot_config/opencode/skills/diagnose
Command: npx skills add https://github.com/santoshkal/chezmoi --skill diagnose-santoshkal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions stall when developers guess at causes without a reproducible signal. This Skill enforces a disciplined diagnosis loop — build a feedback loop, reproduce, hypothesise, instrument, fix, regression-test — so root causes are found systematically instead of by trial and error. ## Core Features & Use Cases - Feedback loop construction: Ten ranked strategies for building a deterministic pass/fail signal, from failing tests and curl scripts to headless browser runs, replayed traces, fuzz loops, and git bisect harnesses. - Ranked falsifiable hypotheses: Generates 3-5 hypotheses with explicit predictions before testing, avoiding single-hypothesis anchoring. - Tagged instrumentation and cleanup: Every debug log gets a unique [DEBUG-xxxx] prefix so cleanup is a single grep, and a post-mortem checklist ensures regression tests and commit-message learnings land. - Use Case: A user reports intermittent checkout failures. The Skill builds a loop that replays the failing request 100 times to raise the reproduction rate, ranks hypotheses, instruments the boundary between cart and payment services, then locks the fix behind a regression test. ## Quick Start Ask the agent to diagnose the bug where the export button throws an error and have it build a reproduction loop first.

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 that only happens intermittently?▼

Raise the reproduction rate instead of chasing a clean repro: loop the trigger 100 times, parallelise, add stress, narrow timing windows, or inject sleeps. A 50%-flake bug is debuggable; a 1% flake is not, so keep increasing the rate until hypotheses can be tested against it.

How to diagnose a performance regression in code?▼

Establish a baseline measurement first using a timing harness, profiler, or query plan, then bisect between known-good and known-bad states. Logs are usually the wrong tool for performance work; measure first and fix second.

What should I do when a bug cannot be reproduced locally?▼

Stop and say so explicitly rather than guessing. Ask for environment access, a captured artifact such as a HAR file, log dump, or core dump, or permission to add temporary production instrumentation before forming hypotheses.

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, that absence is itself an architectural finding worth flagging.

Why generate multiple hypotheses before testing any of them?▼

Single-hypothesis generation anchors on the first plausible idea and wastes cycles. Ranking 3-5 falsifiable hypotheses with explicit predictions lets domain knowledge re-rank them cheaply and prevents confirmation bias during instrumentation.