← 返回 Skills 市场
Openclaw Auto Recovery
作者
u0003-yxuan
· GitHub ↗
· v1.0.7
· MIT-0
134
总下载
0
收藏
0
当前安装
8
版本数
在 OpenClaw 中安装
/install openclaw-auto-recovery
功能描述
OpenClaw 基础设施心跳监控与自动恢复。用于:部署/卸载心跳守护进程、配置主机监控(Gateway/磁盘/内存/CPU/进程)、设置飞书告警、自动重启故障 Gateway。当用户提到"心跳监控"、"heartbeat daemon"、"服务器告警"、"自动重启"、"健康检查"、"auto recovery"...
安全使用建议
Before installing: (1) Review the scripts line-by-line — they will read and overwrite ~/.openclaw/openclaw.json and write config/backup files under your home directory. (2) Understand required dependencies that are not declared: Node (and an openclaw ws module path), curl, md5sum, vmstat, systemctl. Ensure these exist and are trusted. (3) Provide only minimal credentials: Feishu app secret and gateway token are stored in ~/.config/infra-heartbeat/config.env (chmod 600) and used to obtain tenant tokens and send messages — treat them as sensitive. (4) Test in a safe environment first: the install will create a systemd user service that restarts automatically and can restart the openclaw-gateway service; confirm you are comfortable with that behavior. (5) If you do not trust the source (unknown homepage, no owner transparency), avoid installing or run inside an isolated VM/container. (6) If you want this skill, request that the publisher update registry metadata to explicitly list required env vars and binaries so the requirements match runtime behavior.
功能分析
Type: OpenClaw Skill
Name: openclaw-auto-recovery
Version: 1.0.7
The openclaw-auto-recovery skill is a legitimate infrastructure monitoring and automated recovery tool for OpenClaw. It monitors system resources (CPU, memory, disk) and Gateway connectivity via WebSockets, providing automated restarts and configuration rollbacks if failures are detected. While it requires sensitive credentials such as Feishu API keys and Gateway tokens for alerting and authentication, these are stored in a local configuration file with restricted permissions (~/.config/infra-heartbeat/config.env). The code logic in heartbeat-daemon.sh and install-heartbeat.sh is transparent, well-documented in RELEASE.md, and aligns strictly with the stated purpose of maintaining system availability.
能力评估
Purpose & Capability
The skill's stated purpose (heartbeat + auto-recovery + Feishu alerts) aligns with the scripts' behavior, but the registry metadata declares no required env vars or binaries while the scripts clearly need FEISHU_APP_ID/FEISHU_APP_SECRET/GATEWAY_TOKEN/TARGET_OPEN_ID, Node (and an 'openclaw' npm module ws), and common CLI tools (curl, md5sum, vmstat, systemctl). The omission of these requirements in metadata is an incoherence.
Instruction Scope
The runtime instructions and scripts read and modify user files (e.g., ~/.openclaw/openclaw.json, ~/.config/infra-heartbeat/config.env), create backups, copy/overwrite configuration (last-good.*), and call systemctl --user to restart both the heartbeat service and the openclaw-gateway service. They also call external endpoints (Feishu API) and open a local WebSocket to verify gateway. These actions are consistent with the described purpose but involve access to sensitive local config and the ability to change other services — the SKILL.md/metadata do not highlight these scopes fully.
Install Mechanism
There is no external download/install spec (low supply-chain risk), but the skill includes install/uninstall scripts that will write a user systemd unit and configuration files into the user's home (~/.config/systemd/user, ~/.config/infra-heartbeat). The install assumes a locally-installed Node runtime and an 'openclaw' npm module in the user's global npm path; these dependencies are not declared in metadata.
Credentials
Although registry metadata lists no required env vars, the design requires FEISHU_APP_ID, FEISHU_APP_SECRET, GATEWAY_TOKEN, TARGET_OPEN_ID and will read the OpenClaw gateway secret from ~/.openclaw/openclaw.json. The scripts persist secrets into a config file (chmod 600) and use them to fetch Feishu tenant tokens and send messages. Requesting and storing these credentials is proportionate to sending alerts, but the fact they are undeclared in metadata is a mismatch and increases surprise/risk.
Persistence & Privilege
The skill installs a user-level systemd service (Restart=always) so it will run persistently under the user account. It does not set always:true in the registry, but it will autonomously restart and also invoke systemctl to restart the 'openclaw-gateway' service. Persisting as a user service and restarting another service is functionally required for auto-recovery, but users should be aware it modifies other services and will run continuously.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install openclaw-auto-recovery - 安装完成后,直接呼叫该 Skill 的名称或使用
/openclaw-auto-recovery触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.7
修复CPU检测:改用vmstat 1 1(列15固定为idle)替代top,避免中文locale列位置不稳定;说明飞书99992361为API频率限制非代码bug
v1.0.6
修复中文 locale 兼容性问题:check_memory 改用 awk NR==2 替代 grep Mem;check_cpu 改用 awk NR==3 {100-$4} 替代 grep Cpu(s),避免依赖英文标签
v1.0.5
heartbeat-daemon 核心逻辑从 Bash 迁移至 Node.js,解决 bash 解析器对 node -e 嵌入变量的兼容问题,systemd 服务可正常启动运行
v1.0.4
修复 bash 语法错误:log 语句中 awk 命令的括号被全角字符替换导致 bash -n 解析失败;更新 SKILL.md 版本记录
v1.0.3
新增 RELEASE.md 完整升级历史文档,供用户查阅 skill 每次发布的详细变更说明
v1.0.2
修复回滚逻辑缺陷:重启失败时依次尝试 last-good.1/2/3(最多3个版本),避免回滚到刚保存的坏文件;MD5 去重保存;新增 rollback_one() 处理 JSON 无效场景;将示例 App ID 改为占位符
v1.0.1
将示例 App ID 改为占位符,避免泄露真实值
v1.0.0
Initial release: heartbeat daemon + systemd auto-restart + Feishu alerts
元数据
常见问题
Openclaw Auto Recovery 是什么?
OpenClaw 基础设施心跳监控与自动恢复。用于:部署/卸载心跳守护进程、配置主机监控(Gateway/磁盘/内存/CPU/进程)、设置飞书告警、自动重启故障 Gateway。当用户提到"心跳监控"、"heartbeat daemon"、"服务器告警"、"自动重启"、"健康检查"、"auto recovery"... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 134 次。
如何安装 Openclaw Auto Recovery?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install openclaw-auto-recovery」即可一键安装,无需额外配置。
Openclaw Auto Recovery 是免费的吗?
是的,Openclaw Auto Recovery 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Openclaw Auto Recovery 支持哪些平台?
Openclaw Auto Recovery 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Openclaw Auto Recovery?
由 u0003-yxuan(@u0003-yxuan)开发并维护,当前版本 v1.0.7。
推荐 Skills