← Back to Skills Marketplace
Auto-Heal
by
zacharyzax
· GitHub ↗
· v1.0.0
· MIT-0
358
Downloads
0
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install auto-heal
Description
自动监控 OpenClaw 状态,每60秒检测并自动修复卡死、无响应和内存超限问题,确保服务稳定运行。
README (SKILL.md)
Auto-Heal Skill
全天自动监控 OpenClaw 状态,检测到卡死自动修复。
触发条件
当用户询问以下问题时激活:
- "自动修复卡死"
- "监控 OpenClaw"
- "自动重启"
- "健康检查"
- "防止卡死"
- "守护进程"
功能
1. Gateway 监控
- 每 60 秒检查一次 gateway 状态
- 如果无响应或异常,自动重启
2. Agent 会话监控
- 检测卡死的 Agent 会话(30分钟无响应)
- 自动清理僵尸会话
3. 内存监控
- 监控 OpenClaw 内存使用
- 超过 80% 时自动清理和重启
4. 日志记录
- 所有操作记录到
logs/auto-heal.log - 状态保存到
state.json
使用方法
启动监控
# 前台运行
node ~/.openclaw/workspace/skills/auto-heal/monitor.js
# 后台运行
nohup node ~/.openclaw/workspace/skills/auto-heal/monitor.js > /dev/null 2>&1 &
使用 Cron 定时任务(推荐)
# 编辑 crontab
crontab -e
# 添加每5分钟检查一次
*/5 * * * * cd ~/.openclaw/workspace/skills/auto-heal && node monitor.js --check-once
手动检查
openclaw health check
配置
编辑 ~/.openclaw/openclaw.json:
{
"skills": {
"auto-heal": {
"enabled": true,
"checkInterval": 60,
"autoFix": true,
"memoryThreshold": 80,
"notifyChannel": "feishu"
}
}
}
工作流程
启动监控
↓
每60秒执行健康检查
↓
检查 Gateway 状态
检查 Agent 会话
检查内存使用
↓
发现问题?
↓ 是
自动修复
↓
记录日志
↓
等待下一次检查
日志查看
# 实时查看日志
tail -f ~/.openclaw/workspace/skills/auto-heal/logs/auto-heal.log
# 查看最近100行
tail -n 100 ~/.openclaw/workspace/skills/auto-heal/logs/auto-heal.log
状态查看
cat ~/.openclaw/workspace/skills/auto-heal/state.json
注意事项
- 监控脚本需要
openclawCLI 可用 - 确保有足够的权限执行重启命令
- 日志文件会定期清理(保留7天)
- 如果自动修复失败,会记录错误日志
Usage Guidance
This skill appears to implement a legitimate OpenClaw watchdog, but take these precautions before installing or running it:
- Verify you actually have the openclaw CLI installed and that the registry entry should have declared that requirement (install.js checks 'which openclaw').
- Inspect the included monitor.js and install.js yourself (they are small and provided). The monitor executes shell commands that can restart the gateway, kill sessions, delete old logs, and overwrite ~/.openclaw/openclaw.json.
- Do not run install or monitor as root. Run in a staging/non-production environment first to observe behavior.
- Backup ~/.openclaw/openclaw.json and any important data before running install.js, since it will write config entries.
- If you plan to enable cron/daemon mode, test a single run with `node monitor.js --check-once` to confirm results.
- Confirm the source/trustworthiness of the code (registry shows source unknown though README references a GitHub repo). If you cannot verify the upstream repository or maintainer, avoid automated installation and consider manually copying only the parts you understand.
If you want a higher-confidence assessment, provide the skill's upstream repository URL or confirm how you obtained the files so I can check for typosquatting, commit history, or upstream releases.
Capability Analysis
Type: OpenClaw Skill
Name: auto-heal
Version: 1.0.0
The 'auto-heal' skill provides automated monitoring and recovery for OpenClaw but utilizes high-risk implementation patterns. Specifically, monitor.js and install.js use execSync to execute shell commands constructed with string interpolation (e.g., session IDs and process lookups), which is a classic shell injection vulnerability. Furthermore, the skill modifies the global OpenClaw configuration file (~/.openclaw/openclaw.json) and manages system processes, which are powerful capabilities that lack sufficient input sanitization.
Capability Assessment
Purpose & Capability
The name/description (auto-monitor and auto-repair OpenClaw) align with the code and SKILL.md behavior. However the registry metadata declares no required binaries while both SKILL.md and install.js/monitor.js require the 'openclaw' CLI to be present. That missing declaration is an incoherence the user should notice.
Instruction Scope
Runtime instructions and monitor.js run many shell commands (openclaw gateway status/restart, openclaw sessions list/kill, ps/pgrep, find ... -delete) and write to ~/.openclaw/openclaw.json, logs/, and state.json. These actions are within a monitor's expected scope but are high‑impact (restarting services, killing sessions, deleting old logs). The SKILL.md does not limit when or how aggressively fixes are applied beyond config, and it assumes the agent user has permission to perform restarts/kills.
Install Mechanism
There is no official install spec in the registry entry (instruction-only skill), but the repo files include install.js and a README that suggests 'git clone' and 'npm install'. The code itself does not fetch remote payloads at runtime. Because the registry metadata lacks an install step, users must be careful how they obtain and install these files (verify origin) before running npm install / running the scripts.
Credentials
The skill does not request environment variables or external credentials, which is consistent with its local-monitoring purpose. It does, however, read and write user configuration (~/.openclaw/openclaw.json) and creates logs in the skill directory — this is expected but high-privilege relative to ordinary read-only tools.
Persistence & Privilege
The skill does not set always: true and is user-invocable (normal). It writes its own configuration and logs and suggests cron entries (user-level persistence). There is no evidence it modifies other skills or system-wide agent settings, but it will perform privileged actions (restart gateway, kill sessions) when run — ensure the process is not run as root unless intended.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install auto-heal - After installation, invoke the skill by name or use
/auto-heal - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: 7x24 monitoring and auto-fix for OpenClaw
Metadata
Frequently Asked Questions
What is Auto-Heal?
自动监控 OpenClaw 状态,每60秒检测并自动修复卡死、无响应和内存超限问题,确保服务稳定运行。 It is an AI Agent Skill for Claude Code / OpenClaw, with 358 downloads so far.
How do I install Auto-Heal?
Run "/install auto-heal" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Auto-Heal free?
Yes, Auto-Heal is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Auto-Heal support?
Auto-Heal is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Auto-Heal?
It is built and maintained by zacharyzax (@zacharyzax); the current version is v1.0.0.
More Skills