/install autoheal
AutoHeal AI Skill
AutoHeal captures production JavaScript/TypeScript errors, analyzes them with AI, and generates platform-specific fix prompts you can paste directly into your AI coding tool.
1. Setup AutoHeal in a Project
Browser Project (React, Next.js, Vue, Svelte, etc.)
Add this snippet to your app's entry point (e.g., main.tsx, layout.tsx, App.vue):
\x3Cscript>
window.onerror = function(msg, source, line, col, err) {
fetch("https://autohealai.com/api/errors/ingest", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
key: process.env.AUTOHEAL_API_KEY || "YOUR_API_KEY",
message: msg,
stack: err?.stack || "",
source_url: source,
browser: navigator.userAgent
})
}).catch(() => {});
};
window.onunhandledrejection = function(e) {
const err = e.reason;
fetch("https://autohealai.com/api/errors/ingest", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
key: process.env.AUTOHEAL_API_KEY || "YOUR_API_KEY",
message: err?.message || String(err),
stack: err?.stack || "",
source_url: window.location.href,
browser: navigator.userAgent
})
}).catch(() => {});
};
\x3C/script>
Node.js / Server Project
Add this to your server entry point:
process.on('uncaughtException', (err) => {
fetch("https://autohealai.com/api/errors/ingest", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
key: process.env.AUTOHEAL_API_KEY,
message: err.message,
stack: err.stack || ""
})
}).catch(() => {});
});
process.on('unhandledRejection', (reason) => {
const err = reason instanceof Error ? reason : new Error(String(reason));
fetch("https://autohealai.com/api/errors/ingest", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
key: process.env.AUTOHEAL_API_KEY,
message: err.message,
stack: err.stack || ""
})
}).catch(() => {});
});
2. Check Error Status
After an error is ingested, check its analysis status:
curl -s "https://autohealai.com/api/errors/{ERROR_ID}/status" \
-H "Authorization: Bearer $AUTOHEAL_API_KEY"
Response:
{
"status": "analyzed",
"message": "Cannot read properties of undefined",
"has_fix": true,
"fix_id": "uuid-here",
"dashboard_url": "https://autohealai.com/dashboard/errors/{ERROR_ID}"
}
Possible statuses: new, analyzing, analyzed, fix_applied, ignored
View the full fix with AI-generated fix prompt at the dashboard_url.
3. Report an Error Manually
Send any error directly to AutoHeal:
curl -X POST "https://autohealai.com/api/errors/ingest" \
-H "Content-Type: application/json" \
-d '{
"key": "'$AUTOHEAL_API_KEY'",
"message": "TypeError: Cannot read properties of undefined (reading '\''map'\'')",
"stack": "TypeError: Cannot read properties of undefined\
at renderList (src/components/List.tsx:15:23)"
}'
Response:
{
"status": "queued",
"error_id": "uuid-here"
}
The error will be analyzed by AI within seconds. Check status using the error_id from the response.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install autoheal - 安装完成后,直接呼叫该 Skill 的名称或使用
/autoheal触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
AutoHeal AI 是什么?
Add AI-powered error monitoring and auto-fix generation to any project. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 480 次。
如何安装 AutoHeal AI?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install autoheal」即可一键安装,无需额外配置。
AutoHeal AI 是免费的吗?
是的,AutoHeal AI 完全免费(开源免费),可自由下载、安装和使用。
AutoHeal AI 支持哪些平台?
AutoHeal AI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 AutoHeal AI?
由 hankmint(@hankmint)开发并维护,当前版本 v1.0.0。