← Back to Skills Marketplace
halfdeadcat

Gateway Restore

by halfdeadcat · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
62
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install gateway-restore
Description
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...
README (SKILL.md)

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

  1. Backs up the current (broken) config with a timestamped filename
  2. Copies the known-good.json over the live config
  3. Runs the appropriate safe restart script (safe-slack-restart.sh or safe-gateway-restart.sh)
  4. 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.

Usage Guidance
This skill appears to implement config backup/restore logic you would expect, but it contains developer-local paths (e.g. /home/swabby/...) and expects external restart scripts (safe-slack-restart.sh, safe-gateway-restart.sh). Before installing or running it: 1) Inspect the referenced restart scripts in $HOME/bin to ensure they do nothing unexpected or network-exfiltratory; 2) Update SKILL.md and invocation commands to point to the actual packaged script path (or adjust to your environment) and remove hard-coded /home/swabby references; 3) Test on a non-production instance to confirm behavior and rollback works; 4) Confirm who can invoke the slash command or hook (the doc mentions a command-bypass hook that runs the script detached) and restrict it if necessary; 5) If you lack confidence in the restart scripts, consider running the restore steps manually rather than granting automated execution. These inconsistencies are likely sloppy engineering, but they merit manual review before trusting the skill in production.
Capability Analysis
Type: OpenClaw Skill Name: gateway-restore Version: 1.0.0 The skill bundle provides a legitimate utility for backing up, restoring, and tagging configuration files for Slack and Discord gateways. The bash script (gateway-restore.sh) performs standard file operations and executes local restart scripts, while the SKILL.md provides clear instructions for the AI agent to handle both slash commands and natural language requests without any signs of malicious intent or data exfiltration.
Capability Assessment
Purpose & Capability
The script reads/writes gateway config files and calls restart scripts for Slack/Discord, which aligns with the "Gateway Restore" purpose. However the script and SKILL.md include hard-coded user-specific paths (e.g. /home/swabby paths and inclusion of /home/swabby/.npm-global in PATH) that don't match a generic, portable skill and suggest leftover developer-local assumptions.
Instruction Scope
SKILL.md tells the agent to run an absolute path (/home/swabby/repos/swabby-brain/...) when invoked via natural language even though the included script is at skills/gateway-restore/scripts/gateway-restore.sh; it also instructs the agent to detach/run the script and then cat /tmp/restore-output.log. These instructions reference files and locations outside the packaged skill (and reference a "command-bypass" hook that will run the script without LLM involvement), which is inconsistent and could cause unexpected behavior.
Install Mechanism
There is no install spec (instruction-only + included script). Nothing is downloaded or written by an installer, which is low-risk for installation mechanism. The included script will be written to disk as part of the skill bundle, which is expected for an instruction-only skill with a script.
Credentials
No credentials or env vars are requested. The script does operate on files under $HOME and expects restart scripts at $HOME/bin/*. That is proportionate to restoring local gateway configs, but the explicit addition of /home/swabby/.npm-global to PATH and hard-coded /home/swabby references are disproportionate and may break or misroute behavior on other systems.
Persistence & Privilege
always is false and the skill is user-invocable. The skill does not request persistent privileges or modify other skills' configuration. It does perform file writes (backups, replacing configs) and calls external restart scripts, which is expected for its function but requires the runtime user to have appropriate local permissions.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gateway-restore
  3. After installation, invoke the skill by name or use /gateway-restore
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of the "gateway-restore" skill. - Allows fast rollback of gateway configuration to the last known-good state via slash command or natural language. - Supports tagging the current config as known-good for future restores. - Automatically restarts the gateway with health checks and can roll back again if restart fails. - Slash command `/restore` is handled automatically; natural language requests execute the restore script directly.
Metadata
Slug gateway-restore
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

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.

💬 Comments