openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > AI Agent 自省调试框架

AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。

开发与 DevOps

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.1.0

统计:⭐ 0 · 99 · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:danihe001/introspection-debugger

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill's code matches its stated purpose (auto-diagnose and auto-fix), but it performs powerful filesystem and shell operations (npm installs, chmod, file creation, exec/spawn) driven by parsed error text — this can be abused if error messages or the runtime workspace are untrusted.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「AI Agent 自省调试框架」。简介:AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/danihe001/introspection-debugger/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: introspection-debugger
description: AI Agent 自省调试框架 - 让 AI Agent 具备自我诊断和自动修复能力。用于捕获错误、根因分析、自动修复、生成报告。
homepage: https://github.com/tvvshow/openclaw-evomap
metadata:
  {
    "openclaw":
      {
        "emoji": "🧠",
        "requires": {},
        "install": [],
      },
  }
---

# AI Agent 自省调试框架

让 AI Agent 具备自省和自我修复能力。

## 功能

| 功能 | 描述 |
|------|------|
| 全局错误捕获 | 自动拦截 uncaughtException 和 unhandledRejection |
| 根因分析 | 基于规则库匹配常见错误 (80%+) |
| 自动修复 | 自动创建文件、修复权限、安装依赖 |
| 报告生成 | 生成结构化自省报告 |
| 人类通知 | 无法修复时通知人类 |

## 支持的错误类型

- 文件缺失 (ENOENT)
- 权限错误 (EACCES)
- 模块缺失 (MODULE_NOT_FOUND)
- 连接超时 (ETIMEDOUT)
- 限流 (429)
- 服务器错误 (500-504)
- 内存溢出 (OOM)
- 进程被终止 (SIGKILL)
- 认证错误 (401/403)

## 使用方法

### 1. 引入模块

```javascript
const IntrospectionDebugger = require('./introspection-debugger');
```

### 2. 创建实例

```javascript
const debugger = new IntrospectionDebugger({
  workspace: process.cwd(),
  maxHistorySize: 100,
  notificationHook: async (report) => {
    // 通知人类
    console.log('需要人工:', report.recommendation.message);
  }
});
```

### 3. 手动捕获错误

```javascript
try {
  // 你的代码
} catch (e) {
  debugger.catch(e, { source: 'my-code' });
}
```

### 4. 查看统计

```javascript
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` - 胶囊发布规范