gateway-safety
Safely update OpenClaw gateway configuration (openclaw.json) with automatic validation, backup, and 30-second health-check rollback. Use this skill whenever an agent needs to modify gateway settings, ports, provider credentials, or network bindings to ensure the session is not permanently lost due to a bad configuration.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/allthebadthings/gateway-safetyWhat This Skill Does
The gateway-safety skill is a mission-critical utility for OpenClaw agents, designed to act as a failsafe mechanism when modifying the core gateway configuration file (~/.openclaw/openclaw.json). Instead of relying on manual file editing, which risks permanent session loss or "death loops"—a state where the gateway crashes and prevents further agent commands—this skill orchestrates a transactional update process. It automates validation, secure backups, and a high-reliability health-check mechanism. If a configuration update results in a non-responsive gateway, the skill automatically triggers a rollback to the last known-good state within 30 seconds, ensuring that connectivity remains intact and human intervention is minimized.
Installation
To integrate this safety protocol into your agent environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/allthebadthings/gateway-safety
Ensure that you have the necessary write permissions for the ~/.openclaw/ directory, as the skill needs to generate backup files and read the configuration environment.
Use Cases
- Network Binding Changes: Use this when modifying internal or external port bindings to ensure the agent doesn't lose connectivity during the port transition.
- Credential Rotation: When updating provider API keys or auth tokens within the config, this skill prevents an invalid key from rendering the gateway unreachable.
- Performance Tuning: Safely update concurrency limits or buffer sizes with the assurance of an automatic revert if performance degrades beyond the health-check threshold.
Example Prompts
- "I need to update the gateway port to 8080 and bind to all interfaces. Please use the gateway-safety skill to apply these changes from /tmp/config.json."
- "Update my provider credentials in the gateway configuration. Ensure you use the safe-gateway-update script to prevent any potential lockouts."
- "Adjust the gateway timeout settings to 60 seconds; please handle this via the gateway-safety skill to ensure the configuration remains valid."
Tips & Limitations
Always remember the 'Anti-Loop Policy': the script is configured to trigger a GATEWAY_LOCKOUT if three consecutive failures occur. If you see this file in your directory, stop all automated attempts and request manual assistance from Kevin. Furthermore, while the script performs automated backups, treat critical infrastructure changes as high-risk; manually verify the content of ~/.openclaw/openclaw.json.known-good before committing any major architectural shifts to the gateway settings.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-allthebadthings-gateway-safety": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution