Agent skill

Agent Introspection Debugging

by affaan-m in affaan-m/ECC

“针对AI代理故障的结构化自调试工作流程,包括捕获、诊断、受限恢复和内省报告。”

— description from SKILL.md by affaan-m
MITAuto-check passedDevelopment

Install Agent Introspection Debugging

skills CLI
$ npx skills add affaan-m/ECC --skill agent-introspection-debugging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC agent-introspection-debugging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/zh-CN/skills/agent-introspection-debugging .claude/skills/agent-introspection-debugging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-introspection-debugging
GitHub stars
276k
Token cost
~547 tokens
SKILL.md length
120 words
Files
1
Skills in repo
673
Repo updated
First seen
Licence
MIT

At a glance

  • Works in 5 steps: 用一句话重新陈述真实目标。 → 验证世界状态,而非依赖记忆。 → 缩小失败范围。 → …
  • SKILL.md covers 何时激活, 范围边界, 四阶段循环 and 恢复启发式方法, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Agent Introspection Debugging is a skill in affaan-m/ECC (276k stars). Its SKILL.md is about 547 tokens. Licence: MIT.

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 用一句话重新陈述真实目标。
  2. 验证世界状态,而非依赖记忆。
  3. 缩小失败范围。
  4. 运行一次判别性检查。
  5. 然后才重试。

What it can do on your machine

Read from SKILL.md and the folder at commit ef648e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Introspection Debugging loads about 547 tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 120 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~547

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit ef648e0, republished under its MIT licence (© affaan-m). 120 words, ~547 tokens.

