ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified system Safety 4/5

restart-guard

Safely restart the OpenClaw Gateway with context preservation, health monitoring, and failure notification. Use when the agent needs to restart the Gateway (config changes, model switches, plugin reloads, or any reason requiring a restart). Handles pre-restart context saving, guardian process spawning, gateway restart triggering, post-restart verification, and fallback notifications.

Why use this skill?

Safely restart the OpenClaw Gateway with context preservation, automated health monitoring, and intelligent failure recovery using the restart-guard skill.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/zjianru/restart-guard
Or

What This Skill Does

The restart-guard skill is a robust management utility for the OpenClaw Gateway. Its primary purpose is to orchestrate safe, verifiable restarts of the OpenClaw service without losing operational continuity. Unlike a standard system restart, restart-guard employs a multi-stage workflow: it saves current context, triggers a protected restart sequence, spawns a dedicated, detached guardian process to monitor system health, and performs automated post-restart verification. This ensures that configuration changes, plugin reloads, or model swaps occur reliably, with built-in fallbacks if the gateway fails to recover.

Installation

To install this skill, run the following command in your terminal: clawhub install openclaw/skills/skills/zjianru/restart-guard Ensure that your environment meets the prerequisites by having commands.restart enabled in your openclaw.json file and confirming your agent has proper authorization to use gateway and exec tools.

Use Cases

  • Configuration Updates: Automatically applying new settings from your config.example.yaml without manually managing service state.
  • Plugin Management: Safely reloading plugins that require a gateway restart to initialize.
  • Model Switching: Swapping between different AI models and verifying that the gateway successfully recognizes the new backend after the refresh.
  • Service Recovery: Automating the restart process after detecting degraded performance or configuration drift.

Example Prompts

  1. "I've updated the gateway configuration; please use restart-guard to apply the changes and verify that everything is running correctly."
  2. "Restart the OpenClaw gateway safely, making sure to preserve our current session context and notify me once the health checks pass."
  3. "Run a restart-guard sequence for the model switch; if the gateway doesn't come back up in 30 seconds, run the diagnostic tool and let me know the status."

Tips & Limitations

  • Cooldowns: Respect the 600s cooldown lock to prevent service thrashing.
  • Consecutive Failures: The guardian process will stop attempting restarts after 3 failures to protect your system from infinite loops.
  • Verification: Always define your --verify commands clearly to ensure the post-restart health check accurately reflects the desired service state.
  • Safety: Since this skill performs file-writes and process execution, ensure your openclaw.json configuration limits are configured strictly to prevent unauthorized system modifications.

Metadata

Author@zjianru
Stars879
Views1
Updated2026-02-11
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-zjianru-restart-guard": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#gateway#management#automation#resilience
Safety Score: 4/5

Flags: file-write, file-read, code-execution