myclaw-guardian

Deploy and manage a Guardian watchdog for OpenClaw Gateway. Auto-monitor every 30s, self-repair via doctor --fix, git-based workspace rollback, daily snapshots, and optional Discord alerts. Built by MyClaw.ai (https://myclaw.ai) — the AI personal assistant platform running thousands of agents 24/7.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "myclaw-guardian" with this command: npx skills add LeoYeAI/myclaw-guardian

OpenClaw Guardian

A standalone watchdog that keeps your OpenClaw Gateway alive 24/7. Built from MyClaw.ai's production infrastructure and open-sourced for the community.

Powered by MyClaw.aihttps://myclaw.ai

What It Does

  • Checks Gateway health every 30 seconds (GUARDIAN_CHECK_INTERVAL, default: 30)
  • On failure: runs openclaw doctor --fix up to 3 times (GUARDIAN_MAX_REPAIR, default: 3)
  • If still down: git reset --hard to last stable commit, restart Gateway
  • Daily automatic git commit snapshot of workspace
  • Optional Discord webhook alerts (DISCORD_WEBHOOK_URL)

Environment Variables

All optional — defaults work out of the box:

VariableDefaultDescription
GUARDIAN_WORKSPACE$HOME/.openclaw/workspaceWorkspace path (must be a git repo)
GUARDIAN_LOG/tmp/openclaw-guardian.logLog file path
GUARDIAN_CHECK_INTERVAL30Health check interval (seconds)
GUARDIAN_MAX_REPAIR3Max doctor --fix attempts before rollback
GUARDIAN_COOLDOWN300Cooldown period after all repairs fail (seconds)
OPENCLAW_CMDopenclawOpenClaw CLI command
DISCORD_WEBHOOK_URL(unset)Discord webhook URL for alerts (optional)

Required System Tools

  • git — for workspace rollback and daily snapshots
  • pgrep / pkill — for process detection
  • curl — for Discord webhook alerts (only if DISCORD_WEBHOOK_URL is set)
  • openclaw — the OpenClaw CLI

Quick Start

Tell your OpenClaw agent:

"Help me install openclaw-guardian to harden my gateway"

Or manually:

# 1. Init git in workspace (required for rollback)
cd ~/.openclaw/workspace
git init && git add -A && git commit -m "initial"

# 2. Install
cp scripts/guardian.sh ~/.openclaw/guardian.sh
chmod +x ~/.openclaw/guardian.sh

# 3. Start
nohup ~/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 &

Note: Use repository-level git config, not --global:

git -C ~/.openclaw/workspace config user.email "guardian@example.com"
git -C ~/.openclaw/workspace config user.name "Guardian"

Auto-start on Container Restart

Add to ~/.openclaw/start-gateway.sh before the final exec line:

pkill -f "guardian.sh" 2>/dev/null || true
nohup /home/ubuntu/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 &

Full docs: https://github.com/LeoYeAI/openclaw-guardian

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Fast Douyin Publish

抖音视频自动发布助手。一键上传视频到抖音,支持自动文案生成和标签优化。

Registry SourceRecently Updated
General

Skills Finder

Intelligent skill matcher that searches multiple skill marketplaces (ClawHub & Skills.sh) in real-time. Supports ANY language for user input, multi-step skil...

Registry SourceRecently Updated
General

Claw Self Improving Plus

Turn raw mistakes, corrections, discoveries, and repeated decisions into structured learnings and promotion candidates. Use when the user wants a conservativ...

Registry SourceRecently Updated