🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

Error Recovery Automation

by @konscious0beast

Standardize handling of common OpenClaw errors (gateway restart, browser service unavailable, cron failures) with automated recovery steps. Use when you need...

Versionv1.0.0
Installs9
When to Use
TriggerAction
- You are setting up proactive monitoring and need a recovery plan beyond just detection.
- You want to reduce the manual steps required when “Läuft alles?” reveals a failure.
- You need to ensure critical OpenClaw components stay running with minimal user intervention.
- You are asked to “create a skill for error recovery automation” (this is that skill).
💡 Examples

Example 1: Gateway Recovery Automation

Script: scripts/gateway-recovery.sh (see template above). Cron schedule: every 1 hour. Announce only on failure.

Example 2: Browser Recovery Automation

Script: scripts/browser-recovery.sh (see template above). Cron schedule: every 30 minutes. Announce only on failure.

Example 3: Combined Health‑Check + Recovery

A single script that checks multiple services and recovers any that are unhealthy. Useful for a comprehensive “keep‑alive” cron job.

#!/bin/bash
set -e

log() { echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*"; }

Check gateway

if ! openclaw gateway status > /dev/null 2>&1; then log "Gateway unhealthy, restarting..." openclaw gateway restart sleep 5 fi

Check browser

if ! openclaw browser --browser-profile openclaw status --json 2>&1 | grep -q '"running":true'; then log "Browser unhealthy, restarting..." openclaw browser --browser-profile openclaw stop sleep 2 openclaw browser --browser-profile openclaw start sleep 8 fi

log "All services healthy" exit 0

Schedule this script every 30 minutes with an isolated agentTurn job.

View on ClawHub
TERMINAL
clawhub install error-recovery-automation

🧪 Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

🔍 Can't find the right skill?

Search 60,000+ AI agent skills — free, no login needed.

Search Skills →