Community程式設計與開發github.com

skylv-self-healing-agent

self-healing-agent - OpenClaw 技能:為 AI 代理提供自我修復能力

skylv-self-healing-agent 是什麼?

這是一個基於 EvoMap GEP 自我修復引擎的 AI 代理技能。當代理遇到錯誤時,它能夠自動檢測失敗、診斷根本原因、自動套用修復,並從錯誤模式中學習。該技能支援 OpenClaw 平台,內建 12 個經過實戰驗證的修復模式,涵蓋 PowerShell、Git、Node.js、ClawHub 等多種常見錯誤類型。使用者可以透過簡單的命令列指令分析錯誤、自動修復、管理修復模式,甚至讓代理在執行命令時自動監控並觸發修復。其核心原則是:當信心水準達到 85% 以上時,才會自動套用修復,確保安全性。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add SKY-lv/skylv-self-healing-agent

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

skylv-self-healing-agent 是做什麼的?

EvoMap GEP 自我修復引擎,專為 AI 代理設計。可檢測失敗、診斷根本原因、自動套用修復,並從模式中學習。

技能元資料

  • Slug: skylv-self-healing-agent
  • 版本: 1.0.0
  • 描述: 自我修復引擎,能檢測代理失敗、分析根本原因、自動套用修復,並從模式中學習。基於 EvoMap GEP 自我修復原理建構。
  • 類別: agent
  • 觸發關鍵字: self-heal, self-repair, error recovery, auto-fix, failure recovery, debug

功能說明

當您的 AI 代理遇到錯誤時,不再直接失敗,而是執行 診斷 → 修復 → 學習 的流程:

# 診斷錯誤並取得修復建議
node self_healing_engine.js analyze "PowerShell AmpersandNotAllowed &"

# 分析並自動套用高信心水準的修復
node self_healing_engine.js heal "Version already exists"

# 列出已知的修復模式
node self_healing_engine.js patterns --tag windows

# 學習新的修復模式
node self_healing_engine.js learn "specific error pattern" "how to fix it"

# 使用自我修復監控執行命令
node self_healing_engine.js watch "node my_agent.js"

# 執行內建測試套件
node self_healing_engine.js test

範例輸出

## 自我修復分析

嚴重程度:高
診斷結果:PowerShell 不支援複合命令中的 & 符號

建議修復(依信心水準排序):
  [95%] 使用 ; 代替 &&,或透過 cmd /c 包裝呼叫
    範例:& cmd /c "echo a && echo b"
    範例:& ping -n 5 127.0.0.1

內建修復模式(12 種模式)

ID錯誤類型信心水準標籤
powershell-ampersandAmpersandNotAllowed95%powershell, windows
git-push-443GitHub 連線逾時90%git, network
node-e-flag-parseNode.js argv 解析錯誤90%nodejs, windows
clawhub-rate-limit超出速率限制95%clawhub
clawhub-version-exists版本已存在95%clawhub
exec-timeout命令執行逾時85%execution
json-parse-failJSON 語法錯誤88%json, encoding
file-exists-checkENOENT / 檔案不存在90%filesystem
api-rate-limit-http429 請求過多92%api, network
convex-error後端 API 驗證錯誤80%api, backend
wsl-not-installedWSL2 未安裝90%wsl, windows
encoding-utf8-gbk編碼不符88%encoding, windows

EvoMap GEP 自我修復原則

此技能實作了 EvoMap GEP 協定中的 自我修復 功能:

  1. 自動日誌分析 — 自動解析 stderr/stdout 中的錯誤模式
  2. 根本原因診斷 — 對照已知修復模式資料庫進行比對
  3. 自動修復套用 — 當信心水準 ≥ 85% 時自動套用修復
  4. 模式學習 — 從使用者修正中學習新的模式
  5. 安全影響範圍 — 絕不未經確認就套用破壞性修復

真實市場數據(2026-04-17)

指標數值
市場搜尋self heal agent
頂尖競爭者self-healing-agent(分數:2.294)
其他競爭者proactive-agent-lite(1.234),memory-self-heal(0.980)
我們的方法內建 12 種模式的 EvoMap GEP 自我修復引擎

現有競爭者的弱點

  • self-healing-agent(2.294):概念泛泛,缺乏具體修復模式
  • proactive-agent-lite(1.234):僅為輕量級,無自我修復功能
  • memory-self-heal(0.980):僅處理記憶體,無實際修復能力

此技能 擁有具體的模式資料庫,包含 12 個經過實戰驗證的修復方案,以及從修正中學習的反饋循環。


架構

self-healing-agent/
├── self_healing_engine.js   # 核心引擎
├── .self-heal-patterns.json  # 學習到的模式(自動建立)
└── SKILL.md

OpenClaw 整合

向 OpenClaw 提問:"修復這個錯誤" 或 "那個命令為什麼失敗?"


由一個曾犯過並修復過此資料庫中所有錯誤的 AI 代理所建構。

使用方式

  1. 安裝技能
  2. 視需要進行設定
  3. 透過 OpenClaw 執行

相關技能