首页龙虾技能列表 › Gateway Watchdog — 技能工具

Gateway Watchdog — 技能工具

v1.0.0

Production-grade bash watchdog for the OpenClaw gateway. Runs via launchd every 5 minutes. Handles boot grace periods, progressive retry with backoff, port-l...

0· 116·0 当前·0 累计
by @bryantegomoh (Bryan Tegomoh, MD, MPH)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/22
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill is a coherent, macOS-specific watchdog that only interacts with the local OpenClaw gateway process (HTTP on localhost, lsof, launchctl) and does not request external credentials or network endpoints.
评估建议
This skill appears to do what it says: local health checks and restart of the OpenClaw gateway via launchd. Before installing: (1) Verify the script path in the provided plist points to the actual location you intend to run; (2) ensure required binaries exist on your machine (launchctl, curl, lsof, and macOS date -j); (3) run the script manually once and inspect ~/.openclaw/logs/watchdog.log to confirm behavior; (4) confirm the launchd label ai.openclaw.gateway matches your gateway job and you w...
详细分析 ▾
用途与能力
The script's actions (HTTP health check, port check, PID/age checks, and restart via launchctl) match the described purpose of a gateway watchdog. Minor inconsistency: registry metadata lists 'Required binaries: none' while the SKILL.md/script rely on macOS tools (launchctl, lsof, date -j) and curl; those runtime dependencies are expected but not declared in metadata.
指令范围
SKILL.md and the script confine activity to local checks and local restarts: curl against http://127.0.0.1:18789, lsof for port binding, ps/date for process age, and launchctl to restart the ai.openclaw.gateway job. Logs are written to ~/.openclaw/logs/watchdog.log and a cooldown file in /tmp. There are no external network endpoints or data exfiltration behaviors.
安装机制
This is an instruction-only skill with an included shell script; there is no install spec that downloads or writes arbitrary code to disk beyond the provided script. Risk from installation is low (user-controlled plist creation + launchctl load).
凭证需求
The skill requests no credentials or environment variables. It uses $HOME and standard system tools; no secrets are accessed or transmitted. The script acts only on a local service label (ai.openclaw.gateway), which is appropriate for a watchdog.
持久化与权限
The skill is not 'always:true'. It can be invoked by the agent autonomously (default), and the script calls launchctl kickstart to restart the gateway job. Restarting another launchd job is a legitimate high-impact action for a watchdog, so users should be aware that installing and enabling this skill grants the agent the ability to restart the gateway process in the user's session.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/22

Initial release of gateway-watchdog for OpenClaw gateway. - Production-ready bash watchdog designed for maximum reliability and false positive prevention. - Five defensive layers: HTTP check, boot grace period, port-level fallback, progressive retry with backoff, and restart cooldown. - Runs automatically via launchd every 5 minutes on macOS. - Prevents restart loops and ensures the gateway remains available. - Logs written to `~/.openclaw/logs/watchdog.log`.

● 无害

安装命令 点击复制

官方npx clawhub@latest install gateway-watchdog-v2
镜像加速npx clawhub@latest install gateway-watchdog-v2 --registry https://cn.clawhub-mirror.com

技能文档

Keeps the OpenClaw gateway alive without killing it during startup. Five defensive layers prevent false restarts and restart loops.

How It Works

  • HTTP check — pings http://127.0.0.1:18789; exits immediately if the gateway responds
  • Boot grace — if the process is <180s old, waits without acting (avoids killing a booting gateway)
  • Port check — if the port is bound but HTTP is slow, waits up to 15s for recovery
  • Progressive retry — 3 retries at 15s / 30s / 45s intervals
  • Cooldown — enforces a 10-minute gap between restarts to prevent loops

Logs go to ~/.openclaw/logs/watchdog.log.

Setup (macOS launchd)

Create ~/Library/LaunchAgents/com.openclaw.gateway-watchdog.plist:





    Label
    com.openclaw.gateway-watchdog
    ProgramArguments
    
        /bin/bash
        /path/to/skills/gateway-watchdog/scripts/gateway-watchdog.sh
    
    StartInterval
    300
    RunAtLoad
    


Then load it:

launchctl load ~/Library/LaunchAgents/com.openclaw.gateway-watchdog.plist

Usage (manual)

bash scripts/gateway-watchdog.sh

Requirements

  • macOS (uses launchctl, lsof, date -j)
  • curl in PATH
  • OpenClaw gateway running under launchd as ai.openclaw.gateway
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务