debug
它能做什么
这项技能引导你逐步排查软件错误。适合遇到报错,或某种行为与预期不符的开发人员和支持人员。
适用场景
- ✓当你有错误信息或堆栈跟踪,但不知道原因时。
- ✓当某个功能在测试环境中正常,却在生产环境中失败时。
- ✓当某次部署之后出现故障,你需要查明原因的时候。
技能链接
https://github.com/TencentCloud/Octop/blob/main/src/octop/infra/agents/experts/library/engineering/skills/debug/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的应用在测试环境中运行正常,但在生产环境中出现以下错误并崩溃。请帮我找出原因。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先确认应该发生的情况与实际发生的情况之间的差异,缩小到相关组件或代码路径,并提出需要验证的假设。它会追踪原因,然后提出修复方案。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/debug
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Run a structured debugging session to find and fix issues systematically.
Usage
/debug $ARGUMENTS
How It Works
┌─────────────────────────────────────────────────────────────────┐
│ DEBUG │
├─────────────────────────────────────────────────────────────────┤
│ Step 1: REPRODUCE │
│ ✓ Understand the expected vs. actual behavior │
│ ✓ Identify exact reproduction steps │
│ ✓ Determine scope (when did it start? who is affected?) │
│ │
│ Step 2: ISOLATE │
│ ✓ Narrow down the component, service, or code path │
│ ✓ Check recent changes (deploys, config changes, dependencies) │
│ ✓ Review logs and error messages │
│ │
│ Step 3: DIAGNOSE │
│ ✓ Form hypotheses and test them │
│ ✓ Trace the code path │
│ ✓ Identify root cause (not just symptoms) │
│ │
│ Step 4: FIX │
│ ✓ Propose a fix with explanation │
│ ✓ Consider side effects and edge cases │
│ ✓ Suggest tests to prevent regression │
└─────────────────────────────────────────────────────────────────┘
What I Need From You
Tell me about the problem. Any of these help:
- Error message or stack trace
- Steps to reproduce
- What changed recently
- Logs or screenshots
- Expected vs. actual behavior
Output
## Debug Report: [Issue Summary]
### Reproduction
- **Expected**: [What should happen]
- **Actual**: [What happens instead]
- **Steps**: [How to reproduce]
### Root Cause
[Explanation of why the bug occurs]
### Fix
[Code changes or configuration fixes needed]
### Prevention
- [Test to add]
- [Guard to put in place]
If Connectors Available
If ~~monitoring is connected:
- Pull logs, error rates, and metrics around the time of the issue
- Show recent deploys and config changes that may correlate
If ~~source control is connected:
- Identify recent commits and PRs that touched affected code paths
- Check if the issue correlates with a specific change
If ~~project tracker is connected:
- Search for related bug reports or known issues
- Create a ticket for the fix once identified
Tips
- Share error messages exactly — Don't paraphrase. The exact text matters.
- Mention what changed — Recent deploys, dependency updates, and config changes are top suspects.
- Include context — "This works in staging but not prod" or "Only affects large payloads" narrows things fast.
常见问题
智能体首先检查什么?
它会复现问题,并检查近期的改动,例如部署、配置更改和依赖更新。
它只看代码吗?
不是。它还会查看日志和错误信息,以缩小问题范围。
它只找到原因就结束吗?
不会。该技能同时涵盖诊断和修复方案。
详情
作者的原始描述
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
repo: TencentCloud/Octop
热度
- GitHub 星标
- 11k
- 排名
- #11644
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
polite-greeting
11k帮你的智能体用简短、友好且礼貌的问候开启对话,然后迅速进入你需要的事情。
medical-source-failover
11k帮你的智能体在主要来源被屏蔽、速度缓慢或难以阅读时,查找可信的中国医学指南、药品信息和公共卫生文件。
cowork-plugin-customizer
11k帮你的智能体通过替换占位符、调整技能和设置,使现有的 Claude 插件适配某个组织的工具和工作流程。
create-cowork-plugin
11k帮你的智能体通过引导式问答,从零开始构建一个新的 Claude 插件,涵盖技能、智能体、钩子以及可直接安装的插件包。