← 返回 Skills 市场
nwcalvin

Gateway Auto-Fix

作者 nwcalvin · GitHub ↗ · v2.0.0
cross-platform ✓ 安全检测通过
526
总下载
0
收藏
2
当前安装
3
版本数
在 OpenClaw 中安装
/install gateway-auto-fix
功能描述
Automatically monitor OpenClaw gateway status and fix when RPC probe fails. Uses OpenClaw cron system - just install and it works!
使用说明 (SKILL.md)

Gateway Auto-Fix Skill

Overview

This skill automatically monitors the OpenClaw gateway and fixes it when the RPC probe fails. It uses OpenClaw's built-in cron system for scheduling.

What It Does

  1. Checks openclaw gateway status every minute
  2. Detects "RPC probe: failed" in the output
  3. Automatically runs:
    • openclaw doctor --fix to fix config issues
    • openclaw gateway restart to restart the gateway
  4. Logs all actions to /tmp/openclaw-auto-fix.log

Quick Install (Automatic)

npx clawhub install gateway-auto-fix

That's it! The skill will:

  • ✅ Add OpenClaw cron job (every 1 minute)
  • ✅ Create the script
  • ✅ Start monitoring

Manual Install (If ClawHub Not Available)

# 1. Copy the script to workspace
mkdir -p ~/.openclaw-it/workspace
cp /path/to/gateway-auto-fix/openclaw-auto-fix.sh ~/.openclaw-it/workspace/

# 2. Make executable
chmod +x ~/.openclaw-it/workspace/openclaw-auto-fix.sh

# 3. Add OpenClaw cron job
openclaw cron add \
  --name "gateway-auto-fix" \
  --every "1m" \
  --message "Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh" \
  --no-deliver

Manual Uninstall

# Remove cron job
openclaw cron rm gateway-auto-fix

# Remove script
rm ~/.openclaw-it/workspace/openclaw-auto-fix.sh

Usage

Check Cron Status

openclaw cron list
openclaw cron status

Check Logs

tail -f /tmp/openclaw-auto-fix.log

Run Manually

~/.openclaw-it/workspace/openclaw-auto-fix.sh

# Or via OpenClaw cron
openclaw cron run gateway-auto-fix

Troubleshooting

Check if cron is running:

openclaw cron status

Check gateway:

openclaw gateway status

Run manually:

openclaw cron run gateway-auto-fix

Files Created

  • Script: ~/.openclaw-it/workspace/openclaw-auto-fix.sh
  • Log: /tmp/openclaw-auto-fix.log
  • Cron: OpenClaw built-in (every 1 minute)

Configuration

Change Interval

# Remove old job
openclaw cron rm gateway-auto-fix

# Add new job with different interval (e.g., 5 minutes)
openclaw cron add \
  --name "gateway-auto-fix" \
  --every "5m" \
  --message "Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh" \
  --no-deliver

Complete Manual Setup Commands

# Step 1: Create workspace
mkdir -p ~/.openclaw-it/workspace

# Step 2: Create the script
cat > ~/.openclaw-it/workspace/openclaw-auto-fix.sh \x3C\x3C 'EOF'
#!/bin/bash
LOG_FILE="/tmp/openclaw-auto-fix.log"
echo "=== $(date) ===" >> $LOG_FILE
STATUS_OUTPUT=$(openclaw gateway status 2>&1)
echo "$STATUS_OUTPUT" >> $LOG_FILE
if echo "$STATUS_OUTPUT" | grep -q "RPC probe: failed"; then
    echo "RPC probe FAILED! Running auto-fix..." >> $LOG_FILE
    openclaw doctor --fix 2>&1 >> $LOG_FILE
    openclaw gateway restart 2>&1 >> $LOG_FILE
    echo "Auto-fix completed at $(date)" >> $LOG_FILE
else
    echo "Gateway is healthy" >> $LOG_FILE
fi
echo "---" >> $LOG_FILE
EOF

# Step 3: Make executable
chmod +x ~/.openclaw-it/workspace/openclaw-auto-fix.sh

# Step 4: Add OpenClaw cron job
openclaw cron add \
  --name "gateway-auto-fix" \
  --every "1m" \
  --message "Run: ~/.openclaw-it/workspace/openclaw-auto-fix.sh" \
  --no-deliver

