跳到正文
Skillpedia
通用编程11k · #11644

debug

它能做什么

这项技能引导你逐步排查软件错误。适合遇到报错,或某种行为与预期不符的开发人员和支持人员。

适用场景

  • ✓当你有错误信息或堆栈跟踪,但不知道原因时。
  • ✓当某个功能在测试环境中正常,却在生产环境中失败时。
  • ✓当某次部署之后出现故障,你需要查明原因的时候。

技能链接

https://github.com/TencentCloud/Octop/blob/main/src/octop/infra/agents/experts/library/engineering/skills/debug/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/TencentCloud/Octop/blob/main/src/octop/infra/agents/experts/library/engineering/skills/debug/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Share error messages exactly — Don't paraphrase. The exact text matters.
  2. Mention what changed — Recent deploys, dependency updates, and config changes are top suspects.
  3. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能