← Back to Skills Marketplace
extraterrest

auto-rollback

by extraterrest · GitHub ↗ · v1.2.0-alpha.2 · MIT-0
darwin ✓ Security Clean
605
Downloads
0
Stars
5
Active Installs
7
Versions
Install in OpenClaw
/install auto-rollback
Description
Timed rollback safety net for edits to ~/.openclaw/openclaw.json on macOS. Use when changing Gateway config, restarting Gateway after config edits, or needin...
README (SKILL.md)

Auto-Rollback

Use this skill before editing ~/.openclaw/openclaw.json.

It creates a timestamped backup, schedules a rollback job for 10 minutes later, and restores the backup if Gateway still cannot come up. Rollback auto-cancellation is available only if the workspace BOOT.md includes the bundled snippet from this skill and the boot-md hook is already installed.

Quick Flow

  1. Run skills/auto-rollback/auto-rollback.sh start --reason "what changed"
  2. Edit ~/.openclaw/openclaw.json
  3. Restart Gateway
  4. If Gateway becomes healthy, BOOT.md cancels the rollback
  5. If Gateway stays unhealthy, launchd executes the rollback script

Commands

Start protection

skills/auto-rollback/auto-rollback.sh start --reason "update gateway bindings"

Short form also works:

skills/auto-rollback/auto-rollback.sh start "update gateway bindings"

Cancel pending rollback

skills/auto-rollback/auto-rollback.sh cancel

Inspect current state

skills/auto-rollback/auto-rollback.sh status

BOOT.md Integration

This skill does not install the boot-md hook by itself.

To enable automatic cancellation after a healthy restart:

  1. Ensure your OpenClaw workspace already has the boot-md hook installed.
  2. Merge skills/auto-rollback/BOOT.md into the workspace root BOOT.md.

Without that integration, rollback still works, but you must cancel it manually after a successful restart.

Files

  • Script: skills/auto-rollback/auto-rollback.sh
  • BOOT snippet: skills/auto-rollback/BOOT.md
  • Backups: ~/.openclaw/openclaw.json.YYYYMMDD-HHMMSS
  • State: ~/.openclaw/state/rollback-pending.json
  • Log: ~/.openclaw/logs/rollback.log
  • launchd plist: ~/.openclaw/ai.openclaw.rollback.plist

Agent Rule

If you want agents to always use this safety net, add an SOP rule in AGENTS.md that any openclaw.json change must run start first.

Usage Guidance
This skill appears to do what it claims: make a timestamped backup of ~/.openclaw/openclaw.json, schedule a user-scoped launchd job to restore it after ~10 minutes if the Gateway stays unhealthy, and optionally cancel the rollback from BOOT.md on a healthy startup. Before installing/running: (1) inspect the included auto-rollback.sh yourself (it will write files under $HOME/.openclaw and create a launchd plist and executable in that directory), (2) confirm you have the openclaw CLI available so the script can restart the Gateway as intended, (3) be aware the job runs as your user via launchctl (not root) and will execute the generated rollback script if triggered, and (4) if you keep this in automated workflows, ensure agents follow the expected 'start' / 'cancel' sequence so you don't get unexpected rollbacks. If you want extra caution, run the script in a test environment or manually verify the created plist and rollback script before loading it into launchd.
Capability Analysis
Type: OpenClaw Skill Name: auto-rollback Version: 1.2.0-alpha.2 The skill provides a legitimate safety mechanism for rolling back configuration changes to the OpenClaw gateway on macOS. It functions by creating a timestamped backup of the configuration file and scheduling a one-time recovery task via launchd (using auto-rollback.sh) that restores the backup if the gateway fails a local health check. The implementation uses standard system utilities (launchctl, curl, jq) in a transparent manner, includes proper cleanup logic, and lacks any indicators of data exfiltration or malicious intent.
Capability Assessment
Purpose & Capability
Name/description match the actual behavior: the script backs up ~/.openclaw/openclaw.json, writes a state file and log, creates a launchd plist and a one-off rollback script, and attempts a Gateway restart via the local openclaw CLI. Required binaries (bash, launchctl, jq, curl, plutil) are appropriate for these operations.
Instruction Scope
SKILL.md limits runtime actions to backing up, scheduling/cancelling a rollback, checking local Gateway health via localhost:18789, and optionally integrating a BOOT.md snippet to cancel the job. The instructions do not read or transmit unrelated system data or call external endpoints beyond localhost.
Install Mechanism
No install spec (instruction-only) and the included script runs from the user's workspace. Nothing is downloaded or extracted from external URLs. The script writes files only under $HOME/.openclaw and generates a user-scoped launchd plist; this is expected for the described purpose.
Credentials
The skill requests no credentials or environment secrets. It relies on common local utilities and the openclaw binary (reasonably required to restart the Gateway). It does not ask for unrelated service tokens or global config paths.
Persistence & Privilege
The skill creates files under ~/.openclaw and installs a user launchd job (ai.openclaw.rollback) which will run under the user's account at the scheduled time — this is necessary for its function. always:false and normal model invocation mean it won't be auto-added everywhere; nevertheless, it creates persistent state (plists and scripts) in the user's home while a rollback is pending.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install auto-rollback
  3. After installation, invoke the skill by name or use /auto-rollback
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0-alpha.2
Add MIT license to SKILL.md frontmatter
v1.1.1-alpha.3
Improve auto-rollback reliability: fix --reason parsing, clarify BOOT.md integration, add dependency/path validation, and harden release documentation.
v1.1.1-alpha.2
v1.1.1-alpha.2 - Rewrite SKILL.md as true EN-then-ZH bilingual (no CN/EN tags); emphasize core value (no remote login needed); explicitly document BOOT.md auto-cancel on successful restart.
v1.1.1-alpha.1
v1.1.1-alpha.1 - CN/EN docs refresh; BOOT.md auto-cancel pattern documented + included; fix start --reason parsing; clarify this skill is a safety net (not a config editor).
v1.1.0
Auto-rollback protection for openclaw.json modifications using launchd
v1.0.1
- Documentation and metadata updates only; no code or functional changes. - SKILL.md was reformatted and updated, but all workflows, features, and usage remain unchanged.
v1.0.0
Initial release: Automatic configuration rollback system for OpenClaw on macOS. - Backs up configs and sets a 10-minute auto-rollback before any openclaw.json changes. - Integrates with launchd to schedule auto-restore if Gateway restart fails. - Provides CLI tools: start rollback, cancel if Gateway boots, check status, and manual rollback. - Automatically cancels rollback after a successful Gateway start via boot hook. - Only one active rollback protection at a time; all actions are logged for traceability.
Metadata
Slug auto-rollback
Version 1.2.0-alpha.2
License MIT-0
All-time Installs 5
Active Installs 5
Total Versions 7
Frequently Asked Questions

What is auto-rollback?

Timed rollback safety net for edits to ~/.openclaw/openclaw.json on macOS. Use when changing Gateway config, restarting Gateway after config edits, or needin... It is an AI Agent Skill for Claude Code / OpenClaw, with 605 downloads so far.

How do I install auto-rollback?

Run "/install auto-rollback" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is auto-rollback free?

Yes, auto-rollback is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does auto-rollback support?

auto-rollback is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin).

Who created auto-rollback?

It is built and maintained by extraterrest (@extraterrest); the current version is v1.2.0-alpha.2.

💬 Comments