debugging-and-error-recovery 是什么?
Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing. Use when asked what broke, why a test started failing, or why code throws, even when the diff, the function, or the stack trace is pasted inline and the cause looks obvious from reading it, so that the cause is named, the fix is minimal, and the reply says how to confirm it.
以上为来源原文,中文用途说明尚待整理。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
debugging-and-error-recovery,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。
展开并复制给 Codex 的安装指令
安装并检查 debugging-and-error-recovery
请在 Codex 的当前工作环境中安装并检查 debugging-and-error-recovery 这个 Skill。
项目身份:addyosmani/agent-skills / debugging-and-error-recovery
来源:https://github.com/addyosmani/agent-skills/blob/8c99fa36d90068c82d547f7c12a9d67a3e95f4ee/skills/debugging-and-error-recovery/SKILL.md
已定位的源文件:skills/debugging-and-error-recovery/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 debugging-and-error-recovery
请在 Claude Code 的当前工作环境中安装并检查 debugging-and-error-recovery 这个 Skill。
项目身份:addyosmani/agent-skills / debugging-and-error-recovery
来源:https://github.com/addyosmani/agent-skills/blob/8c99fa36d90068c82d547f7c12a9d67a3e95f4ee/skills/debugging-and-error-recovery/SKILL.md
已定位的源文件:skills/debugging-and-error-recovery/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 debugging-and-error-recovery
请在 Cursor Agent 的当前工作环境中安装并检查 debugging-and-error-recovery 这个 Skill。
项目身份:addyosmani/agent-skills / debugging-and-error-recovery
来源:https://github.com/addyosmani/agent-skills/blob/8c99fa36d90068c82d547f7c12a9d67a3e95f4ee/skills/debugging-and-error-recovery/SKILL.md
已定位的源文件:skills/debugging-and-error-recovery/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 debugging-and-error-recovery
请在 当前 Agent 的当前工作环境中安装并检查 debugging-and-error-recovery 这个 Skill。
项目身份:addyosmani/agent-skills / debugging-and-error-recovery
来源:https://github.com/addyosmani/agent-skills/blob/8c99fa36d90068c82d547f7c12a9d67a3e95f4ee/skills/debugging-and-error-recovery/SKILL.md
已定位的源文件:skills/debugging-and-error-recovery/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-21T19:32:09.269Z
- 中文使用说明
- 尚待整理,保留英文来源内容
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料
skills/debugging-and-error-recovery/SKILL.md · 抓取时间 2026-11-21T19:32:09.269Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing. Use when asked what broke, why a test started failing, or why code throws, even when the diff, the function, or the stack trace is pasted inline and the cause looks obvious from reading it, so that the cause is named, the fix is minimal, and the reply says how to confirm it.
查看源文件章节 / Source sections
- 原文:Debugging and Error Recovery
- 原文:Overview
- 原文:When to Use
- 原文:The Stop-the-Line Rule
- 原文:The Triage Checklist
- 原文:Step 1: Reproduce
- 原文:Step 2: Localize
- 原文:Step 3: Reduce
- 原文:Step 4: Fix the Root Cause
- 原文:Step 5: Guard Against Recurrence
- 原文:Step 6: Verify End-to-End
- 原文:Error-Specific Patterns
- 原文:Test Failure Triage
- 原文:Build Failure Triage
- 原文:Runtime Error Triage
- 原文:Safe Fallback Patterns
- 原文:Instrumentation Guidelines
- 原文:Common Rationalizations
- 原文:Treating Error Output as Untrusted Data
- 原文:Red Flags
- 原文:Verification
原文:Overview
Systematic debugging with structured triage. When something breaks, stop adding features, preserve evidence, and follow a structured process to find and fix the root cause. Guessing wastes time. The triage checklist works for test failures, build errors, runtime bugs, and production incidents.
原文:When to Use
- Tests fail after a code change - The build breaks - Runtime behavior doesn't match expectations - A bug report arrives - An error appears in logs or console - Something worked before and stopped working
原文:The Stop-the-Line Rule
When anything unexpected happens: ``` 1. STOP adding features or making changes 2. PRESERVE evidence (error output, logs, repro steps) 3. DIAGNOSE using the triage checklist 4. FIX the root cause 5. GUARD against recurrence 6. RESUME only after verification passes ``` **Don't push past a failing test or broken build to work on the next feature.** Errors compound. A bug in Step 3 that goes unfixed makes Steps 4-6 wrong.
原文:The Triage Checklist
Work through these steps in order. Do not skip steps.
原文:Step 1: Reproduce
Make the failure happen reliably. If you can't reproduce it, you can't fix it with confidence. ``` Can you reproduce the failure? ├── YES → Proceed to Step 2 └── NO ├── Gather more context (logs, environment details) ├── Try reproducing in a minimal environment └── If truly non-reproducible, document conditions and monitor ``` **When a bug is non-reproducible:** ``` Cannot reproduce on demand: ├── Timing-dependent? │ ├── Add timestamps to logs around the suspected area │ ├── Try with artificial delays (setTimeout, sleep) to widen race windows │ └── Run under load or concurrency to increase collision probability ├── Environment-dependent? │ ├── Compare Node/browser versions, OS, environment variables │ ├── Check for differences in data (empty vs populated database) │ └── Try reproducing in CI where the environment is clean ├── State-dependent? │ ├── Check for leaked state between tests or requests │ ├── Look for global variables, singletons, or shared caches │ └── Run the failing scenario in isolation vs after other operations └── Truly random? ├── Add defensive logging at the suspected location ├── Set up an alert for the specific error signature └── Document the conditions observed and revisit when it recurs ``` For test failures (npm shown — substitute the repository's own test command, per the test-driven-development skill's Discover the Stack First section): ```bash # Run the specific failing test npm test -- --grep "test name" # Run with verbose output npm test -- --verbose # Run in isolation (rules out test pollution) npm test -- specific-file --runInBand ```
原文:Step 2: Localize
Narrow down WHERE the failure happens: ``` Which layer is failing? ├── UI/Frontend → Check console, DOM, network tab ├── API/Backend → Check server logs, request/response ├── Database → Check queries, schema, data integrity ├── Build tooling → Check config, dependencies, environment ├── External service → Check connectivity, API changes, rate limits └── Test itself → Check if the test is correct (false negative) ``` **Use bisection for regression bugs:** ```bash # Find which commit introduced the bug git bisect start git bisect bad # Current commit is broken git bisect good <known-good-sha> # This commit worked # Git will checkout midpoint commits; run your test at each git bisect run npm test -- --grep "failing test" # substitute the repository's focused-test command ```
文件 SHA256:95e393819043b50b3ba6f4d89f0fea620d03e560eb52b592b3eb7a41836aaea1
仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。
Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing. Use when asked what broke, why a test started failing, or why code throws, even when the diff, the function, or the stack trace is pasted inline and the cause looks obvious from reading it, so that the cause is named, the fix is minimal, and the reply says how to confirm it.
历史收录数据
| 来源仓库 | addyosmani/agent-skills |
|---|---|
| Skill源路径 | skills/debugging-and-error-recovery/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
