openclaw-watchdog
OpenClawゲートウェイの異常を自動で検知し、システムを自己修復して、Telegramでアラートを送信することで、安定稼働を支援するSkill。
📜 元の英語説明(参考)
Self-healing monitoring system for OpenClaw gateway. Auto-detects failures, fixes crashes, and sends Telegram alerts.
🇯🇵 日本人クリエイター向け解説
OpenClawゲートウェイの異常を自動で検知し、システムを自己修復して、Telegramでアラートを送信することで、安定稼働を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o openclaw-watchdog.zip https://jpskill.com/download/8814.zip && unzip -o openclaw-watchdog.zip && rm openclaw-watchdog.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8814.zip -OutFile "$d\openclaw-watchdog.zip"; Expand-Archive "$d\openclaw-watchdog.zip" -DestinationPath $d -Force; ri "$d\openclaw-watchdog.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
openclaw-watchdog.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
openclaw-watchdogフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
openclaw-watchdog
説明: OpenClaw ゲートウェイのための自己修復型監視システムです。ヘルス状態を監視し、障害発生時に自動的に再起動し、Telegram アラートを送信します。診断とログ分析はデバイス上でローカルに実行されます。アラート通知は、ユーザーの Telegram ボットに送信されます。ユーザーがゲートウェイの監視、ウォッチドッグ、または自動復旧を設定したい場合に使用します。
前提条件
- Telegram Bot Token — @BotFather を介して作成します。
- Telegram Chat ID — アラートを受信するご自身のチャット ID です。
- Python 3 — ウォッチドッグサービスに必要です。
- OpenClaw — インストールされ、実行されている必要があります。
トリガーキーワード
- watchdog, monitoring, auto-fix, gateway health, self-healing, auto-recovery, watch dog
セットアップ
ユーザーに必要な情報をすべて含んだメッセージを 1 つ送信します。
🐕 Watch Dog — 自己修復型ゲートウェイモニター
Watch Dog は、OpenClaw ゲートウェイに 15 秒ごとに ping を送信するバックグラウンドサービスです。ゲートウェイがダウンした場合、自動的に再起動を試み、Telegram アラートを送信するため、常に状況を把握できます。すべての診断はデバイス上でローカルに実行されます。
セットアップするには、以下が必要です。
-
Telegram Bot Token — Telegram の @BotFather を介してボットを作成し、トークンを送信してください (
123456:ABC-DEF...のような形式です)。 -
ご自身の Telegram Chat ID — ボットに
/startを送信し、https://api.telegram.org/bot<YOUR_TOKEN>/getUpdatesにアクセスしてチャット ID を見つけてください。
トークンとチャット ID を送信していただければ、残りの作業 (すべてが正常に動作することを確認するためのテスト実行を含む) はこちらで処理します。
認証情報受信後
以下の手順を順番に実行します。
1. 認証情報の検証
python3 ~/.openclaw/workspace/openclaw-watchdog/scripts/validate.py "$TELEGRAM_TOKEN"
2. セットアップスクリプトの実行
chmod +x ~/.openclaw/workspace/openclaw-watchdog/scripts/setup.sh
~/.openclaw/workspace/openclaw-watchdog/scripts/setup.sh \
--telegram-token "$TELEGRAM_TOKEN" \
--telegram-chat-id "$TELEGRAM_CHAT_ID"
3. Telegram 経由での接続 (ペアリング)
python3 ~/.openclaw/workspace/openclaw-watchdog/scripts/test-message.py "$TELEGRAM_TOKEN" "$TELEGRAM_CHAT_ID"
ユーザーが Telegram メッセージを受信したことを確認してから、次に進んでください。
4. 実行中の確認
# サービスの状態を確認
if [[ "$(uname)" == "Darwin" ]]; then
launchctl list | grep openclaw.watchdog
else
systemctl --user status openclaw-watchdog
fi
# ログを確認
tail -20 ~/.openclaw/watchdog/watchdog.log
5. ユーザーへの確認
Watch Dog がアクティブであること、監視対象、および何か問題が発生した場合に Telegram アラートが送信されることを伝えます。
仕組み
localhost:3117/healthに 15 秒ごとに ping を送信します。- 3 回連続で失敗した場合、
openclaw gateway restartを試みます。 - 最大 2 回の再起動を試行した後、Telegram 経由でユーザーに再インストール許可を求めます。
- ユーザーは
touch ~/.openclaw/watchdog/approve-reinstallを実行して承認します。 - 承認がない場合、通知のみを送信し、破壊的なアクションは実行しません。
- ローカルのパターンマッチング診断 (ログは外部に送信されません)。
- macOS LaunchAgent または Linux systemd ユーザーサービスとして実行されます。
- 認証情報は、マシン固有のキーを使用して AES-256 で暗号化されます。
アンインストール
if [[ "$(uname)" == "Darwin" ]]; then
launchctl unload ~/Library/LaunchAgents/com.openclaw.watchdog.plist 2>/dev/null
rm -f ~/Library/LaunchAgents/com.openclaw.watchdog.plist
else
systemctl --user stop openclaw-watchdog 2>/dev/null
systemctl --user disable openclaw-watchdog 2>/dev/null
rm -f ~/.config/systemd/user/openclaw-watchdog.service
fi
rm -rf ~/.openclaw/watchdog 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
openclaw-watchdog
Description: Self-healing monitoring system for OpenClaw gateway. Monitors health, auto-restarts on failure, and sends Telegram alerts. Diagnostics and log analysis run locally on-device. Alert notifications are sent to the user's Telegram bot. Use when user wants to set up gateway monitoring, watchdog, or auto-recovery.
Prerequisites
- Telegram Bot Token — Create via @BotFather
- Telegram Chat ID — Your personal chat ID for receiving alerts
- Python 3 — Required for the watchdog service
- OpenClaw — Installed and running
Trigger Keywords
- watchdog, monitoring, auto-fix, gateway health, self-healing, auto-recovery, watch dog
Setup
Send the user ONE message with everything they need:
🐕 Watch Dog — Self-Healing Gateway Monitor
Watch Dog is a background service that pings your OpenClaw gateway every 15 seconds. If the gateway goes down, it automatically attempts to restart it and sends you Telegram alerts so you're always in the loop. All diagnostics run locally on your device.
To set it up, I need:
-
Telegram Bot Token — Create a bot via @BotFather on Telegram, then send me the token (looks like
123456:ABC-DEF...) -
Your Telegram Chat ID — Send
/startto your bot, then visithttps://api.telegram.org/bot<YOUR_TOKEN>/getUpdatesto find your chat ID
Send me the token and chat ID and I'll handle the rest (including a test run to make sure everything works)!
After Receiving Credentials
Run these steps in order:
1. Validate credentials
python3 ~/.openclaw/workspace/openclaw-watchdog/scripts/validate.py "$TELEGRAM_TOKEN"
2. Run setup script
chmod +x ~/.openclaw/workspace/openclaw-watchdog/scripts/setup.sh
~/.openclaw/workspace/openclaw-watchdog/scripts/setup.sh \
--telegram-token "$TELEGRAM_TOKEN" \
--telegram-chat-id "$TELEGRAM_CHAT_ID"
3. Connect via Telegram (Pairing)
python3 ~/.openclaw/workspace/openclaw-watchdog/scripts/test-message.py "$TELEGRAM_TOKEN" "$TELEGRAM_CHAT_ID"
Wait for user to confirm they received the Telegram message before proceeding.
4. Verify it's running
# Check service status
if [[ "$(uname)" == "Darwin" ]]; then
launchctl list | grep openclaw.watchdog
else
systemctl --user status openclaw-watchdog
fi
# Check logs
tail -20 ~/.openclaw/watchdog/watchdog.log
5. Confirm to user
Tell them Watch Dog is active, what it monitors, and that they'll get Telegram alerts if anything goes wrong.
How It Works
- Pings
localhost:3117/healthevery 15 seconds - After 3 consecutive failures, attempts
openclaw gateway restart - Up to 2 restart attempts, then asks user for reinstall permission via Telegram
- User approves by running:
touch ~/.openclaw/watchdog/approve-reinstall - Without approval, only sends notifications — no destructive actions
- Local pattern-matching diagnostics (no logs sent externally)
- Runs as macOS LaunchAgent or Linux systemd user service
- Credentials encrypted with AES-256 using machine-specific key
Uninstall
if [[ "$(uname)" == "Darwin" ]]; then
launchctl unload ~/Library/LaunchAgents/com.openclaw.watchdog.plist 2>/dev/null
rm -f ~/Library/LaunchAgents/com.openclaw.watchdog.plist
else
systemctl --user stop openclaw-watchdog 2>/dev/null
systemctl --user disable openclaw-watchdog 2>/dev/null
rm -f ~/.config/systemd/user/openclaw-watchdog.service
fi
rm -rf ~/.openclaw/watchdog