OpenClaw XGuardian for Openclaw

A persistent macOS watchdog service built in Go to ensure OpenClaw agents remain active and recover automatically from failures.

harryboda
v0.0.1
Mar 1, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-xguardian

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-xguardian using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenClaw XGuardian?

OpenClaw XGuardian is a specialized utility designed to maintain the high availability of your OpenClaw environment on macOS. By leveraging system-level launchd integration and a Go-based monitoring binary, this skill automates the health checks and recovery processes necessary for mission-critical Openclaw Skills. It effectively bridges the gap between manual CLI management and production-grade reliability.

The skill provides a complete template for scaffolding a Go project that acts as a guardian daemon. It monitors the status of the OpenClaw gateway, handles automatic restarts upon failure, and ensures that your background AI processes are resilient to system reboots or unexpected crashes.

OpenClaw XGuardian Use Cases

  • Maintaining 24/7 uptime for Openclaw Skills running on dedicated macOS hardware.
  • Automating the recovery of the OpenClaw gateway service after unexpected process terminations.
  • Ensuring AI agent services restart automatically after a macOS system reboot.
  • Centralizing logs and health monitoring for background automation tasks.

How OpenClaw XGuardian Works

  1. The skill scaffolds a Go-based project containing the core watchdog logic, configuration templates, and macOS plist files.
  2. Users configure environmental paths for the OpenClaw binary, config files, and gateway plist locations.
  3. The Go guardian binary is compiled locally to provide a high-performance, low-overhead monitoring service.
  4. A macOS LaunchAgent is installed and loaded to ensure the guardian runs persistently in the user session.
  5. The guardian continuously monitors the OpenClaw process, triggering recovery routines if the service is found to be inactive.

OpenClaw XGuardian Setup

1) Scaffold and Build

First, copy the template assets to your workspace and compile the guardian binary:

cp -R /Users/xiong/.codex/skills/openclaw-xguardian/assets/guardian/* <TARGET_WORKSPACE>/
cd <TARGET_WORKSPACE>
go build -o bin/openclaw-guardian ./cmd/openclaw-guardian

2) Configuration

Create your configuration file at ~/.openclaw-guardian/config.json using the provided sample. Ensure the openclaw_bin path is correct:

which openclaw

3) Install LaunchAgent

Register the service with macOS launchd:

mkdir -p ~/Library/LaunchAgents
cp launchd/com.openclaw.guardian.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.openclaw.guardian.plist

OpenClaw XGuardian Data Schema & Taxonomy

The skill manages several key configuration and state files to maintain the stability of Openclaw Skills:

File Role
config.json Defines paths for binaries, log files, and health-check behavior.
guardian.log Records health checks, recovery attempts, and system errors.
com.openclaw.guardian.plist The macOS launchd manifest that manages the background process.
openclaw_bin Absolute path reference to the primary OpenClaw executable.

OpenClaw XGuardian Advanced Features

  • Intelligent auto-recovery that detects gateway failures and restarts the service without manual intervention.
  • Customizable log verbosity to keep health-check records concise while allowing deep debugging when needed.
  • Path injection for launchd to ensure Node.js and other dependencies are correctly found in the system environment.
  • Bootstrap logic to prevent redundant reinstalls when the gateway is already correctly configured.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*