gateway-watchdog
Production-grade bash watchdog for the OpenClaw gateway. Runs via launchd every 5 minutes. Handles boot grace periods, progressive retry with backoff, port-level fallback checks, stale PID detection, and restart cooldowns — preventing restart loops while keeping the gateway reliably alive.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bryantegomoh/gateway-watchdog-v2What This Skill Does
The gateway-watchdog is a production-grade bash utility designed specifically for the OpenClaw ecosystem. Its primary function is to ensure maximum uptime for the OpenClaw gateway process by acting as a defensive, intelligent monitor. Unlike simple cron jobs that blindly kill processes, this watchdog employs five distinct layers of logic: HTTP heartbeat verification, boot-time grace periods, active port-binding checks, progressive retry backoff, and strict restart cooldowns. By detecting stale PIDs and unresponsive services, it automatically remediates issues while strictly adhering to safety constraints that prevent dangerous restart loops.
Installation
Installation is performed via the OpenClaw CLI. Run clawhub install openclaw/skills/skills/bryantegomoh/gateway-watchdog-v2. After the files are localized, create the macOS launchd configuration file at ~/Library/LaunchAgents/com.openclaw.gateway-watchdog.plist using the provided XML template. Ensure the path to the script points correctly to your local installation directory. Once the file is saved, execute launchctl load ~/Library/LaunchAgents/com.openclaw.gateway-watchdog.plist to register the watchdog with the system process manager. Verify success by checking ~/.openclaw/logs/watchdog.log.
Use Cases
- Production Stability: Ensures the OpenClaw gateway remains responsive in headless macOS environments.
- Remote Maintenance: Acts as a reliable safety net for OpenClaw nodes that are hard to access manually.
- Service Recovery: Automatically recovers from transient network socket lockups without requiring human intervention.
- Development Workflows: Prevents developer frustration by handling the lifecycle management of local gateway processes.
Example Prompts
- "OpenClaw, please verify if the gateway-watchdog is currently running and check the status of my gateway logs."
- "Can you help me install the latest version of the gateway-watchdog and set up the launchd agent?"
- "I noticed my gateway restarted; show me the last ten entries in the watchdog logs to understand why."
Tips & Limitations
This skill requires macOS due to its dependency on native launchctl and lsof commands. It is optimized for the ai.openclaw.gateway process. Avoid running multiple instances of the watchdog, as they may conflict with the cooldown timers. If you are experiencing frequent restarts, check the gateway logs independently to ensure the issue isn't a configuration error causing immediate process crashes.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bryantegomoh-gateway-watchdog-v2": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
crawlee-web-scraper
Resilient web scraper with bot-detection evasion using the Crawlee library. Use when web_fetch is blocked by rate limits or bot detection. Supports single URLs, bulk file input, and automatic fallback from requests to Crawlee on 403/429 responses.
dronemobile
Control vehicles via DroneMobile (Firstech/Compustar remote start systems). Use when the user asks to start their car, stop the engine, lock/unlock doors, open the trunk, check battery voltage, or get vehicle status. Triggers on phrases like "start my car", "remote start", "lock my car", "unlock the car", "check battery", "open trunk", "stop the engine", "vehicle status". Requires DRONEMOBILE_EMAIL and DRONEMOBILE_PASSWORD environment variables. Optionally DRONEMOBILE_DEVICE_KEY for multi-vehicle accounts.
content-security-filter
Prompt injection and malware detection filter for external content. Scans text, files, or URLs for 20+ attack patterns including instruction overrides, credential exfiltration, persona hijacking, encoded payloads, fake system messages, and invisible character injection. Returns JSON with risk level and sanitized text.