diagnose
Skill3 starsChanged 13 days agoMITView on GitHub
调查根因未知的运行、构建、测试或性能故障。先建一条能对本故障变红的反馈回路,再以复现、可证伪假设和定点埋点定位原因;已知局部修复无需完整诊断流程。
193 other projects use a version of this.
Adopted by
Most recently taken up by
- agent-services-at/pluginstheir own version, first seen Nov 8, 2026
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- venhdev/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- DeevsDeevs/agent-systemtheir own version, first seen Nov 8, 2026
- pedrohcgs/claude-code-my-workflowtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use zoom-out, to-prd and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
victorgarciaesgiSkillzoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
Also in 61 projects that use this
GoogleSkillto-prd
Turn the current conversation into a PRD and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 56 projects that use this
GoogleSkillto-issues
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.
Also in 53 projects that use this
simo97Skilledit-article
The user will invoke this skill to help them edit an article.
Also in 17 projects that use this
simo97Skillwrite-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
Also in 44 projects that use this
AnasX7Skillsetup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Also in 27 projects that use this
- +4 more from simo97
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- github/awesome-copilot★ 41ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- CherryHQ/cherry-studio-app★ 4.1ksame name
- pedrohcgs/claude-code-my-workflow★ 1.7ksame name
- formancehq/ledger★ 1.5ksame name
- getagentseal/founder-playbook★ 745same name
- victorgarciaesgi/regle★ 508same name
- amazingloft999-droid/mattpocock-skills★ 422same name
- openvetta/open-vetta★ 302same name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- autoresearchSkill
- brainstormSkill
- cleanupSkill
- find-skillsSkill
- handoffSkill
- harness-builderSkill
- implementSkill
- planSkill
- remove-deadcode-pySkill
- researchSkill
- reviewSkill
- shipSkill
- sweepSkill
- tddSkill
- writing-for-agentsSkill
The file
Files
Evidence-based diagnosis
将用户描述的故障与真实环境对应,区分现象、假设、已证实原因和修复证据。不要用隐藏错误、跳过测试或扩大容错来冒充修复。阶段只在有明示理由时跳过。
流程
- 保护现场并脱敏:捕获相关命令、cwd、环境、退出码、日志、输入和最近改动。展示前把密钥写成
<REDACTED>;回路里的凭据走环境变量,不进展示内容;采集物只引用带信号的行。 - 先建反馈回路(闸门):提出任何根因假设之前,先有一条命令(测试调用、脚本路径、curl 等),且已至少跑过一次(展示调用与脱敏输出),满足:
- 能变红:走真实故障路径、断言用户的原症状,修好后会变绿——「跑完没报错」不算;
- 确定:每次判决相同;偶发故障追求更高复现率(循环触发、并发、加压、收窄时间窗),不追求干净复现;
- 快:秒级而非分钟级;
- agent 可无人值守运行:必须有人参与时用结构化脚本驱动人,输出回流。
有了回路就当产品打磨:更快、信号更尖、更确定。构造手段菜单见
references/feedback-loops.md。为找 seam、搭回路读代码不受限;发现自己在回路出现前读代码编根因理论——停下,这正是本闸门要防的失败。 豁免:昂贵 GPU、线上、破坏性或外部环境确实建不出回路,或用户只授权只读诊断(不能新写脚本/测试)且现有命令无法充当回路时,明示已尝试的手段与缺口(环境访问、脱敏采集物如日志/HAR/core dump、临时埋点许可),向用户索取;可继续用既有日志、源码与配置推理,但结论一律标「未验证假设」,不得声称修复已验证。昂贵任务不为凑次数反复跑。
- 复现并最小化:跑回路看它红;确认红的是用户描述的症状而非邻近故障(错的 bug=错的修复)。再逐项削减输入、调用方、配置、数据与步骤,每削一项重跑,直到每个剩余元素都承重(去掉任何一个就变绿)。
- 排序可证伪假设:动手验证前列出多个候选并排序,不锚定第一个看似合理的想法;不强制固定条数。每条写出预测——「若 X 是原因,则改 Y 会让故障消失 / 改 Z 会加重」;写不出预测的是感觉,丢弃或磨尖。排序清单展示给用户(对方常有能当场重排的领域知识),但不阻塞等待。
- 定点埋点:每个探针对应一条预测,一次只变一个量;独立只读检查可以并行。优先调试器/REPL,其次在区分假设的边界处打日志,不「全量打日志再 grep」。调试日志统一带唯一前缀(如
[DEBUG-a4f2]),收尾一次 grep 清除。性能问题先建基线测量再二分,先量后修。 - 修复与回归测试:在正确 seam(测试复现故障在调用现场的真实形态)上把最小化复现变成失败测试 → 看它红(红若是靠篡改代码或 fixture 强造的,先 diff 原样副本证明改动确实生效再信它)→ 授权范围内最小修复 → 看它绿 → 对未最小化的原始场景重跑第 2 步回路。只有过浅的 seam 时不硬写回归测试(假安全感):无正确 seam 本身是发现,写进报告,作为
cleanup环境改进候选。不要把相邻无关失败混成同一个根因。 - 持续有信息增益且在预算内时继续。无新证据、需要外部访问或成本超出授权时说明具体缺口;不以固定三轮自动宣布阻塞。
完成与输出
完成前核对:原回路不再复现;回归测试通过(或无正确 seam 已记录);[DEBUG- 前缀零残留;一次性原型已删除或移入明确标记的调试位置;有修复提交时被证实的假设写进 commit 信息,让下一个排障者学到。
给出故障、反馈回路命令、支持/排除的关键假设、根因或未定项、修改及验证。只读诊断可交付有边界的结论,无需强制修代码。调查中途就把回路命令、关键 dead ends、排除的假设和恢复命令记进本轨道的计划文件(或 artifacts/),不等收尾,以免会话中断后重走死路;没有计划文件时随本次报告交付,不为此新建轨道。.harness/ 只在阶段变化或交接时由本轨道 tracks/<id>.md 的 Evidence: 链接它们(写入时机见 ../writing-for-agents/references/recovery_surface_policy.md)。长调查后重读任务入口防漂移。值得复用的根因在报告里写成 lessons 候选(触发 → 坑 → 正确做法),由收尾的 cleanup 写进项目 lessons。
工作台级问题可参考 references/harness-layer-patterns.md;不要因一条命令失败就安装新工具或重建 harness。
Recommended next skill
- 原因已明但需修改:
implement;修复复杂或用户要求评审:review。 - 简单修复已验证或只读诊断已交付:有 lessons 候选时交
cleanup落笔,否则结束;无正确 seam 或回路难建暴露工作台缺口:收尾时交cleanup列为环境改进候选。 - 仅在实际缺口需改工作台时:
harness-builder;目标改变才回plan。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

