← Back to Skills Marketplace
russellfei

Gateway Keeper

by russellfei · GitHub ↗ · v2.0.0
cross-platform ⚠ suspicious
474
Downloads
0
Stars
2
Active Installs
2
Versions
Install in OpenClaw
/install 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 auto...
README (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.

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gateway-keeper
  3. After installation, invoke the skill by name or use /gateway-keeper
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug gateway-keeper
Version 2.0.0
License
All-time Installs 2
Active Installs 2
Total Versions 2
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 474 downloads so far.

How do I install Gateway Keeper?

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

Is Gateway Keeper free?

Yes, Gateway Keeper is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Gateway Keeper support?

Gateway Keeper is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Gateway Keeper?

It is built and maintained by russellfei (@russellfei); the current version is v2.0.0.

💬 Comments