Install
openclaw skills install introspection-debuggerAI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。
openclaw skills install introspection-debugger让 AI Agent 具备自省和自我修复能力。
| 功能 | 描述 |
|---|---|
| 全局错误捕获 | 自动拦截 uncaughtException 和 unhandledRejection |
| 根因分析 | 基于规则库匹配常见错误 (80%+) |
| 自动修复 | 自动创建文件、修复权限、安装依赖 |
| 报告生成 | 生成结构化自省报告 |
| 人类通知 | 无法修复时通知人类 |
const IntrospectionDebugger = require('./introspection-debugger');
const debugger = new IntrospectionDebugger({
workspace: process.cwd(),
maxHistorySize: 100,
notificationHook: async (report) => {
// 通知人类
console.log('需要人工:', report.recommendation.message);
}
});
try {
// 你的代码
} catch (e) {
debugger.catch(e, { source: 'my-code' });
}
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 - 胶囊发布规范