com um clique
upgrade-guard
// Safe OpenClaw upgrades with snapshot, pre-flight checks, controlled upgrade steps, post-verification, and emergency rollback. Never lose your working system to a bad update again.
// Safe OpenClaw upgrades with snapshot, pre-flight checks, controlled upgrade steps, post-verification, and emergency rollback. Never lose your working system to a bad update again.
| name | upgrade-guard |
| description | Safe OpenClaw upgrades with snapshot, pre-flight checks, controlled upgrade steps, post-verification, and emergency rollback. Never lose your working system to a bad update again. |
| metadata | {"openclaw":{"emoji":"🔄"}} |
Never lose a working OpenClaw to a bad upgrade again.
Born from 7 cascading failures during a single version jump. The gateway crashed, Telegram disconnected, plugins broke, models vanished — and the AI agent that caused it was also dead, so nobody could fix it remotely.
This skill makes upgrades safe.
OpenClaw upgrades can break in ways that are invisible until it's too late:
| Failure type | Example |
|---|---|
| Plugin renames | clawdbot.plugin.json → openclaw.plugin.json |
| Dependency breaks | SDK module paths change, exports shift |
| Config schema changes | New required fields, removed fields |
| Model name changes | Dot vs hyphen format changes |
| Channel config wipes | Silent removal during migration |
A single git pull && pnpm install can trigger all of these simultaneously.
snapshot)Captures your entire working state:
check)Before touching anything:
upgrade)Controlled 6-step process:
git pull (rollback on fail)pnpm install + pnpm run build (rollback on fail)verify)After upgrade, checks everything:
rollback)Emergency restore:
# Before upgrading: take a snapshot
bash scripts/upgrade-guard.sh snapshot
# Check what's coming
bash scripts/upgrade-guard.sh check
# See current state
bash scripts/upgrade-guard.sh status
# Do the upgrade (safe, with auto-rollback on failure)
bash scripts/upgrade-guard.sh upgrade
# Or just preview without changing anything
bash scripts/upgrade-guard.sh upgrade --dry-run
# After upgrade: verify everything works
bash scripts/upgrade-guard.sh verify
# Something broke? Emergency rollback
bash scripts/upgrade-guard.sh rollback
MANDATORY before any OpenClaw upgrade:
upgrade-guard.sh snapshot — save current stateupgrade-guard.sh check — verify pre-conditionsupgrade-guard.sh upgrade — let the script handle itupgrade-guard.sh rollbackNEVER run blind git pull && pnpm install without snapshotting first.
| Check | config-guard | upgrade-guard |
|---|---|---|
| Bad config values | ✅ | ❌ |
| Plugin file renames | ❌ | ✅ |
| Dependency breaks | ❌ | ✅ |
| Broken symlinks | ❌ | ✅ |
| Version tracking | ❌ | ✅ |
| Git state management | ❌ | ✅ |
| Gateway log analysis | ❌ | ✅ |
| Full system rollback | ❌ | ✅ |
Use both together: config-guard for config changes, upgrade-guard for version upgrades.
The watchdog runs independently via systemd timer. It survives gateway crashes, AI agent death, and server reboots.
# Install (checks every 60 seconds)
bash scripts/watchdog.sh install
# Check health manually
bash scripts/watchdog.sh check
# View status and recent events
bash scripts/watchdog.sh status
# Remove
bash scripts/watchdog.sh uninstall
| Consecutive failures | Action |
|---|---|
| 1-2 | Log and wait |
| 3 | Restart gateway |
| 6+ | Rollback to last snapshot |
watchdog.log for post-mortemclawdhub install upgrade-guard
# or clone directly
git clone https://github.com/jzOcb/upgrade-guard
bash 4+python3curlgitpnpm or npm