Development v0.1.0

code-debug

Diagnose failures in the current local codebase and produce the smallest defensible fix. Use when the user reports an...

sf0799 更新于 2026-04-06 1 浏览
下载 SKILL

技能说明

Diagnose failures in the current local codebase and produce the smallest defensible fix. Use when the user reports an error, crash, bad output, flaky behavior, failed test, or asks for root-cause analysis and a concrete repair in the workspace. Do not use for system administration or hardware troubleshooting. Chinese triggers: 报错、运行异常、崩溃、逻辑错误、定位原因、修复 bug、最小复现.

使用场景

Diagnose failures in the current local codebase and produce the smallest defensible fix. Use when the user reports an error, crash, bad output, flaky behavior, failed test, or asks for root-cause analysis and a concrete repair in the workspace. Do not use for system administration or hardware troubleshooting. Chinese triggers: 报错、运行异常、崩溃、逻辑错误、定位原因、修复 bug、最小复现.

查看英文原始说明

Diagnose failures in the current local codebase and produce the smallest defensible fix. Use when the user reports an error, crash, bad output, flaky behavior, failed test, or asks for root-cause analysis and a concrete repair in the workspace. Do not use for system administration or hardware troubleshooting. Chinese triggers: 报错、运行异常、崩溃、逻辑错误、定位原因、修复 bug、最小复现.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/code-debug
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

5 个文件 · 14 kB
SKILL.md text/markdown
---
name: code-debug
description: Diagnose failures in the current local codebase and produce the smallest defensible fix. Use when the user reports an error, crash, bad output, flaky behavior, failed test, or asks for root-cause analysis and a concrete repair in the workspace. Do not use for system administration or hardware troubleshooting. Chinese triggers: 报错、运行异常、崩溃、逻辑错误、定位原因、修复 bug、最小复现.
---

# 调试修复

先找根因,再动代码。

## 工作流

1. 能复现就先复现,不能复现就尽量缩小到最小场景。
2. 先判断错误类别:语法、运行时、逻辑、异步顺序、类型、边界、依赖、配置或资源处理。
3. 优先检查常见问题:off-by-one、空值处理、过期状态、竞争条件、输入假设错误、资源未释放。
4. 用代码、日志或执行结果锁定根因,不做玄学猜测。
5. 用最小安全修复解决真正的根因。
6. 非必要不夹带重构;结构太差影响修复时再单独说明。
7. 用最短可靠方式验证修复结果。

## 输出

- 根因
- 影响范围
- 最小复现场景,如果能给出
- 修复方向或补丁
- 验证方法

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。