diagnosing-bugs
/diagnosing-bugs
Build a feedback loop for a hard or performance bug, and classify every bug already observed by a user or production. Use when a defect resists the first obvious fix, reproduces intermittently, spans component boundaries, or has escaped to a user or production, before reading code to build theories.
- Author
- byheaven ↗
- Repository
- byheaven-skills ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Build a feedback loop for a hard or performance bug, and classify every bug already observed by a user or production. Use when a defect resists the first obvious fix, reproduces intermittently, spans component boundaries, or has escaped to a user or production, before reading code to build theories.
Original author description
Build a feedback loop for a hard or performance bug, and classify every bug already observed by a user or production. Use when a defect resists the first obvious fix, reproduces intermittently, spans component boundaries, or has escaped to a user or production, before reading code to build theories.
How it works
- Phase 1 — Build the feedback loop
- Phase 2 — Reproduce and minimize
- Phase 3 — Hypotheses
- Phase 4 — Instrument
- Phase 5 — Fix with a regression test
- Phase 6 — Clean up
SKILL.md preview
--- name: diagnosing-bugs description: Build a feedback loop for a hard or performance bug, and classify every bug already observed by a user or production. Use when a defect resists the first obvious fix, reproduces intermittently, spans component boundaries, or has escaped to a user or production, before reading code to build theories. --- # Diagnosing Bugs The failure this skill exists to prevent: read the code, form a theory, start changing things. **Building the feedback loop is the skill; everything after is mechanical.** ## Phase 1 — Build the feedback loop Construct one command that observes the failure. Candidate forms, preferred first: failing test → curl/CLI script with fixture diff → headless browser probe → replayed captured trace → disposable harness → property/fuzz loop → bisect harness → last resort, a human-in-the-loop script that tells the user exactly what to click and captures the result, whose capture then feeds an agent-runnable replay. Phase 1 is complete only when you can state **one command you have already run at least once** (show the invocation and redacted output) and all four hold: - **Red-capable** — it asserts the user's exact symptom, not merely "no error". - **Deterministic** — pin time, seed randomness; for flaky bugs the goal is a raised reproduction rate (loop it 100×, parallelize, add pressure), not a clean repro. - **Fast** — seconds, not minutes. - **Agent-runnable** — you can run it yourself without a human. If you catch yourself reading code to build a theory before this command exists — stop; jumping to hypotheses is the exact failure this skill prevents. If the loop truly cannot be built, stop and ask through the route the host's instructions name for questions to the user, otherwise the host's user-question tool, otherwise plain text: "I could not build a command that reproduces this bug. I tried: <what was tried>. Can you give me <environment access, a capture, or production instrumentation>?" Redact secrets everywhere: literals become `<REDACTED>`, loops read from environment variables, captures quote only the signal-bearing lines. ## Phase 2 — Reproduce and minimize Confirm the loop is red on the failure the user described — fixing the wrong bug is the expensive version of fixing nothing. Then cut inputs, callers, and configuration one slice at a time, re-running after each cut. Done when every remaining element is load-bearing: removing any one turns the loop green. ## Phase 3 — Hypotheses Write 3–5 ranked falsifiable hypotheses before touching anything; a single hypothesis is anchoring on the first plausible idea. Each must carry a prediction: "if X is the cause, changing Y makes the bug disappear." A hypothesis without a prediction is a vibe — discard or sharpen it. Show the ranked list to the user before testing (they often re-rank instantly from domain knowledge), but do not block on their absence. ## Phase 4 — Instrument Every probe maps to a specific prediction; change one variable at a time. Prefer debugger/REPL, then targeted logging. Never "log everything and grep". Prefix every debug log with one unique tag such as `[DEBUG-a4f2]` so cleanup is a single grep. Performance problems branch here: measure a baseline first, then bisect. ## Phase 5 — Fix with a regression test Fix where the system first went wrong. A guard at the crash site is the fix only when the state it handles is legitimate; when that state should never exist, find what produced it. Before fixing, turn the minimized repro into a failing test — but only where a correct seam exists. If the only available seam is too shallow to observe the real trigger chain, the test buys false confidence; the missing seam is itself a finding — record it and hand it to architecture work instead. With a seam: watch the test go red → fix → watch it go green → re-run the original unminimized loop from Phase 1. ## Phase 6 — Clean up - Original repro no longer reproduces. - Regression test passes, or the missing-seam finding is recorded. - All `[DEBUG-]` lines removed (one grep proves it). - Disposable harnesses deleted. - The winning hypothesis written into the commit/PR message for the next debugger. - When the deciding fact took a deep dig to find, the cheap always-on signal that would have shown it at first look is proposed in the report; adding it is a separate decision. If the bug reached a user or production, cleanup also classifies the escape against the project's behavior registry (its registered behavior assertions) at the pre-escape source ref; a project with no separate registry registers behavior in its product documentation and tests, so classify against those: - `registered-assertion-regression` — the failing behavior already contradicted a registered assertion at that ref; evidence names the immutable ref, product-doc path, and assertion line. - `new-behavior-gap` — no registered assertion covered the behavior at that ref; the repair registers one with its executable carrier or explicit carrier/registry gap, and evidence names both the before ref and the new registration. Persist the result atomically as one event: when and where (user or production) the escape was observed, its class, and its evidence. It goes on the owning task record in the fields the project's task-record rule defines, or, with no task record, in the evidence the task's report links, such as its pull request. A worker returns that exact payload to the task owner instead of writing the record itself. Commit/PR prose preserves the winning hypothesis but does not replace this event. Phase 6 remains incomplete while a known user or production escape lacks its durable classification.
Files in this package (3)
- LICENSE 1 KB
- SKILL.md 6 KB
- agents/openai.yaml 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · byheaven/byheaven-skills | 90 | MIT |
| VincenzoImp/pitcrew | 100 | MIT |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| yuan88964/RelayStudio | 100 | MIT |
| byheaven/byheaven-skills | 100 | MIT |
| sickn33/agentic-awesome-skills | 100 | MIT |
| BaSui01/snow-app-skills | 100 | MIT |
| vahaah/astack | 100 | MIT |
| alexboo86/booharness | 100 | MIT |
Database snapshot: 13.11.2026 · package version 73809354f774 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90diagnose
Use when a bug or performance issue is still fuzzy — build the fastest feedback loop first, rank the leading hypotheses, and instrument only what narrows the search - 100ai-bug-fix-triage
Triage JIRA bugs against repository code to classify AI fixability. Use when reviewing a backlog of bugs to determine which ones an AI agent can fix. - 85solo-diagnose
Diagnosis loop for hard bugs and performance regressions — build a tight feedback loop first, hypothesise second. Use when user says "diagnose", "debug this", "why is this broken", "почему падает", "тормозит", or reports something throwing, failing, flaky, or slow. Do NOT use… - 100bug-echo
After a bug fix, find and rate other instances of the same defect. Infer and validate a pattern from the fix or use a supplied description, then classify each match against current code. Use for "run bug-echo", "echo this fix", "scan for similar bugs", "find other instances", or… - 100triage-bugs
Triage and prioritize bug reports when the user asks to classify bugs, prioritize a bug backlog, triage issues, or sort bugs by severity for sprint planning - 100bug-fix
Fix a Device bug the project's way - reproduce it, write a small failing test, find the root cause, fix it, prove the test now passes. Use for any bug report or broken feature; escalates to a spec when the cause or fix is not obvious.