trace
它能做什么
这项技能调查某个观察到的结果为何会发生,而不是直接跳到修复。适合面对令人困惑的 bug、变慢或意外结果,并希望先弄清原因的人。
适用场景
- ✓当一个 bug、变慢或意外结果没有明显原因的时候。
- ✓当你希望在做任何更改之前,把几种解释与证据进行比较的时候。
- ✓当你想知道哪一项下一步检查最能缩小原因范围的时候。
技能链接
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/trace/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的夜间任务上周变慢了,但没人知道为什么。请追踪可能的原因,并告诉我下一步应该做哪项检查。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会重新陈述观察到的现象,提出相互竞争的解释,并为每种解释收集支持和反对的证据,通常是并行进行。然后它会对这些解释排序,指出最大的缺失事实,并建议能最快解决问题的探测方法。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Trace Skill
Use this skill for ambiguous, causal, evidence-heavy questions where the goal is to explain why an observed result happened, not to jump directly into fixing or rewriting code.
This is the orchestration layer on top of the built-in tracer agent. The goal is to make tracing feel like a reusable OMC operating lane: restate the observation, generate competing explanations, gather evidence in parallel, rank the explanations, and propose the next probe that would collapse uncertainty fastest.
Good entry cases
Use /oh-my-claudecode:trace when the problem is:
- ambiguous
- causal
- evidence-heavy
- best answered by exploring competing explanations in parallel
Examples:
- runtime bugs and regressions
- performance / latency / resource behavior
- architecture / premortem / postmortem analysis
- scientific or experimental result tracing
- config / routing / orchestration behavior explanation
- “given this output, trace back the likely causes”
Core tracing contract
Always preserve these distinctions:
- Observation -- what was actually observed
- Hypotheses -- competing explanations
- Evidence For -- what supports each explanation
- Evidence Against / Gaps -- what contradicts it or is still missing
- Current Best Explanation -- the leading explanation right now
- Critical Unknown -- the missing fact keeping the top explanations apart
- Discriminating Probe -- the highest-value next step to collapse uncertainty
Do not collapse into:
- a generic fix-it coding loop
- a generic debugger summary
- a raw dump of worker output
- fake certainty when evidence is incomplete
Evidence strength hierarchy
Treat evidence as ranked, not flat.
From strongest to weakest:
- Controlled reproductions / direct experiments / uniquely discriminating artifacts
- Primary source artifacts with tight provenance (trace events, logs, metrics, benchmark outputs, configs, git history, file:line behavior)
- Multiple independent sources converging on the same explanation
- Single-source code-path or behavioral inference
- Weak circumstantial clues (timing, naming, stack order, resemblance to prior bugs)
- Intuition / analogy / speculation
Explicitly down-rank hypotheses that depend mostly on lower tiers when stronger contradictory evidence exists.
Strong falsification / disconfirmation rules
Every serious /trace run must try to falsify its own favorite explanation.
For each top hypothesis:
- collect evidence for it
- collect evidence against it
- state what distinctive prediction it makes
- state what observation would be hard to reconcile with it
- identify the cheapest probe that would discriminate it from the next-best alternative
Down-rank a hypothesis when:
- direct evidence contradicts it
- it survives only by adding new unverified assumptions
- it makes no distinctive prediction compared with rivals
- a stronger alternative explains the same facts with fewer assumptions
- its support is mostly circumstantial while the rival has stronger evidence tiers
Team-mode orchestration shape
Use Claude built-in team mode for /trace.
The lead should:
- Restate the observed result or “why” question precisely
- Extract the tracing target
- Generate multiple deliberately different candidate hypotheses
- Spawn 3 tracer lanes by default in team mode
- Assign one tracer worker per lane
- Instruct each tracer worker to gather evidence for and against its lane
- Run a rebuttal round between the leading hypothesis and the strongest remaining alternative
- Detect whether the top lanes genuinely differ or actually converge on the same root cause
- Merge findings into a ranked synthesis with an explicit critical unknown and discriminating probe
Important: workers should pursue deliberately different explanations, not the same explanation in parallel.
Default hypothesis lanes for v1
Unless the prompt strongly suggests a better partition, use these 3 default lanes:
- Code-path / implementation cause
- Config / environment / orchestration cause
- Measurement / artifact / assumption mismatch cause — covers verification-method defects, not just system defects. Examples: the verification query reuses a single dimensional key across distinct entities, tenants, streams, or groups; the comparison filter shape does not match the schema grain; or the catalog or column name was assumed portable acros
常见问题
追踪时它会修改代码吗?
不会。目标是在进行任何修复之前先解释原因。
它会汇报什么?
观察到的现象、相互竞争的解释、每种解释的支持和反对证据,以及当前最佳的解释。
什么时候它不太适合?
当问题已经很清楚、只需修复时,直接调试或执行类技能是更好的选择。
详情
作者的原始描述
Evidence-driven tracing lane that orchestrates competing tracer hypotheses in Claude built-in team mode
热度
- GitHub 星标
- 41k
- 排名
- #7029
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-doc-discipline
41k教你的智能体编写其他 AI 智能体能够独立遵循的说明,规则可以检验,并且每条规则都附有明确的理由。
ai-slop-cleaner
41k帮你的智能体整理 AI 写出的代码,这些代码能运行但臃肿或重复,在不改变其功能的前提下删除多余部分。
architecture-survey
41k帮你的智能体审查代码库的结构,列出越来越难修改的部分并附上证据,且自身不做任何更改。
ask-navigator
41k帮你的智能体把模糊的项目整理成一张清晰的决策问题图,然后逐个处理,直到路径变得清楚。