debug
它能做什么
这项技能指导智能体诊断某个会话或工作流为何表现异常。适合遇到令人困惑的行为、并希望在做任何更改之前先找到原因的人。
适用场景
- ✓当 Claude Code 会话或工作流表现得令人困惑或出现故障的时候。
- ✓当某个工具或钩子在一次更改后似乎失效,且原因不明的时候。
- ✓当你希望在开始任何大规模重写之前先找到根本原因的时候。
技能链接
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/debug/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 Claude 会话总是在任务中途停止。你能找出原因,并告诉我最小的修复方法吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先阅读最相关的日志、追踪记录和状态,尝试精确地重现问题,并区分表面现象与根本原因。然后它会推荐下一步最小的检查或修复措施。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Debug
Use this skill when the user wants help diagnosing a current OMC/Claude-Code session problem, workflow breakage, or confusing runtime behavior.
Goal
Find the real failure signal quickly and explain the next corrective step.
Workflow
- Read the user’s issue description carefully.
- Inspect the most relevant local evidence first:
- trace tools
- state tools
- notepad / project memory when relevant
- failing tests or commands
- Reproduce the issue narrowly if possible.
- Distinguish symptoms from root cause.
- Recommend the smallest next fix or verification step.
Rules
- Prefer real evidence over guesses.
- Use the trace/state surfaces when the issue involves orchestration, hooks, or agent flow.
- If the issue is actually a product/runtime bug rather than app code, say so plainly.
- Do not prescribe broad rewrites before isolating the failure.
- Tag temporary debug output
[DEBUG-<4hex>]; cleanup is then a single grep. - Redact secrets from logs and traces before they leave the session.
- If the failure traces to a missing or wrong seam, say so as the finding and point at
refitorarchitecture-survey— the environment lesson outlives the fix.
Output
- Observed failure
- Root-cause hypothesis
- Evidence for that hypothesis
- Smallest next action
常见问题
它会立即重写我的代码吗?
不会。在故障被隔离之前,它会避免大范围重写。
它会保护日志中的机密信息吗?
会。在会话之外使用之前,它会从日志和追踪记录中删除机密信息。
如果问题出在工具本身怎么办?
技能会直接说明这一点,因为此时原因是产品缺陷,而不是你应用代码中的问题。
详情
作者的原始描述
Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction
热度
- GitHub 星标
- 41k
- 排名
- #6998
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-doc-discipline
41k教你的智能体编写其他 AI 智能体能够独立遵循的说明,规则可以检验,并且每条规则都附有明确的理由。
ai-slop-cleaner
41k帮你的智能体整理 AI 写出的代码,这些代码能运行但臃肿或重复,在不改变其功能的前提下删除多余部分。
architecture-survey
41k帮你的智能体审查代码库的结构,列出越来越难修改的部分并附上证据,且自身不做任何更改。
ask-navigator
41k帮你的智能体把模糊的项目整理成一张清晰的决策问题图,然后逐个处理,直到路径变得清楚。