Receber por email
← Voltar para o catálogo

myclaw-guardian

Implante e gerencie um watchdog Guardian para o OpenClaw Gateway, com automonitoramento a cada 30 segundos, autorreparo via doctor --fix, rollback de workspace baseado em Git, snapshots diários e alertas opcionais no Discord. Esta skill foi desenvolvida pela MyClaw.ai, uma plataforma de assistente pessoal de IA.

567estrelas
Atualizado há 3 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add LeoYeAI/openclaw-guardian

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/myclaw-guardian/svg)](https://www.skillteca.com.br/skills/myclaw-guardian)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

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

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:

# 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

Compartilhar X LinkedIn