Skip to content
Back to search

myclaw-guardian

SkillWorks with Claude CodeGitHub

"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.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/leoyeai--openclaw-guardian/badge.svg)](/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

i

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)

  1. ---
  2. name: myclaw-guardian
  3. 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."
  4. metadata: {"openclaw": {"homepage": "https://myclaw.ai", "requires": {"bins": ["git", "pgrep", "curl"], "env": []}, "primaryEnv": "DISCORD_WEBHOOK_URL"}}
  5. ---
  6. # OpenClaw Guardian
  7. A standalone watchdog that keeps your OpenClaw Gateway alive 24/7. Built from MyClaw.ai's production infrastructure and open-sourced for the community.
  8. > Powered by [MyClaw.ai](https://myclaw.ai) — https://myclaw.ai
  9. ## What It Does
  10. - Checks Gateway health every 30 seconds (`GUARDIAN_CHECK_INTERVAL`, default: 30)
  11. - On failure: runs `openclaw doctor --fix` up to 3 times (`GUARDIAN_MAX_REPAIR`, default: 3)
  12. - If still down: `git reset --hard` to last stable commit, restart Gateway
  13. - Daily automatic `git commit` snapshot of workspace
  14. - Optional Discord webhook alerts (`DISCORD_WEBHOOK_URL`)
  15. ## Environment Variables
  16. All optional — defaults work out of the box:
  17. | Variable | Default | Description |
  18. |---|---|---|
  19. | `GUARDIAN_WORKSPACE` | `$HOME/.openclaw/workspace` | Workspace path (must be a git repo) |
  20. | `GUARDIAN_LOG` | `/tmp/openclaw-guardian.log` | Log file path |
  21. | `GUARDIAN_CHECK_INTERVAL` | `30` | Health check interval (seconds) |
  22. | `GUARDIAN_MAX_REPAIR` | `3` | Max doctor --fix attempts before rollback |
  23. | `GUARDIAN_COOLDOWN` | `300` | Cooldown period after all repairs fail (seconds) |
  24. | `OPENCLAW_CMD` | `openclaw` | OpenClaw CLI command |
  25. | `DISCORD_WEBHOOK_URL` | _(unset)_ | Discord webhook URL for alerts (optional) |
  26. ## Required System Tools
  27. - `git` — for workspace rollback and daily snapshots
  28. - `pgrep` / `pkill` — for process detection
  29. - `curl` — for Discord webhook alerts (only if `DISCORD_WEBHOOK_URL` is set)
  30. - `openclaw` — the OpenClaw CLI
  31. ## Quick Start
  32. Tell your OpenClaw agent:
  33. > "Help me install openclaw-guardian to harden my gateway"
  34. Or manually:
  35. ```bash
  36. # 1. Init git in workspace (required for rollback)
  37. cd ~/.openclaw/workspace
  38. git init && git add -A && git commit -m "initial"
  39. # 2. Install
  40. cp scripts/guardian.sh ~/.openclaw/guardian.sh
  41. chmod +x ~/.openclaw/guardian.sh
  42. # 3. Start
  43. nohup ~/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 &
  44. ```
  45. Note: Use repository-level git config, not --global:
  46. ```bash
  47. git -C ~/.openclaw/workspace config user.email "guardian@example.com"
  48. git -C ~/.openclaw/workspace config user.name "Guardian"
  49. ```
  50. ## Auto-start on Container Restart
  51. Add to `~/.openclaw/start-gateway.sh` before the final `exec` line:
  52. ```bash
  53. pkill -f "guardian.sh" 2>/dev/null || true
  54. nohup /home/ubuntu/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 &
  55. ```
  56. 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)

  1. # 🛡️ OpenClaw Guardian
  2. <div align="center">
  3. <a href="https://myclaw.ai">
  4. <img src="https://img.shields.io/badge/Powered%20by-MyClaw.ai-blue?style=for-the-badge" alt="Powered by MyClaw.ai" />
  5. </a>
  6. **Languages:**
  7. [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)
  8. </div>
  9. ---
  10. ## 🤖 Powered by [MyClaw.ai](https://myclaw.ai)
  11. **[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.
  12. 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.
  13. > 🌐 **Try MyClaw.ai**: [https://myclaw.ai](https://myclaw.ai)
  14. ---
  15. ## Features
  16. - **Auto-monitor** — checks Gateway health every 30 seconds
  17. - **Auto-repair** — runs `openclaw doctor --fix` on failure (up to 3 attempts)
  18. - **Auto-rollback** — resets workspace to last stable git commit if repair fails
  19. - **Daily snapshots** — automatic daily `git commit` of your workspace
  20. - **Discord alerts** — optional webhook notifications on failures and recovery
  21. ## How It Works
  22. ```
  23. Gateway down detected
  24. │
  25. ▼
  26. doctor --fix ──→ success? ──→ ✅ Done
  27. (up to 3x)
  28. │ all failed
  29. ▼
  30. git rollback ──→ success? ──→ ✅ Done
  31. │ failed
  32. ▼
  33. cooldown 300s → resume monitoring
  34. ```
  35. ## ⚡ One-Line Deploy (OpenClaw Users)
  36. Already using OpenClaw? Just tell your AI agent:
  37. > **"Help me install openclaw-guardian to harden my gateway"**
  38. Your agent will handle everything automatically — git init, script install, and auto-start. No terminal needed.
  39. ---
  40. ## Quick Start
  41. ```bash
  42. # 1. Initialize git in workspace
  43. cd ~/.openclaw/workspace
  44. git init && git add -A && git commit -m "initial"
  45. # 2. Install
  46. cp scripts/guardian.sh ~/.openclaw/guardian.sh
  47. chmod +x ~/.openclaw/guardian.sh
  48. # 3. Start
  49. nohup ~/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 &
  50. ```
  51. ## Configuration
  52. | Variable | Default | Description |
  53. |---|---|---|
  54. | `GUARDIAN_WORKSPACE` | `$HOME/.openclaw/workspace` | Workspace git repo path |
  55. | `GUARDIAN_CHECK_INTERVAL` | `30` | Health check interval (seconds) |
  56. | `GUARDIAN_MAX_REPAIR` | `3` | Max repair attempts before rollback |
  57. | `GUARDIAN_COOLDOWN` | `300` | Cooldown after all repairs fail (seconds) |
  58. | `DISCORD_WEBHOOK_URL` | _(unset)_ | Discord webhook for alerts (optional) |
  59. ## Works Alongside gw-watchdog
  60. | | gw-watchdog | Guardian |
  61. |---|---|---|
  62. | Check interval | 15s | 30s |
  63. | Action | Fast restart | doctor --fix → rollback |
  64. | Git rollback | ❌ | ✅ |
  65. | Discord alerts | ❌ | ✅ |
  66. | Daily backup | ❌ | ✅ |
  67. ## Install as OpenClaw Skill
  68. ```bash
  69. clawhub install myclaw-guardian
  70. ```
  71. ## License
  72. MIT © [MyClaw.ai](https://myclaw.ai)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.