简介
Gateway Keeper
原始描述
OS-level watchdog that monitors OpenClaw gateway health and auto-restarts on crash. After restart, triggers session recovery so interrupted work resumes auto...
通过你的 Agent 添加
安装目录:gateway-keeper/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: gateway-keeper
description: >
OS-level watchdog that monitors OpenClaw gateway health and auto-restarts on crash.
After restart, triggers session recovery so interrupted work resumes automatically.
Use when setting up gateway reliability, crash recovery, auto-restart, or watchdog
monitoring for OpenClaw deployments. Supports Windows (Task Scheduler + PowerShell)
and Linux/macOS (systemd/cron + bash). Triggers: "gateway-keeper", "watchdog",
"gateway health", "auto-restart gateway", "crash recovery".
Gateway Keeper
OS-level watchdog for OpenClaw gateway. Runs outside the gateway process so it survives crashes.
How It Works
- Health check — Runs
openclaw gateway status every 15 minutes
- Auto-restart — If gateway is down, runs
openclaw gateway start
- Recovery signal — Writes
logs/gateway-recovery.json with crash timestamp
- Session recovery — HEARTBEAT.md template detects recovery file, prompts agent to check incomplete work
Quick Setup
Install
openclaw gateway status every 15 minutesopenclaw gateway startlogs/gateway-recovery.json with crash timestampInstall
Run the appropriate install script for your OS:
Windows (PowerShell as Admin):
powershell -ExecutionPolicy Bypass -File "<skill-dir>/scripts/install.ps1"
Linux/macOS:
bash "<skill-dir>/scripts/install.sh"
Uninstall
Windows:
powershell -ExecutionPolicy Bypass -File "<skill-dir>/scripts/uninstall.ps1"
Linux/macOS:
bash "<skill-dir>/scripts/uninstall.sh"
Recovery Protocol
After gateway restart, the agent should check logs/gateway-recovery.json:
{
"crashed_at": "2026-02-26T00:00:00Z",
"restarted_at": "2026-02-26T00:15:00Z",
"restarted_by": "gateway-keeper"
}
Add to HEARTBEAT.md (done automatically by install script):
## Gateway Crash Recovery
If `logs/gateway-recovery.json` exists:
1. Read crash timestamp
2. List all active sessions/sub-agents
3. Check each for incomplete work
4. Resume or retry as needed
5. Delete the recovery file when done
Files
File
Purpose
scripts/check-gateway.ps1
Windows health check + restart
scripts/check-gateway.sh
Linux/macOS health check + restart
scripts/install.ps1
Windows Task Scheduler setup
scripts/install.sh
Linux/macOS cron/systemd setup
scripts/uninstall.ps1
Windows cleanup
scripts/uninstall.sh
Linux/macOS cleanup
Customization
| File | Purpose |
|---|---|
scripts/check-gateway.ps1 |
Windows health check + restart |
scripts/check-gateway.sh |
Linux/macOS health check + restart |
scripts/install.ps1 |
Windows Task Scheduler setup |
scripts/install.sh |
Linux/macOS cron/systemd setup |
scripts/uninstall.ps1 |
Windows cleanup |
scripts/uninstall.sh |
Linux/macOS cleanup |
Edit check interval by modifying the scheduled task/cron entry. Default: 15 minutes.
To change recovery behavior, edit the HEARTBEAT.md recovery section.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。