Gateway Keeper
/install gateway-keeper
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 statusevery 15 minutes - Auto-restart — If gateway is down, runs
openclaw gateway start - Recovery signal — Writes
logs/gateway-recovery.jsonwith crash timestamp - Session recovery — HEARTBEAT.md template detects recovery file, prompts agent to check incomplete work
Quick Setup
Install
Run the appropriate install script for your OS:
Windows (PowerShell as Admin):
powershell -ExecutionPolicy Bypass -File "\x3Cskill-dir>/scripts/install.ps1"
Linux/macOS:
bash "\x3Cskill-dir>/scripts/install.sh"
Uninstall
Windows:
powershell -ExecutionPolicy Bypass -File "\x3Cskill-dir>/scripts/uninstall.ps1"
Linux/macOS:
bash "\x3Cskill-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
Edit check interval by modifying the scheduled task/cron entry. Default: 15 minutes.
To change recovery behavior, edit the HEARTBEAT.md recovery section.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gateway-keeper - 安装完成后,直接呼叫该 Skill 的名称或使用
/gateway-keeper触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 474 次。
如何安装 Gateway Keeper?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gateway-keeper」即可一键安装,无需额外配置。
Gateway Keeper 是免费的吗?
是的,Gateway Keeper 完全免费(开源免费),可自由下载、安装和使用。
Gateway Keeper 支持哪些平台?
Gateway Keeper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Gateway Keeper?
由 russellfei(@russellfei)开发并维护,当前版本 v2.0.0。