diagnosing-bugs
Diagnose hard bugs and performance regressions. Use when debugging failures or slowness.
- License 许可
- MIT
- 所属仓库
- BetoFrega/skills
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- diagnosing-bugs
- description
- Diagnose hard bugs and performance regressions. Use when debugging failures or slowness.
02 资源文件 3
- 参考文档agents/openai.yaml103 B
- 许可证LICENSE1.0 KB
- 脚本scripts/hitl-loop.template.sh1.3 KB
03 SKILL.md 正文
Diagnosing bugs
Read relevant domain and ADR guidance. Justify skipped phases. Redact secrets as <REDACTED>; use environment credentials and show only diagnostic evidence.
- Build a tight, red-capable loop. Run and show one command and redacted output proving the user's exact symptom. Require unattended execution, repeatability, and seconds-scale feedback; for intermittent bugs, establish a high reproduction rate. Prioritize this loop before hypotheses. If human interaction is unavoidable, use the HITL template. Without a working loop, report attempts and request access or redacted evidence. Before requesting authorization for temporary production instrumentation, inspect existing provider telemetry as described in step 4. Ask when redaction removes the needed signal.
- Reproduce and minimize. Capture the exact failure and reproduce it repeatedly. Remove one element at a time, rerunning the loop. Proceed when every remaining element is load-bearing: removing any one makes the loop green.
- Hypothesize. Generate 3–5 ranked, falsifiable hypotheses with predicted observations. Show them before testing, incorporate user corrections, and continue without requiring a reply.
- Instrument. First inspect existing telemetry in the relevant providers. Record the time window, filters, sampling and correlation; check exact identifiers and individual spans when a root-only trace search is empty. An empty query does not establish absence of failure or instrumentation. Identify the missing diagnostic evidence before adding signals. Test predictions, changing one variable at a time. Prefer debugger/REPL, then targeted logs with a unique debug prefix. For performance regressions, measure a baseline and bisect.
- Fix and protect. At a seam exercising the real bug pattern, write the regression test before fixing; watch it fail, apply the fix, and watch it pass. If no suitable seam exists, document the architectural limitation instead of claiming regression coverage. Then run variant analysis as Fix Root Causes describes.
- Verify and clean up. Rerun the original, unminimized scenario and verify green; require a passing regression test or document missing coverage. Remove temporary instrumentation and delete throwaway harnesses or retain them in a clearly marked debug location. Keep cleanup apart from recovery: restoring a prior version or getting green probes is a fix only with causal evidence and verification of the affected journey. Record the confirmed cause in the commit or PR; retain inconclusive results and remaining gaps in the diagnostic record.
04 同仓库更多 Skills
writing-for-humans
Load before writing any reader-facing text, including messages, and follow its rules as you write. Also use to rewrite or audit existing prose for plain language, clarity, readability, or actionability.
writing-for-agents
Write agent-facing documents. Use when creating or editing skills, AGENTS.md, or CLAUDE.md.
write-adr
Write, revise, or supersede architecture decision records (ADRs) documenting an architectural choice and its rationale.
wizard
Wizard scripts for human-only provisioning, credential/CI setup, unfamiliar dashboards, migrations, or cutovers; use only for steps the agent cannot perform.
verify
Check whether the current task's claimed outcome is confirmed.
verb-tense
Choose verb tense and mood by when each event happens and how certain it is. Use when writing or reviewing any text, and when a reader asks for a tense review.