/install gateway-auto-fix
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
- Checks
openclaw gateway statusevery minute - Detects "RPC probe: failed" in the output
- Automatically runs:
openclaw doctor --fixto fix config issuesopenclaw gateway restartto restart the gateway
- 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
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gateway-auto-fix - After installation, invoke the skill by name or use
/gateway-auto-fix - Provide required inputs per the skill's parameter spec and get structured output
What is Gateway Auto-Fix?
Automatically monitor OpenClaw gateway status and fix when RPC probe fails. Uses OpenClaw cron system - just install and it works!. It is an AI Agent Skill for Claude Code / OpenClaw, with 526 downloads so far.
How do I install Gateway Auto-Fix?
Run "/install gateway-auto-fix" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Gateway Auto-Fix free?
Yes, Gateway Auto-Fix is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Gateway Auto-Fix support?
Gateway Auto-Fix is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Gateway Auto-Fix?
It is built and maintained by nwcalvin (@nwcalvin); the current version is v2.0.0.