Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Coding
Bug Diagnosis
Try itDiagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause. Use when debugging, chasing a defect, a...
What it does
The slowest way to fix a bug is to start changing code and hope. This skill runs a disciplined diagnostic loop: **reproduce it reliably, isolate where it happens, hypothesize why, and test the cheapest hypothesis first** — narrowing until the root cause is proven, not guessed. It produces a fix *an…
The skill document
Bug Diagnosis Skill
The slowest way to fix a bug is to start changing code and hope. This skill runs a disciplined diagnostic loop: reproduce it reliably, isolate where it happens, hypothesize why, and test the cheapest hypothesis first — narrowing until the root cause is proven, not guessed. It produces a fix and an explanation of why the bug existed.
Required Inputs
Ask for these only if they aren't already provided:
- The symptom — what's wrong: expected vs. actual behavior, error/stack trace, when it started.
- Repro steps — how to trigger it (or "can't reliably reproduce yet").
- Context — recent changes, environment, frequency (always / intermittent / specific inputs).
- What's been tried — so we don't repeat dead ends.
Output Format
Diagnosis: [bug]
1. Reproduce — the minimal, reliable steps to trigger it. If it's intermittent, the plan to make it deterministic (fixed input/seed, added logging, narrowed conditions). No fixing until it reproduces.
2. Isolate — narrow where it happens: bisect (git bisect / comment-out / binary search the input), check the boundaries (what's the last known-good point vs. first bad). State the smallest scope that still shows the bug.
3. Hypotheses (ranked) — likely causes, most-probable-and-cheapest-to-test first:
| Hypothesis | Why plausible | How to test it (the cheap check) | Verdict |
|---|
Test them in order; record what each rules in or out.
4. Root cause — the proven cause (not a symptom), with the evidence that confirms it.
5. Fix & guard — the fix, a test that fails before it and passes after (lock the bug out), and any nearby instances of the same mistake.
Quality Checks
- A reliable reproduction exists before any fix is attempted
- The location is isolated by bisection/narrowing, not guessed
- Hypotheses are ranked by likelihood × cheapness and tested in order
- The stated cause is the root cause with evidence — not just the surface symptom
- A regression test is added that fails before the fix and passes after
Anti-Patterns
- Do not start changing code before the bug reliably reproduces
- Do not fix the symptom and stop — trace to the underlying cause
- Do not change several things at once — you won't know what fixed it (or hid it)
- Do not skip the regression test — an unguarded bug comes back
- Do not ignore "what's been tried" — re-running dead ends wastes the loop
Based On
Systematic debugging method (reproduce → isolate → hypothesize → verify) — Zeller's Why Programs Fail / scientific-method debugging.
Related skills
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Save, search, and manage personal notes and knowledge bases in Get笔记 on explicit request.
More from mohitagw15856
Browse all skillsExtract a brand's visual and verbal identity into an applicable guideline kit — tokens, voice rules, and do/don't pairs — then apply it consistently to any a...
Write an executive summary for any document, report, or proposal. Use when asked to write an executive summary, management summary, briefing paper, or one-pa...
Convert a git log, commit list, or release notes into a polished, user-facing changelog. Use when writing release notes, generating a CHANGELOG.md entry, or...
Document or design a database schema with entity relationships, table definitions, constraints, indexes, and access patterns. Use when asked to design a data...
Structure a cohort analysis for retention, LTV, or behavioural patterns. Use when asked to run a cohort analysis, analyse retention by cohort, segment users...
Build a customer journey map for a product, service, or experience. Use when asked to map a customer journey, create a user journey, document touchpoints and...