diagnose — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited diagnose (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
一套处理疑难 bug 的纪律。只有在明确说明理由时才跳过阶段。
探索 codebase 时,使用项目的 domain glossary 来建立相关 modules 的清晰心智模型,并检查你正在触碰区域的 ADRs。
这就是这个 skill 的核心。 其他一切都是机械动作。如果你有一个快速、确定、agent 可运行的 bug pass/fail 信号,你就会找到原因:bisection、hypothesis-testing 和 instrumentation 都只是消耗这个信号。如果没有,无论盯着代码看多久都救不了你。
在这里投入不成比例的努力。大胆。创造性。拒绝放弃。
git bisect run。scripts/hitl-loop.template.sh 驱动_人_,让循环仍然有结构。捕获的 output 会反馈给你。构建出正确反馈循环,bug 就已经修了 90%。
把 loop 当成产品。一旦你有了_某个_ loop,问:
一个 30 秒且 flaky 的 loop 只比没有 loop 略好。一个 2 秒且确定的 loop 是 debugging superpower。
目标不是干净复现,而是更高 reproduction rate。把 trigger 循环 100×、parallelise、加 stress、缩窄 timing windows、注入 sleeps。50%-flake bug 可调试;1% 不行。持续提高复现率,直到它可调试。
停下来并明确说明。列出你尝试过的内容。向用户请求:(a) 能复现它的环境访问权限,(b) 捕获的 artifact(HAR file、log dump、core dump、带 timestamps 的 screen recording),或 (c) 添加临时 production instrumentation 的许可。不要在没有 loop 的情况下继续 hypothesise。
在你拥有一个自己相信的 loop 前,不要进入 Phase 2。
运行 loop。看着 bug 出现。
确认:
复现 bug 之前不要继续。
在测试任何假设前,先生成 3–5 个排序后的 hypotheses。单一 hypothesis 生成会锚定在第一个貌似合理的想法上。
每个 hypothesis 都必须是 falsifiable:说明它做出的 prediction。
Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."
如果你无法说明 prediction,这个 hypothesis 就只是 vibe。丢弃它或打磨它。
在测试前把排序列表展示给用户。 用户常常有能立刻重排它们的领域知识(“我们刚部署了 #3 的变更”),或知道哪些 hypotheses 已经被排除。这是便宜 checkpoint,节省大量时间。不要因此阻塞:如果用户 AFK,就按你的排序继续。
每个 probe 都必须映射到 Phase 3 的某个具体 prediction。一次只改变一个变量。
工具偏好:
给每条 debug log 打唯一前缀,例如 [DEBUG-a4f2]。结束时 cleanup 会变成一次 grep。未打标签的 logs 会存活;打了标签的 logs 会死。
Perf branch. 对 performance regressions 来说,logs 通常是错的。改为建立 baseline measurement(timing harness、performance.now()、profiler、query plan),然后 bisect。先测量,再修复。
在 fix 前写 regression test,但只有当存在正确 seam 时才这样做。
正确 seam 是指:test 会按 call site 实际发生的方式,触发真实 bug pattern。如果唯一可用的 seam 太浅(bug 需要多个 callers 而 test 只有 single-caller,或 unit test 无法复制触发 bug 的 chain),那里的 regression test 会给出虚假信心。
如果不存在正确 seam,这本身就是发现。 记下来。Codebase architecture 正在阻止 bug 被锁定。把这件事标记给下一阶段。
如果存在正确 seam:
声明完成前必做:
[DEBUG-...] instrumentation 已移除(grep 前缀)然后问:什么本可以防止这个 bug? 如果答案涉及 architectural change(没有好的 test seam、tangled callers、hidden coupling),带着具体信息 hand off 给 /improve-codebase-architecture skill。这个 recommendation 要在 fix 已经完成后再给,不要提前给,因为你现在比开始时掌握了更多信息。
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.