Skip to content
Agentmart
Submit a tool

agent-introspection-debugging

使用捕获、诊断、受控恢复和内省报告的结构化自我调试工作流程,用于 AI 智能体失败。

Skill by aaione

IndexedMIT★ 29
Write a review

Chalk Labs

Need help deploying agent-introspection-debugging?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aaione-agent-introspection-debugging-d54b51

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

使用捕获、诊断、受控恢复和内省报告的结构化自我调试工作流程,用于 AI 智能体失败。

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/agent-introspection-debugging

What's inside

Skill name
agent-introspection-debugging
Description
使用捕获、诊断、受控恢复和内省报告的结构化自我调试工作流程,用于 AI 智能体失败。
License
MIT
Instructions
149 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# 智能体内省调试

当智能体运行反复失败、消耗令牌而无进展、在同一工具上循环或偏离预期任务时,使用此技能。

这是一个工作流技能,而非隐藏运行时。它教导智能体在升级到人工之前系统地调试自己。

## 何时激活

- 最大工具调用 / 循环限制失败
- 重复重试且没有进展
- 上下文增长或提示漂移开始降低输出质量
- 文件系统或环境状态与预期和现实之间不匹配
- 可能通过诊断和较小的纠正操作恢复的工具失败

## 范围边界

激活此技能用于:
- 在盲目重试之前捕获失败状态
- 诊断常见的智能体特定失败模式
- 应用受控的恢复操作
- 生成结构化的可人工阅读的调试报告

不要将此技能作为主要来源用于:
- 代码更改后的功能验证;使用 `verification-loop`
- 更窄的 ECC 技能已存在的框架特定调试
- 当前工具无法自动强制执行的运行时承诺

## 四阶段循环

### 阶段 1:失败捕获

在尝试恢复之前,精确记录失败。

捕获:
- 错误类型、消息和堆栈跟踪(如果可用)
- 最后有意义的工具调用序列
- 智能体试图做什么
- 当前上下文压力:重复提示、过大粘贴日志、重复计划或失控注释
- 当前环境假设:cwd、分支、相关服务状态、预期文件

最小捕获模板:

```markdown
## 失败捕获
- 会话 / 任务:
- 进行中的目标:
- 错误:
- 最后成功步骤:
- 最后失败的工具 / 命令:
- 看到的重复模式:
- 要验证的环境假设:
```

### 阶段 2:根本原因诊断

在更改任何内容之前,将失败与已知模式匹配。

| 模式 | 可能原因 | 检查 |
| --- | --- | --- |
| 最大工具调用 / 重复相同命令 | 循环或无退出观察者路径 | 检查最后 N 次工具调用的重复 |
| 上下文溢出 / 退化推理 | 无限制注释、重复计划、过大日志 | 检查最近上下文的重复和低信号批量 |
| `ECONNREFUSED` / 超时 | 服务不可用或端口错误 | 验证服务健康、URL 和端口假设 |
| `429` / 配额耗尽 | 重试风暴或缺少退避 | 计算重复调用并检查重试间隔 |
| 写入后文件缺失 / 过时差异 | 竞争、错误 cwd 或分支漂移 | 重新检查路径、cwd、git 状态和实际文件存在 |
| "修复"后测试仍然失败 | 错误假设 | 隔离确切的失败测试并重新推导错误 |

诊断问题:
- 这是逻辑失败、状态失败、环境失败还是策略失败?
- 智能体是否失去了真实目标并开始优化错误的子任务?
- 失败是确定性的还是瞬态的?
- 什么是最小的可逆操作来验证诊断?

### 阶段 3:受控恢复

使用改变诊断表面的最小操作进行恢复。

安全的恢复操作:
- 停止重复重试并重新陈述假设
- 修剪低信号上下文,仅保留活动目标、阻止器和证据
- 重新检查实际文件系统 / 分支 / 进程状态
- 将任务缩小到一个失败命令、一个文件或一个测试
- 从推测推理切换到直接观察
- 当失败高风险或外部阻塞时升级到人工

除非您通过当前环境中的实际工具实际执行它们,否则不要声明不受支持的自愈操作,如"重置智能体状态"或"更新工具配置"。

受控恢复清单:

```markdown
## 恢复操作
- 选择的诊断:
- 采取的最小操作:
- 为什么这是安全的:
- 什么证据将证明修复有效:
```

### 阶段 4:内省报告

以使恢复对下一个智能体或人类可读的报告结束。

```markdown
## 智能体自我调试报告
- 会话 / 任务:
- 失败:
- 根本原因:
- 恢复操作:
- 结果:success | partial | blocked
- 令牌 / 时间消耗风险:
- 需要跟进:
- 稍后编码的预防性变更:
```

## 恢复启发式

按顺序优先考虑这些干预:

1. 用一句话重新陈述真实目标。
2. 验证世界状态而非信任记忆。
3. 缩小失败范围。

From aaione/everything-claude-code-zh, MIT.

More from aaione/everything-claude-code-zh

Signals

Stars
29
Forks
14
Open issues
1
Last commit (this folder)
May 31, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from aaione

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get agent-introspection-debugging running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying agent-introspection-debugging?

CallGet help
Cite this page

agent-introspection-debugging skill. Agent Mart. https://agentmart.dev/skills/aaione-agent-introspection-debugging-d54b51 (last updated 2026-10-24)