Gateway Restore
/install gateway-restore
Gateway Restore
Roll back a gateway config to the last known-good state, then restart safely with health checks and automatic rollback on failure.
Usage (as slash command or natural language)
/restore— restore the Slack gateway to known-good/restore discord— restore the Discord gateway to known-good/restore tag— tag the current Slack config as known-good/restore tag discord— tag the current Discord config as known-good
How It Works
- Backs up the current (broken) config with a timestamped filename
- Copies the
known-good.jsonover the live config - Runs the appropriate safe restart script (
safe-slack-restart.shorsafe-gateway-restart.sh) - The safe restart script validates health and rolls back if the gateway doesn't come up
Tagging Known-Good
After any successful config change + restart, tag the current config:
bash skills/gateway-restore/scripts/gateway-restore.sh slack --tag-current
bash skills/gateway-restore/scripts/gateway-restore.sh discord --tag-current
This saves it as config-backups/known-good.json. Old tagged versions are also kept as known-good-TIMESTAMP.json.
Script Location
skills/gateway-restore/scripts/gateway-restore.sh
When Invoked via Slash Command
The command-bypass hook handles /restore slash commands automatically — the script runs detached without LLM involvement. You do NOT need to execute the script.
If the hook fires, simply reply confirming the restore is in progress. Do not call exec.
When Invoked via Natural Language
If the user asks to restore via natural language (not a slash command), THEN run the script:
setsid bash /home/swabby/repos/swabby-brain/skills/gateway-restore/scripts/gateway-restore.sh [slack|discord] [--tag-current] > /tmp/restore-output.log 2>&1 &
sleep 2 && cat /tmp/restore-output.log
Parse the request:
- "restore" / "rollback" → slack gateway
- "restore discord" → discord gateway
- "restore tag" → tag current slack config as known-good
If the gateway restarts mid-exec (SIGTERM), that's expected — the restart succeeded.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gateway-restore - After installation, invoke the skill by name or use
/gateway-restore - Provide required inputs per the skill's parameter spec and get structured output
What is Gateway Restore?
Restore a gateway to its last known-good configuration, or tag the current config as known-good. Use when a gateway config change breaks something and you ne... It is an AI Agent Skill for Claude Code / OpenClaw, with 62 downloads so far.
How do I install Gateway Restore?
Run "/install gateway-restore" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Gateway Restore free?
Yes, Gateway Restore is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Gateway Restore support?
Gateway Restore is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Gateway Restore?
It is built and maintained by halfdeadcat (@halfdeadcat); the current version is v1.0.0.