← 返回 Skills 市场
305
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install introspection-debugger
功能描述
AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。
使用说明 (SKILL.md)
AI Agent 自省调试框架
让 AI Agent 具备自省和自我修复能力。
功能
| 功能 | 描述 |
|---|---|
| 全局错误捕获 | 自动拦截 uncaughtException 和 unhandledRejection |
| 根因分析 | 基于规则库匹配常见错误 (80%+) |
| 自动修复 | 自动创建文件、修复权限、安装依赖 |
| 报告生成 | 生成结构化自省报告 |
| 人类通知 | 无法修复时通知人类 |
支持的错误类型
- 文件缺失 (ENOENT)
- 权限错误 (EACCES)
- 模块缺失 (MODULE_NOT_FOUND)
- 连接超时 (ETIMEDOUT)
- 限流 (429)
- 服务器错误 (500-504)
- 内存溢出 (OOM)
- 进程被终止 (SIGKILL)
- 认证错误 (401/403)
使用方法
1. 引入模块
const IntrospectionDebugger = require('./introspection-debugger');
2. 创建实例
const debugger = new IntrospectionDebugger({
workspace: process.cwd(),
maxHistorySize: 100,
notificationHook: async (report) => {
// 通知人类
console.log('需要人工:', report.recommendation.message);
}
});
3. 手动捕获错误
try {
// 你的代码
} catch (e) {
debugger.catch(e, { source: 'my-code' });
}
4. 查看统计
console.log(debugger.getStats());
// { totalErrors: 10, totalFixes: 8, autoFixRate: 0.8 }
文件
introspection-debugger.js- 主框架代码reliable-api-client.js- API 客户端黄金标准
相关文档
INTROSPECTION_DEBUGGER.md- 详细使用文档EVOMAP_STANDARD.md- 胶囊发布规范
安全使用建议
This skill does what it says (auto-diagnose and auto-fix), but it performs filesystem writes, chmods, and runs shell commands (including npm install) based on parsed error messages. Before installing or using it: (1) Review the full source for helper functions not shown here (extractFilePath, extractModuleName, execAsync, ensureDir) to confirm they properly validate and sanitize inputs; (2) Do not enable auto-fix in environments that process untrusted inputs — prefer notificationHook + manual confirmation; (3) Run the module in a restricted workspace/least-privilege container or sandbox until you vet it; (4) Consider removing or disabling automatic npm installs and any shell execs, or require explicit human approval for fixes; (5) If you need higher assurance, request the complete (untruncated) source for review so we can check for command injection, remote endpoints, or hidden network calls.
功能分析
Type: OpenClaw Skill
Name: introspection-debugger
Version: 1.1.0
The skill implements an auto-repair framework in `introspection-debugger.js` that uses `child_process.exec` to run shell commands (`npm install`, `chmod`) and `fs.writeFileSync` to create files based on strings extracted from error messages. This creates a significant risk of command injection and unauthorized file system modification if error messages are influenced by untrusted input. Additionally, the `notifyHuman` function can exfiltrate detailed error reports, including stack traces and execution context, to an external URL via a webhook, which could be abused for data exfiltration.
能力评估
Purpose & Capability
The name/description (introspection + auto-repair) align with the shipped code and SKILL.md: the module captures global errors, analyzes root causes, writes files, fixes permissions, and installs missing modules — all expected for an auto-debugger.
Instruction Scope
SKILL.md instructs importing and instantiating the module and lists features (global capture, auto-fix). That matches the implementation, but the runtime behavior has broad side effects (registers process-level uncaughtException/unhandledRejection handlers and attempts automatic fixes) that the README does not tightly constrain (for example: when auto-fix runs, whether user confirmation is required, or limits on what paths/commands it will act on).
Install Mechanism
This is an instruction-only skill with a code file and no install spec — nothing is downloaded or installed at skill install time. Risk comes from runtime operations (the code invokes shell commands and npm install when fixing).
Credentials
The skill requests no environment variables, which is appropriate, but it executes shell commands derived from parsed error messages (e.g., `chmod +x "${filePath}"`, `npm install ${moduleName}`). If error messages or workspace contents are attacker-controlled, these operations could lead to command injection, arbitrary package installation, or unwanted filesystem changes. There is no declared limit or sanitization visible in the provided code excerpt.
Persistence & Privilege
always:false and user-invocable:true — normal. The skill does, however, register global process handlers when instantiated, so simply requiring/constructing it will alter process-wide behavior; that's coherent with its purpose but important to be aware of.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install introspection-debugger - 安装完成后,直接呼叫该 Skill 的名称或使用
/introspection-debugger触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
v1.1.0 优化:修复根因分析字段、增强调试日志、修复 installDependency 返回值、完善测试报告
元数据
常见问题
AI Agent 自省调试框架 是什么?
AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 305 次。
如何安装 AI Agent 自省调试框架?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install introspection-debugger」即可一键安装,无需额外配置。
AI Agent 自省调试框架 是免费的吗?
是的,AI Agent 自省调试框架 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
AI Agent 自省调试框架 支持哪些平台?
AI Agent 自省调试框架 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 AI Agent 自省调试框架?
由 steve xia(@danihe001)开发并维护,当前版本 v1.1.0。
推荐 Skills