← Back to Skills Marketplace
nwcalvin

Gateway Auto-Fix

by nwcalvin · GitHub ↗ · v2.0.0
cross-platform ✓ Security Clean
526
Downloads
0
Stars
2
Active Installs
3
Versions
Install in OpenClaw
/install gateway-auto-fix
Description
Automatically monitor OpenClaw gateway status and fix when RPC probe fails. Uses OpenClaw cron system - just install and it works!
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gateway-auto-fix
  3. After installation, invoke the skill by name or use /gateway-auto-fix
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug gateway-auto-fix
Version 2.0.0
License
All-time Installs 2
Active Installs 2
Total Versions 3
Frequently Asked Questions

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.

💬 Comments