← 返回 Skills 市场
russellfei

Gateway Keeper

作者 russellfei · GitHub ↗ · v2.0.0
cross-platform ⚠ suspicious
474
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

Gateway Keeper

OS-level watchdog for OpenClaw gateway. Runs outside the gateway process so it survives crashes.

How It Works

  1. Health check — Runs openclaw gateway status every 15 minutes
  2. Auto-restart — If gateway is down, runs openclaw gateway start
  3. Recovery signal — Writes logs/gateway-recovery.json with crash timestamp
  4. 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.

安全使用建议
Before installing: (1) Inspect scripts yourself — check-gateway.sh calls the 'openclaw' CLI which must exist and be trusted; metadata does not declare this dependency. (2) Note SKILL.md mentions Windows/PowerShell and systemd support, but only POSIX shell scripts are included — Windows users are missing the promised .ps1 files. (3) The installer will add a cron job and append to HEARTBEAT.md (if present) and will write logs and logs/gateway-recovery.json in your OpenClaw workspace; back up HEARTBEAT.md and your crontab if needed. (4) If you run install.sh, run it as the intended user (it modifies that user's crontab and files). (5) If you want to proceed, test in a non-production environment first and ensure the 'openclaw' CLI path and behavior are what the script expects. The inconsistencies are likely sloppy packaging, not malicious intent, but they should be resolved before trusting the skill in production.
功能分析
Type: OpenClaw Skill Name: gateway-keeper Version: 2.0.0 The gateway-keeper skill is a legitimate watchdog utility designed to monitor and restart the OpenClaw gateway. It implements persistence via a standard cron job (scripts/install.sh) to execute a health check script (scripts/check-gateway.sh) every 15 minutes. It also includes a recovery protocol that instructs the AI agent to resume interrupted tasks by monitoring a local JSON recovery file. No evidence of data exfiltration, malicious command execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
The scripts implement a gateway health check, auto-restart, and a recovery-file mechanism consistent with the declared purpose. However, the package metadata declares no required binaries while the check script calls the 'openclaw' CLI; that binary is essential for the skill to function but is not declared. This mismatch reduces transparency and could cause failures or unexpected behavior.
Instruction Scope
SKILL.md instructs installing both Windows (PowerShell) and systemd-based setups, but the repository only includes POSIX shell scripts (install.sh, check-gateway.sh, uninstall.sh). The instructions reference a POWERHELL/PS1 install flow and check-gateway.ps1 which are not present. The scripts also read and write files under OPENCLAW_WORKSPACE (logs, HEARTBEAT.md) and modify the user's crontab — actions that are within the stated watchdog scope but were not fully documented in metadata (the OPENCLAW_WORKSPACE env var is used but not declared).
Install Mechanism
There is no external download/install step — installation is performed by local install scripts that make the cron entry and append to HEARTBEAT.md. No remote code fetches or archive extraction are present in the provided files, which is lower risk. Still, running install scripts modifies the user's crontab and workspace files, so they should be inspected before running.
Credentials
The skill requests no credentials and doesn't exfiltrate data. But it implicitly requires the 'openclaw' CLI and optionally respects OPENCLAW_WORKSPACE; neither requirement is listed in the metadata. The scripts create logs and a recovery JSON file in the workspace which could contain timestamps and status output; this is reasonable for a watchdog but should be understood by the installer.
Persistence & Privilege
The skill does not request always: true and does not modify other skills. It persists by installing a user cron job and appending instructions to HEARTBEAT.md — expected for a watchdog. This gives it autonomous periodic execution (cron), which is appropriate but worth noting.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gateway-keeper
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gateway-keeper 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
v2: Fix Windows path handling, add legacy task cleanup, improve error handling and logging
v1.0.0
Initial release of gateway-keeper, an OS-level watchdog for OpenClaw gateway reliability. - Monitors OpenClaw gateway status every 15 minutes and auto-restarts on crash. - Triggers a session recovery protocol to resume interrupted work automatically after restart. - Supports installation and uninstallation via scripts for Windows (Task Scheduler + PowerShell) and Linux/macOS (systemd/cron + bash). - Writes a crash recovery log and integrates with HEARTBEAT.md for guided agent recovery. - Customizable check interval and recovery steps.
元数据
Slug gateway-keeper
版本 2.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 2
常见问题

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。

💬 留言讨论