# Step 5: Verify
openclaw cron list
安全使用建议
This skill appears to do what it says: monitor the OpenClaw gateway and run fixes automatically. Before installing, review the included scripts yourself and consider: (1) the scripts run 'openclaw doctor --fix' and 'openclaw gateway restart' automatically — this can change configuration and cause service restarts, so test in staging first; (2) the cron runs every minute (adjust if too aggressive); (3) logs are written to /tmp (a world-writable directory) — if the cron runs as a privileged account, consider changing the log path or ensuring permissions to avoid symlink attacks; (4) ensure the OpenClaw CLI is the expected binary on PATH and that you trust it; (5) you can install manually by copying the script and adding the cron, or run setup.sh and inspect its actions. If any of these are concerning, do not install until you can validate behavior in a safe environment.
功能分析
Type: OpenClaw Skill Name: gateway-auto-fix Version: 2.0.0 The skill's behavior is clearly aligned with its stated purpose of monitoring and auto-fixing the OpenClaw gateway. It uses standard OpenClaw CLI commands (`openclaw gateway status`, `openclaw doctor --fix`, `openclaw gateway restart`) and logs actions to `/tmp/openclaw-auto-fix.log`. Persistence is achieved transparently via the `openclaw cron` system, which is explicitly part of the skill's design as detailed in `SKILL.md` and implemented in `setup.sh`. There is no evidence of data exfiltration, malicious execution, obfuscation, or prompt injection against the AI agent. All actions are necessary for the skill's functionality and are performed without any indication of malicious intent.
能力评估
Purpose & Capability
Name and description align with what the scripts and SKILL.md do: they check 'openclaw gateway status', detect the 'RPC probe: failed' string, run 'openclaw doctor --fix' and 'openclaw gateway restart', add an OpenClaw cron job, and log to /tmp. No unrelated services, credentials, or binaries are required.
Instruction Scope
All runtime instructions and the included scripts stay within the stated purpose (monitoring and remediation). However, the skill performs automated corrective actions (doctor --fix and gateway restart) without human approval; this is functionally appropriate but can cause operational disruption if mis-triggered. The scripts write logs to /tmp and create ~/.openclaw-it/workspace/openclaw-auto-fix.sh as described.
Install Mechanism
No install spec; the package is instruction-only and includes setup.sh and the main script. setup.sh writes the script to the user's home workspace and adds an OpenClaw cron job. There are no downloads from external URLs or archive extraction steps.
Credentials
The skill requires no environment variables or external credentials. It only depends on the presence of the OpenClaw CLI and its cron subsystem, which is consistent with the stated goal.
Persistence & Privilege
The skill installs an OpenClaw cron job that runs every 1 minute — this gives it frequent, persistent execution but not 'always: true' or elevated system-wide privileges. Frequent automatic remediation is expected for the use case but could be aggressive; the skill does not alter other skills' configs or request broader privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gateway-auto-fix
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gateway-auto-fix 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
**Summary**: Version 2.0.0 migrates gateway health checks and auto-fix scheduling to the OpenClaw built-in cron system. - Uses OpenClaw's built-in cron system instead of standard OS cron for scheduling. - Updated setup and uninstall instructions to use `openclaw cron add` and `openclaw cron rm`. - Simplified manual install steps and removed legacy OS-specific cron references. - Clarified logging and health check instructions. - Documentation and usage commands updated throughout for clarity and alignment with current OpenClaw conventions.
v1.1.0
- Added automatic one-line setup script (setup.sh) for quick installation and configuration. - Updated SKILL.md with streamlined install instructions and clearer troubleshooting/remove steps. - Improved documentation of manual and automatic setup, including exact files created and permissions. - Enhanced clarity around cron job setup, configuration, and removal. - No changes to main auto-fix logic—this update focuses on better onboarding and usability.
v1.0.0
- Initial release of Gateway Auto-Fix skill. - Automatically monitors OpenClaw gateway health via cron. - Detects failed RPC probes and runs auto-remediation commands. - Logs all actions to `/tmp/openclaw-auto-fix.log`. - Installation adds script and configures cron job for periodic checks.
元数据
Slug gateway-auto-fix
版本 2.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 3
常见问题

Gateway Auto-Fix 是什么?

Automatically monitor OpenClaw gateway status and fix when RPC probe fails. Uses OpenClaw cron system - just install and it works!. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 526 次。

如何安装 Gateway Auto-Fix?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gateway-auto-fix」即可一键安装,无需额外配置。

Gateway Auto-Fix 是免费的吗?

是的,Gateway Auto-Fix 完全免费(开源免费),可自由下载、安装和使用。

Gateway Auto-Fix 支持哪些平台?

Gateway Auto-Fix 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Gateway Auto-Fix?

由 nwcalvin(@nwcalvin)开发并维护,当前版本 v2.0.0。

💬 留言讨论