← Back to Skills Marketplace
u0003-yxuan

Openclaw Auto Recovery

by u0003-yxuan · GitHub ↗ · v1.0.7 · MIT-0
cross-platform ⚠ suspicious
134
Downloads
0
Stars
0
Active Installs
8
Versions
Install in OpenClaw
/install openclaw-auto-recovery
Description
OpenClaw 基础设施心跳监控与自动恢复。用于:部署/卸载心跳守护进程、配置主机监控(Gateway/磁盘/内存/CPU/进程)、设置飞书告警、自动重启故障 Gateway。当用户提到"心跳监控"、"heartbeat daemon"、"服务器告警"、"自动重启"、"健康检查"、"auto recovery"...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install openclaw-auto-recovery
  3. After installation, invoke the skill by name or use /openclaw-auto-recovery
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug openclaw-auto-recovery
Version 1.0.7
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 8
Frequently Asked Questions

What is Openclaw Auto Recovery?

OpenClaw 基础设施心跳监控与自动恢复。用于:部署/卸载心跳守护进程、配置主机监控(Gateway/磁盘/内存/CPU/进程)、设置飞书告警、自动重启故障 Gateway。当用户提到"心跳监控"、"heartbeat daemon"、"服务器告警"、"自动重启"、"健康检查"、"auto recovery"... It is an AI Agent Skill for Claude Code / OpenClaw, with 134 downloads so far.

How do I install Openclaw Auto Recovery?

Run "/install openclaw-auto-recovery" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Openclaw Auto Recovery free?

Yes, Openclaw Auto Recovery is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Openclaw Auto Recovery support?

Openclaw Auto Recovery is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Openclaw Auto Recovery?

It is built and maintained by u0003-yxuan (@u0003-yxuan); the current version is v1.0.7.

💬 Comments