← 返回 Skills 市场
extraterrest

auto-rollback

作者 extraterrest · GitHub ↗ · v1.2.0-alpha.2 · MIT-0
darwin ✓ 安全检测通过
605
总下载
0
收藏
5
当前安装
7
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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.

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-rollback
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-rollback 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug auto-rollback
版本 1.2.0-alpha.2
许可证 MIT-0
累计安装 5
当前安装数 5
历史版本数 7
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 605 次。

如何安装 auto-rollback?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-rollback」即可一键安装,无需额外配置。

auto-rollback 是免费的吗?

是的,auto-rollback 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

auto-rollback 支持哪些平台?

auto-rollback 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin)。

谁开发了 auto-rollback?

由 extraterrest(@extraterrest)开发并维护,当前版本 v1.2.0-alpha.2。

💬 留言讨论