introspection-debugger

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

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "introspection-debugger" with this command: npx skills add danihe001/introspection-debugger

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Local Self-Healing Machine Learning

A fully local machine learning engine that makes your OpenClaw agent smart over time — without ever calling home, revealing your machine ID, or exposing any...

Registry SourceRecently Updated
3400Profile unavailable
Automation

Event Driven Topology Selector

Choose between broker and mediator event-driven topologies based on workflow control needs, error handling requirements, and performance trade-offs. Use this...

Registry SourceRecently Updated
840Profile unavailable
Automation

Dial A Cron

Stateful cron system for OpenClaw with persistent memory, change detection, smart routing, token budget tracking, and self-healing. Requires 'openclaw' and '...

Registry SourceRecently Updated
1000Profile unavailable
Automation

Agent Debugger

Debug AI agent issues systematically. Covers tool failures, infinite loops, context overflow, rate limits, and performance bottlenecks. Use when agents misbe...

Registry Source
1960Profile unavailable