← Back to Skills Marketplace
305
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install introspection-debugger
Description
AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。
README (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- 胶囊发布规范
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install introspection-debugger - After installation, invoke the skill by name or use
/introspection-debugger - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
v1.1.0 优化:修复根因分析字段、增强调试日志、修复 installDependency 返回值、完善测试报告
Metadata
Frequently Asked Questions
What is AI Agent 自省调试框架?
AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。 It is an AI Agent Skill for Claude Code / OpenClaw, with 305 downloads so far.
How do I install AI Agent 自省调试框架?
Run "/install introspection-debugger" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is AI Agent 自省调试框架 free?
Yes, AI Agent 自省调试框架 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does AI Agent 自省调试框架 support?
AI Agent 自省调试框架 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created AI Agent 自省调试框架?
It is built and maintained by steve xia (@danihe001); the current version is v1.1.0.
More Skills