Search

PythonReactSEOPDF
OpenClaw

gateway-auto-rollback

Automatic configuration rollback mechanism for OpenClaw Gateway. Provides three-layer protection: pre-modification backup, post-modification validation, and automatic rollback on failure. Includes a file watcher daemon, JSON validation, Gateway health checks, and SHA256 content-addressed backups. Use when modifying openclaw.json or other critical config files to prevent accidental breakage and ensure zero-downtime configuration changes.

halfmoon820 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install halfmoon82/gateway-auto-rollback

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Gateway Auto-Rollback

Three-layer configuration protection for OpenClaw Gateway — never break your config again.

What It Does

Automatically protects your OpenClaw configuration files with:

  1. Pre-modification backup — SHA256 content-addressed snapshots before any change
  2. Post-modification validation — JSON syntax check + Gateway health probe
  3. Automatic rollback — instant restore if validation fails

When to Use

  • Before modifying openclaw.json, exec-approvals.json, or skills.json
  • When running automated config changes (cron jobs, scripts)
  • As a background safety net during development
  • When you want peace of mind that a bad config won't take down your agent

Quick Start

One-shot check (before manual edits)
python3 gateway-auto-rollback.py

This initializes the backup directory, validates current config, and logs status.

Watch mode (background daemon)
python3 gateway-auto-rollback.py --watch &

Monitors critical config files every 3 minutes. Auto-exits after 3 consecutive healthy checks (config is stable).

How It Works

Before Modification        During              After Modification
       ↓                    ↓                        ↓
  Backup + Hash  ───→  Execute Change  ───→  JSON Validate + Health Check
       │                                          │
       └──────────────────────────────────────→ Auto-rollback on failure
Protected Files
File Description
openclaw.json Main Gateway configuration
exec-approvals.json Command execution approvals
skills.json Skills registry
Backup Naming

Backups are stored in ~/.openclaw/backup/ with content-addressed names:

openclaw.json.20260301_053612.a1b2c3d4.bak
                 ↑ timestamp    ↑ SHA256 prefix (dedup)

API Reference

Python Functions
from gateway_auto_rollback import (
    pre_modification_check,   # Call before modifying...

Source information

Source
github
Repository
openclaw/skills
Path
skills/halfmoon82/gateway-auto-rollback
Version
—
Commit
5f64e3fc083960c87beb0baf2d655d52f6c5fdb5
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Gateway Auto-Rollback

**Three-layer configuration protection for OpenClaw Gateway** — never break your config again.

## What It Does

Automatically protects your OpenClaw configuration files with:

1. **Pre-modification backup** — SHA256 content-addressed snapshots before any change
2. **Post-modification validation** — JSON syntax check + Gateway health probe
3. **Automatic rollback** — instant restore if validation fails

## When to Use

- Before modifying `openclaw.json`, `exec-approvals.json`, or `skills.json`
- When running automated config changes (cron jobs, scripts)
- As a background safety net during development
- When you want peace of mind that a bad config won't take down your agent

## Quick Start

### One-shot check (before manual edits)

```bash
python3 gateway-auto-rollback.py
```

This initializes the backup directory, validates current config, and logs status.

### Watch mode (background daemon)

```bash
python3 gateway-auto-rollback.py --watch &
```

Monitors critical config files every 3 minutes. Auto-exits after 3 consecutive healthy checks (config is stable).

## How It Works

```
Before Modification        During              After Modification
       ↓                    ↓                        ↓
  Backup + Hash  ───→  Execute Change  ───→  JSON Validate + Health Check
       │                                          │
       └──────────────────────────────────────→ Auto-rollback on failure
```

### Protected Files

| File | Description |
|------|-------------|
| `openclaw.json` | Main Gateway configuration |
| `exec-approvals.json` | Command execution approvals |
| `skills.json` | Skills registry |

### Backup Naming

Backups are stored in `~/.openclaw/backup/` with content-addressed names:

```
openclaw.json.20260301_053612.a1b2c3d4.bak
                 ↑ timestamp    ↑ SHA256 prefix (dedup)
```

## API Reference

### Python Functions

```python
from gateway_auto_rollback import (
    pre_modification_check,   # Call before modifying...

Related skills

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

attio

capt-marbles

Attio CRM integration for managing companies, people, deals, notes, tasks, and custom objects. Use when working with Attio CRM data, searching contacts, managing sales pipelines, adding notes to records, creati...

OpenClaw

firecrawl

capt-marbles

Web scraping and crawling with Firecrawl API. Fetch webpage content as markdown, take screenshots, extract structured data, search the web, and crawl documentation sites. Use when the user needs to scrape a URL...