用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/y3owk1n/nix-system-config-v2 --skill diagnose命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Create, derive, or update the PRD — the single source of truth every other skill reads.
正在显示 SKILL.md
| name | diagnose |
| description | Diagnosis loop for hard bugs and performance regressions. |
A discipline for hard bugs. Skip phases only when explicitly justified.
Redact every secret: write <REDACTED> in its place. Build loops against env vars so credentials stay in the environment. Captured artifacts carry auth headers — quote only the lines with signal.
This is the skill. Everything else is mechanical. If you have a tight pass/fail signal for the bug (one that goes red on this bug), you will find the cause. If you don't have one, no amount of staring at code will save you.
Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.
For more approaches (replay traces, throwaway harnesses, property/fuzz loops, bisection, differential loops, HITL scripts), see LOOP-APPROACHES.md.
Treat the loop as a product. Once you have a loop, tighten it:
A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is a debugging superpower.
The goal is a higher reproduction rate. Loop the trigger 100x, parallelise, add stress, narrow timing windows. A 50%-flake bug is debuggable; 1% is not.
Stop and say so. List what you tried. Ask the user for: (a) access to the reproducing environment, (b) a redacted captured artifact, or (c) permission to add temporary instrumentation. Do not proceed to hypothesise without a loop.
A tight loop that goes red. Done when you can name one command you have already run at least once that is:
No red-capable command, no Phase 2.
Run the loop. Watch it go red.
Confirm:
Shrink the repro to the smallest scenario that still goes red. Cut inputs, callers, config, data, steps one at a time, re-running after each cut. Keep only what's load-bearing.
Done when every remaining element is load-bearing: removing any one makes the loop go green.
Do not proceed until you have reproduced and minimised.
Generate 3-5 ranked hypotheses before testing any. Single-hypothesis generation anchors on the first plausible idea.
Each hypothesis must be falsifiable — state the prediction:
"If is the cause, then will make the bug disappear / will make it worse."
If you cannot state the prediction, the hypothesis is a vibe: discard or sharpen it.
Show the ranked list to the user before testing. They often have domain knowledge that re-ranks instantly. Don't block on it; proceed with your ranking if the user is AFK.
Each probe must map to a specific prediction from Phase 3. Change one variable at a time.
Tool preference:
[DEBUG-a4f2]. Cleanup becomes a single grep.Perf branch: For performance regressions, establish a baseline measurement first, then bisect. Measure first, fix second.
Write the regression test before the fix, but only if there is a correct seam for it.
A correct seam exercises the real bug pattern as it occurs at the call site. If the only available seam is too shallow, a regression test there gives false confidence.
If no correct seam exists, that itself is the finding. Note it. Flag this for the next phase.
If a correct seam exists:
Delete the throwaway harnesses and prototypes. State the confirmed hypothesis in the commit or PR body — the next person to hit this reads that line, not the diff.
Done when: the Phase 1 loop runs green against the original scenario, the regression test passes (or the absence of a correct seam is written down as a finding), every [DEBUG-...] tag is gone, and the confirmed hypothesis is in the commit or PR body. Checkable: re-run the Phase 1 command and grep -r "DEBUG-" . returns nothing.