{"skill":{"slug":"dont-be-scary","displayName":"Don't Be Scary","summary":"Update OpenClaw safely on macOS (brew cask install) with automatic snapshot of the npm package + .app bundle, post-update health check, and automatic rollbac...","description":"---\nname: dont-be-scary\ndescription: Update OpenClaw safely on macOS (brew cask install) with automatic snapshot of the npm package + .app bundle, post-update health check, and automatic rollback to the previous version if the gateway doesn't come back. The update script runs detached so it survives the gateway restart that kills the calling agent. Notifies progress via Telegram at every step (start, success, failure, rollback). Use when the user asks to update OpenClaw, upgrade to a new version, run \"openclaw update\", or wants protection against a broken update breaking their gateway. Mac-only (requires brew cask install + launchctl). Requires Telegram configured in openclaw.json and ~500MB free in /tmp.\n---\n\n# dont-be-scary\n\nSafe OpenClaw update with snapshot + auto-rollback. Survives the gateway restart that would otherwise kill the agent mid-operation.\n\n## When to invoke\n\nTrigger when the user requests an OpenClaw update or upgrade. Examples: \"update openclaw\", \"upgrade openclaw\", \"actualízate\", \"openclaw update\".\n\nDo NOT call `openclaw update` directly — the gateway restart kills the calling agent before it can verify success or roll back.\n\n## How to use\n\nLaunch the script **detached** so it survives the gateway restart:\n\n```bash\nnohup \"<path-to-skill>/scripts/safe-update.sh\" </dev/null >/dev/null 2>&1 & disown\n```\n\nThen tell the user: \"Update launched in background. You'll get Telegram updates at each step.\" Do not wait for the script to finish — the gateway restart will likely terminate the current agent session. The user is the source of truth via Telegram.\n\nThe script's path inside an installed skill workspace is typically:\n`<workspace>/skills/dont-be-scary/scripts/safe-update.sh`\n\n## What the script does\n\n1. Reads bot token + chat_id from the user's `~/.openclaw/openclaw.json` (Telegram default account, delivery target).\n2. Snapshots `/opt/homebrew/lib/node_modules/openclaw` and `/Applications/OpenClaw.app` to `/tmp/openclaw-rollback/<timestamp>/` (~500MB).\n3. Sends Telegram: \"🔄 Updating from <X>\".\n4. Runs `openclaw update --json` (which restarts the gateway by itself).\n5. Health check loop (180s) hitting `http://localhost:18789/`.\n6. **Success** → Telegram \"✅ <X> → <Y>\", prunes old snapshots (keeps last 2).\n7. **Failure** → restores snapshot, restarts gateway via launchctl, Telegram \"⚠️ rollback OK\".\n8. **Critical** (rollback also failed) → Telegram urgent message pointing to `references/rescue-prompt.md`.\n\n## Configuration via env vars (all optional)\n\nDefaults match a standard `brew install --cask openclaw` setup. Override only if non-standard:\n\n- `OPENCLAW_TG_CHAT_ID` — Telegram chat to notify (default: auto-detect from `delivery.targets[]`)\n- `OPENCLAW_TG_BOT` — bot account name in config (default: `default`)\n- `OPENCLAW_CONFIG` — path to openclaw.json (default: `~/.openclaw/openclaw.json`)\n- `OPENCLAW_NPM_DIR` — npm install path (default: `/opt/homebrew/lib/node_modules/openclaw`)\n- `OPENCLAW_APP_DIR` — .app bundle (default: `/Applications/OpenClaw.app`)\n- `OPENCLAW_GATEWAY_PORT` — health check port (default: `18789`)\n- `OPENCLAW_PLIST` — LaunchAgent (default: `~/Library/LaunchAgents/ai.openclaw.gateway.plist`)\n- `OPENCLAW_BIN` — openclaw binary (default: `/opt/homebrew/bin/openclaw`)\n- `OPENCLAW_SNAP_ROOT` — snapshot root (default: `/tmp/openclaw-rollback`)\n\n## Requirements\n\n- macOS with brew cask install of OpenClaw\n- ~500MB free in `/tmp`\n- Telegram configured in `openclaw.json` (`channels.telegram.accounts.default.botToken` + a delivery target with `channel: telegram` and `to: <chat_id>`)\n- `python3` and `curl` available (both shipped with macOS)\n\n## If the worst happens\n\nIf the script reports **🚨 CRITICAL**, the gateway is down and the agent inside OpenClaw can't help itself. Open Claude Code on the same Mac and use the prompt in `references/rescue-prompt.md` to recover manually.\n\n## Logs\n\n- Per-run log: `/tmp/openclaw-update-<timestamp>.log`\n- Update output: `/tmp/openclaw-update-<timestamp>.update.json`\n- Snapshots retained: 2 most recent in `/tmp/openclaw-rollback/`\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":317,"installsAllTime":0,"installsCurrent":0,"stars":1,"versions":1},"createdAt":1778047972564,"updatedAt":1778492854429},"latestVersion":{"version":"1.0.0","createdAt":1778047972564,"changelog":"Initial release: safe OpenClaw update with snapshot, health check and auto-rollback. Survives gateway restart, notifies via Telegram.","license":"MIT-0"},"metadata":null,"owner":{"handle":"klouddy-cloud","userId":"s171p8ae0q4jp78ptefy6g1p3h866sj1","displayName":"klouddy-cloud","image":"https://avatars.githubusercontent.com/u/264271790?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780090750745}}