Provides structured self-debugging workflow for AI agents using failure capture, diagnosis, controlled recovery, and introspection reporting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/everything-claude-code:agent-introspection-debuggingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
当智能体运行反复失败、消耗令牌而无进展、在同一工具上循环或偏离预期任务时,使用此技能。
当智能体运行反复失败、消耗令牌而无进展、在同一工具上循环或偏离预期任务时,使用此技能。
这是一个工作流技能,而非隐藏运行时。它教导智能体在升级到人工之前系统地调试自己。
激活此技能用于:
不要将此技能作为主要来源用于:
verification-loop在尝试恢复之前,精确记录失败。
捕获:
最小捕获模板:
## 失败捕获
- 会话 / 任务:
- 进行中的目标:
- 错误:
- 最后成功步骤:
- 最后失败的工具 / 命令:
- 看到的重复模式:
- 要验证的环境假设:
在更改任何内容之前,将失败与已知模式匹配。
| 模式 | 可能原因 | 检查 |
|---|---|---|
| 最大工具调用 / 重复相同命令 | 循环或无退出观察者路径 | 检查最后 N 次工具调用的重复 |
| 上下文溢出 / 退化推理 | 无限制注释、重复计划、过大日志 | 检查最近上下文的重复和低信号批量 |
ECONNREFUSED / 超时 | 服务不可用或端口错误 | 验证服务健康、URL 和端口假设 |
429 / 配额耗尽 | 重试风暴或缺少退避 | 计算重复调用并检查重试间隔 |
| 写入后文件缺失 / 过时差异 | 竞争、错误 cwd 或分支漂移 | 重新检查路径、cwd、git 状态和实际文件存在 |
| "修复"后测试仍然失败 | 错误假设 | 隔离确切的失败测试并重新推导错误 |
诊断问题:
使用改变诊断表面的最小操作进行恢复。
安全的恢复操作:
除非您通过当前环境中的实际工具实际执行它们,否则不要声明不受支持的自愈操作,如"重置智能体状态"或"更新工具配置"。
受控恢复清单:
## 恢复操作
- 选择的诊断:
- 采取的最小操作:
- 为什么这是安全的:
- 什么证据将证明修复有效:
以使恢复对下一个智能体或人类可读的报告结束。
## 智能体自我调试报告
- 会话 / 任务:
- 失败:
- 根本原因:
- 恢复操作:
- 结果:success | partial | blocked
- 令牌 / 时间消耗风险:
- 需要跟进:
- 稍后编码的预防性变更:
按顺序优先考虑这些干预:
坏模式:
好模式:
verification-loop。continuous-learning-v2。council。workspace-surface-audit。激活此技能时,不要仅以"我修复了它"结束。
始终提供:
npx claudepluginhub aaione/everything-claude-code-zhGuides Claude Code through a structured self-debugging workflow when agent runs fail repeatedly, loop, or drift. Uses capture, diagnosis, contained recovery, and introspection reports.
Breaks retry loops and recovers from stuck states via structured self-diagnosis. Use when 3+ consecutive failures, circular retries, or context overwhelm occurs.
Use when repeated fix attempts fail, the agent appears stuck in a loop, or complexity is increasing without progress