Download SKILL.mdSave it as .claude/skills/agent-introspection-debugging/SKILL.md (or your agent's skills folder).
name
agent-introspection-debugging
description
针对AI代理故障的结构化自调试工作流程,包括捕获、诊断、受限恢复和内省报告。
origin
ECC

智能体内省调试

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

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

何时激活

  • 达到最大工具调用/循环限制失败
  • 重复重试但无任何进展
  • 上下文增长或提示漂移导致输出质量下降
  • 文件系统或环境状态与预期不匹配
  • 可通过诊断和较小纠正措施恢复的工具故障

范围边界

激活此技能用于:

  • 在盲目重试前捕获失败状态
  • 诊断常见的智能体特定失败模式
  • 应用受限的恢复操作
  • 生成结构化的人类可读调试报告

请勿将此技能作为以下情况的主要来源:

  • 代码变更后的功能验证;请使用 verification-loop
  • 当已有更窄的 ECC 技能时的框架特定调试
  • 当前框架无法自动强制执行的运行时承诺

四阶段循环

阶段 1:失败捕获

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

捕获内容:

  • 错误类型、消息和堆栈跟踪(如可用)
  • 最后有意义的工具调用序列
  • 智能体当时试图完成的任务
  • 当前上下文压力:重复提示、过大的粘贴日志、重复的计划或失控的笔记
  • 当前环境假设:工作目录、分支、相关服务状态、预期文件

最小捕获模板:

markdown
## 失败捕获
- 会话/任务:
- 进行中的目标:
- 错误:
- 最后成功的步骤:
- 最后失败的工具/命令:
- 观察到的重复模式:
- 需验证的环境假设:
阶段 2:根因诊断

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

模式可能原因检查
最大工具调用/重复相同命令循环或无退出观察路径检查最后 N 次工具调用是否存在重复
上下文溢出/推理能力下降无界笔记、重复计划、过大日志检查近期上下文是否存在重复和低信号批量内容
ECONNREFUSED / 超时服务不可用或端口错误验证服务健康状态、URL 和端口假设
429 / 配额耗尽重试风暴或缺少退避统计重复调用次数并检查重试间隔
写入后文件缺失/差异过时竞态、工作目录错误或分支漂移重新检查路径、工作目录、git 状态和实际文件是否存在
“修复”后测试仍然失败假设错误隔离确切失败的测试并重新推导错误

诊断问题:

  • 这是逻辑失败、状态失败、环境失败还是策略失败?
  • 智能体是否丢失了真实目标并开始优化错误的子任务?
  • 失败是确定性的还是瞬态的?
  • 能够验证诊断的最小可逆操作是什么?
阶段 3:受限恢复

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

安全恢复操作:

  • 停止重复重试并重新陈述假设
  • 修剪低信号上下文,仅保留活跃目标、阻碍因素和证据
  • 重新检查实际文件系统/分支/进程状态
  • 将任务缩小到一个失败的命令、一个文件或一个测试
  • 从推测性推理切换到直接观察
  • 当失败风险高或受外部阻碍时升级给人类

不要声称不支持的自动修复操作,如“重置智能体状态”或“更新框架配置”,除非你正在当前环境中通过真实工具实际执行这些操作。

受限恢复检查清单:

markdown
## 恢复操作
- 选择的诊断方式:
- 采取的最小操作:
- 为何此操作安全:
- 哪些证据能证明修复生效:
阶段 4:内省报告

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

markdown
## 代理自调试报告
- 会话/任务:
- 失败原因:
- 根本原因:
- 恢复措施:
- 结果:成功 | 部分成功 | 受阻
- Token/时间消耗风险:
- 是否需要后续跟进:
- 后续需编码的预防性变更:

恢复启发式方法

按顺序优先选择以下干预措施:

  1. 用一句话重新陈述真实目标。
  2. 验证世界状态,而非依赖记忆。
  3. 缩小失败范围。
  4. 运行一次判别性检查。
  5. 然后才重试。

错误模式:

  • 用略微不同的措辞重复相同操作三次

正确模式:

  • 捕获失败
  • 分类模式
  • 运行一次直接检查
  • 仅当检查支持时才更改计划

与 ECC 集成

  • 如果代码已更改,在恢复后使用 verification-loop。
  • 当失败模式值得转化为本能或后续技能时,使用 continuous-learning-v2。
  • 当问题不是技术失败而是决策模糊时,使用 council。
  • 如果失败源于冲突的本地状态或仓库漂移,使用 workspace-surface-audit。

输出标准

当此技能激活时,不要仅以“我已修复”结束。

始终提供:

  • 失败模式
  • 根因假设
  • 恢复操作
  • 证明情况已改善或仍受阻的证据

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/zh-CN/skills/agent-introspection-debugging of affaan-m/ECC.

Open the folder on GitHubat commit ef648e0

Compare with similar skills

Agent Introspection Debugging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Introspection Debugging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Introspection Debugging this skillaffaan-m/ECC276k—~547Automated safety check: PassMIT
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Debugging Executionsn8n-io/n8n207k—~2.6kAutomated safety check: PassCustom licence
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Herdr Throwaway Reproductionherdrdev/herdr43k—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Official

    Debug failed or wrong-output workflow executions using executions tools.

    207k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.

    43k GitHub stars~2.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Systematic Debugging

    ultralisp/ultralisp

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    258 GitHub starsUsed in 51 repos~2.4k tokens
    DevelopmentAuto-check passed

More from affaan-m/ECC

All 673 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    276k GitHub starsUsed in 5 repos~1.9k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    276k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    276k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    276k GitHub stars~2.9k tokensUpdated 4 days ago
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    276k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed
  • Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    276k GitHub stars~3.5k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Agent Introspection Debugging

How do I install Agent Introspection Debugging in Claude Code?

Run `npx skills add affaan-m/ECC --skill agent-introspection-debugging -a claude-code`. Or copy the skill folder (docs/zh-CN/skills/agent-introspection-debugging in affaan-m/ECC) into .claude/skills/agent-introspection-debugging in your project. Claude Code loads it when a task matches its description.

How do I install Agent Introspection Debugging in Codex?

Run `npx skills add affaan-m/ECC --skill agent-introspection-debugging -a codex`. Or copy the skill folder (docs/zh-CN/skills/agent-introspection-debugging in affaan-m/ECC) into .agents/skills/agent-introspection-debugging in your project. Codex loads it when a task matches its description.

Can I use Agent Introspection Debugging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill agent-introspection-debugging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-introspection-debugging, .gemini/skills/agent-introspection-debugging, .github/skills/agent-introspection-debugging and .opencode/skills/agent-introspection-debugging in your project.

What does Agent Introspection Debugging need to run?

SKILL.md names no scripts, command-line tools or credentials: Agent Introspection Debugging is instructions for the agent only.

Does Agent Introspection Debugging access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Introspection Debugging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Introspection Debugging use?

Agent Introspection Debugging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Introspection Debugging use?

About 547 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Introspection Debugging?

Skills that share tags, products or a category with Agent Introspection Debugging: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Debugging Executions (n8n-io/n8n, 207k stars) and Aoti Debug (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Introspection Debugging?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 275,546 GitHub stars. The repository holds 673 skills in this directory. The repository was last updated on October 5, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.