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 scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/leoyeai--openclaw-guardian)HTML
<a href="/listings/leoyeai--openclaw-guardian"><img src="/api/listings/leoyeai--openclaw-guardian/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
# 1. Initialize git in workspace 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 &
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 75 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: myclaw-guardian
- description: "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."
- metadata: {"openclaw": {"homepage": "https://myclaw.ai", "requires": {"bins": ["git", "pgrep", "curl"], "env": []}, "primaryEnv": "DISCORD_WEBHOOK_URL"}}
- ---
- # 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.ai](https://myclaw.ai) — https://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:
- | Variable | Default | Description |
- |---|---|---|
- | `GUARDIAN_WORKSPACE` | `$HOME/.openclaw/workspace` | Workspace path (must be a git repo) |
- | `GUARDIAN_LOG` | `/tmp/openclaw-guardian.log` | Log file path |
- | `GUARDIAN_CHECK_INTERVAL` | `30` | Health check interval (seconds) |
- | `GUARDIAN_MAX_REPAIR` | `3` | Max doctor --fix attempts before rollback |
- | `GUARDIAN_COOLDOWN` | `300` | Cooldown period after all repairs fail (seconds) |
- | `OPENCLAW_CMD` | `openclaw` | OpenClaw 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:
- ```bash
- # 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:
- ```bash
- 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:
- ```bash
- 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
README.md · README · 103 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # 🛡️ OpenClaw Guardian
- <div align="center">
- <a href="https://myclaw.ai">
- <img src="https://img.shields.io/badge/Powered%20by-MyClaw.ai-blue?style=for-the-badge" alt="Powered by MyClaw.ai" />
- </a>
- **Languages:**
- [English](README.md) · [中文](README.zh-CN.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [日本語](README.ja.md) · [Italiano](README.it.md) · [Español](README.es.md)
- </div>
- ---
- ## 🤖 Powered by [MyClaw.ai](https://myclaw.ai)
- **[MyClaw.ai](https://myclaw.ai)** is an AI personal assistant platform that gives every user a fully-featured AI agent running on a dedicated server — with complete code control, internet access, and tool integrations. Think of it as your own private AI that can actually *do* things, not just answer questions.
- OpenClaw Guardian is an open-source project born from MyClaw.ai's production infrastructure. We run thousands of AI agent instances 24/7, and Guardian is the hardening layer that keeps them alive. We're open-sourcing it so everyone can benefit.
- > 🌐 **Try MyClaw.ai**: [https://myclaw.ai](https://myclaw.ai)
- ---
- ## Features
- - **Auto-monitor** — checks Gateway health every 30 seconds
- - **Auto-repair** — runs `openclaw doctor --fix` on failure (up to 3 attempts)
- - **Auto-rollback** — resets workspace to last stable git commit if repair fails
- - **Daily snapshots** — automatic daily `git commit` of your workspace
- - **Discord alerts** — optional webhook notifications on failures and recovery
- ## How It Works
- ```
- Gateway down detected
- │
- ▼
- doctor --fix ──→ success? ──→ ✅ Done
- (up to 3x)
- │ all failed
- ▼
- git rollback ──→ success? ──→ ✅ Done
- │ failed
- ▼
- cooldown 300s → resume monitoring
- ```
- ## ⚡ One-Line Deploy (OpenClaw Users)
- Already using OpenClaw? Just tell your AI agent:
- > **"Help me install openclaw-guardian to harden my gateway"**
- Your agent will handle everything automatically — git init, script install, and auto-start. No terminal needed.
- ---
- ## Quick Start
- ```bash
- # 1. Initialize git in workspace
- 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 &
- ```
- ## Configuration
- | Variable | Default | Description |
- |---|---|---|
- | `GUARDIAN_WORKSPACE` | `$HOME/.openclaw/workspace` | Workspace git repo path |
- | `GUARDIAN_CHECK_INTERVAL` | `30` | Health check interval (seconds) |
- | `GUARDIAN_MAX_REPAIR` | `3` | Max repair attempts before rollback |
- | `GUARDIAN_COOLDOWN` | `300` | Cooldown after all repairs fail (seconds) |
- | `DISCORD_WEBHOOK_URL` | _(unset)_ | Discord webhook for alerts (optional) |
- ## Works Alongside gw-watchdog
- | | gw-watchdog | Guardian |
- |---|---|---|
- | Check interval | 15s | 30s |
- | Action | Fast restart | doctor --fix → rollback |
- | Git rollback | ❌ | ✅ |
- | Discord alerts | ❌ | ✅ |
- | Daily backup | ❌ | ✅ |
- ## Install as OpenClaw Skill
- ```bash
- clawhub install myclaw-guardian
- ```
- ## License
- MIT © [MyClaw.ai](https://myclaw.ai)
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.