← 返回 Skills 市场
chapati23

Skill

作者 chapati · GitHub ↗ · v1.2.1
cross-platform ✓ 安全检测通过
644
总下载
2
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install claude-watchdog
功能描述
Monitor the Claude API for outages and latency spikes with rich Telegram alerts. Status monitoring, latency probes, and automatic recovery notifications.
使用说明 (SKILL.md)

Claude Watchdog 🐕

Monitor the Anthropic/Claude API for outages and latency spikes. Sends rich alerts to Telegram — no agent tokens consumed for status checks.

What It Does

Status Monitor (status-check.py)

  • Polls status.claude.com every 15 minutes via cron
  • Alerts with incident name, latest update text, per-component status
  • Tags incidents as "(not our model)" if e.g. Haiku is affected but you use Sonnet
  • Sends all-clear on recovery
  • Zero token cost

Latency Probe (latency-probe.py)

  • Sends a minimal request through OpenClaw's local gateway every 15 minutes
  • Measures real end-to-end latency to Anthropic API
  • Maintains rolling baseline (median of last 20 samples)
  • Alerts with 🟡/🟠/🔴 severity based on spike magnitude
  • Sends all-clear when latency recovers
  • ~$0.000001 per probe

Setup

Run the interactive setup script:

bash /path/to/skills/claude-watchdog/scripts/setup.sh

You'll need:

  1. Telegram Bot Token — from @BotFather
  2. Telegram Chat ID — send a message to your bot, then check https://api.telegram.org/bot\x3CTOKEN>/getUpdates
  3. OpenClaw Gateway Token — run:
    python3 -c "from pathlib import Path; import json; print(json.load(open(Path.home() / '.openclaw/openclaw.json'))['gateway']['auth']['token'])"
    
  4. Gateway Port — default 18789

The setup script writes config, installs cron jobs, and runs an initial check.

To uninstall (removes cron jobs, optionally config/state):

bash /path/to/skills/claude-watchdog/scripts/setup.sh --uninstall

Config

Stored in ~/.openclaw/skills/claude-watchdog/claude-watchdog.env. To reconfigure, either re-run setup.sh or edit this file directly — changes take effect on the next cron run (within 15 minutes).

TELEGRAM_BOT_TOKEN=...
TELEGRAM_CHAT_ID=...
OPENCLAW_GATEWAY_TOKEN=...
OPENCLAW_GATEWAY_PORT=18789
MONITOR_MODEL=sonnet
PROBE_MODEL=openclaw
PROBE_AGENT_ID=main
Variable Default Description
TELEGRAM_BOT_TOKEN (required) Telegram bot token from @BotFather
TELEGRAM_CHAT_ID (required) Target chat for alerts
OPENCLAW_GATEWAY_TOKEN (required) Auth token for the local OpenClaw gateway
OPENCLAW_GATEWAY_PORT 18789 Port the OpenClaw gateway listens on
MONITOR_MODEL sonnet Model name to match in status incidents (e.g. "sonnet", "haiku")
PROBE_MODEL openclaw Model alias sent to the gateway for latency probes. openclaw uses the gateway's default model routing
PROBE_AGENT_ID main Value of the x-openclaw-agent-id header sent with probes
FILTER_KEYWORDS (none) Comma-separated keywords to filter out of status alerts (e.g. "skills,Artifacts,Memory"). Empty = receive all alerts

Scripts also accept these as environment variables (env file takes priority).

Security Note

The env file contains sensitive tokens (Telegram bot token, gateway token). The setup script sets permissions to 600 (owner-only read/write). If you create or edit the file manually, ensure restricted permissions:

chmod 600 ~/.openclaw/skills/claude-watchdog/claude-watchdog.env

Alert Examples

Status incident:

🟠 Anthropic Status: Partially Degraded Service

📌 Elevated error rates on Claude 3.5 Haiku (not our model)
Status: Investigating
Update: "We are investigating increased error rates..."

Components:
  🟠 API: partial outage

🔗 https://status.claude.com

Latency spike:

🟡 Anthropic API — High Latency Detected

Current: 12.3s
Baseline: 3.1s (median of last 19 samples)
Ratio: 4.0×

Slow responses are expected right now.

Recovery:

✅ Anthropic API — Latency Back to Normal

Current: 2.8s
Baseline: 3.1s
Was: 12.3s when alert fired

State & Logs

All state and log files are stored in ~/.openclaw/skills/claude-watchdog/:

File Purpose
claude-watchdog-status.json Status check state
claude-watchdog-latency.json Latency probe state & samples
claude-watchdog-status.log Status check log
claude-watchdog-latency.log Latency probe log

Tuning Thresholds

Edit constants at the top of latency-probe.py:

Constant Default Meaning
ALERT_MULTIPLIER 2.5 Alert if latency > N× baseline median
ALERT_HARD_FLOOR 10.0s Always alert above this absolute threshold
RECOVER_MULTIPLIER 1.5 Clear alert when below N× baseline
BASELINE_WINDOW 20 Rolling sample window size
BASELINE_MIN_SAMPLES 5 Minimum samples before alerting starts
PROBE_TIMEOUT 45s Give up on probe after this long

Requirements

  • Python 3.10+ (stdlib only, no pip dependencies)
  • OpenClaw gateway running locally
  • Telegram bot with access to the target chat
安全使用建议
This skill appears to do what it claims, but review and confirm before installing: 1) You will give the skill your OpenClaw gateway token (sensitive) which it stores in ~/.openclaw/skills/claude-watchdog/claude-watchdog.env; make sure you are comfortable storing that token and that the file permissions remain restrictive (setup sets 600). 2) The setup installs cron jobs that run every 15 minutes — back up your existing crontab if you want to review changes first. 3) The registry metadata marks TELEGRAM_TOPIC_ID (and some other vars) as required, but the scripts treat them as optional with defaults — expect minor metadata/documentation mismatch. 4) The scripts only contact status.claude.com, your local OpenClaw gateway (localhost), and the Telegram Bot API; verify you are comfortable those endpoints receive the minimal probe/status data. If any of these points are concerning, inspect the three scripts directly and/or run setup.sh interactively and review the written env file before allowing cron installation.
功能分析
Type: OpenClaw Skill Name: claude-watchdog Version: 1.2.1 The OpenClaw AgentSkills skill bundle 'claude-watchdog' is classified as benign. The code and documentation align with its stated purpose of monitoring the Claude API and sending Telegram alerts. Sensitive configuration (tokens) is handled securely by writing to a file with `600` permissions (`claude-watchdog.env`), and user inputs in `scripts/setup.sh` are validated (e.g., numeric chat/topic IDs) before being used in `curl` commands or written to config. Network activity is confined to legitimate endpoints: `api.telegram.org` for alerts, `status.claude.com` for status checks, and `127.0.0.1` for local gateway latency probes. There is no evidence of data exfiltration, unauthorized persistence, arbitrary code execution, or prompt injection attempts against the AI agent in `SKILL.md`.
能力评估
Purpose & Capability
Requested binaries (python3, crontab, curl), Telegram tokens/IDs, and the OpenClaw gateway token/port are all used by the included scripts. MONITOR_MODEL/PROBE_MODEL/PROBE_AGENT_ID are used to target and tag probes and status filtering. No unrelated cloud credentials or services are requested.
Instruction Scope
Runtime instructions are scoped to (1) polling status.claude.com, (2) probing the local OpenClaw gateway, and (3) sending Telegram messages. The setup script installs cron jobs, writes a single env file under ~/.openclaw/skills/claude-watchdog/, and runs an initial check — all described in SKILL.md. The SKILL.md and setup instruct how to locate the OpenClaw gateway token (reading ~/.openclaw/openclaw.json) — this is required for probes but is sensitive and worth conscious consent from the user.
Install Mechanism
This is instruction-only (no external install/download). Setup.sh writes config and installs cron jobs. No third-party packages or arbitrary downloads are performed. Cron-based persistence is the expected mechanism for periodic monitoring.
Credentials
Env vars requested map to the functionality (Telegram + gateway + probe/status tuning). Minor inconsistency: TELEGRAM_TOPIC_ID is declared as a required env in the registry metadata but treated as optional in SKILL.md and the scripts. PROBE_MODEL and PROBE_AGENT_ID also have sensible defaults in code despite being listed in the required envs. The OpenClaw gateway token is sensitive but justified by the probe design.
Persistence & Privilege
The skill does not request always:true and does not alter other skills' configuration. It installs user-level cron jobs and stores its own config/state under ~/.openclaw/skills/claude-watchdog/ with permissions set to 600 — this is a reasonable level of persistence for a monitoring tool.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-watchdog
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-watchdog 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.1
Fix SkillGuard security scan - declare all env vars in frontmatter
v1.2.0
claude-watchdog v1.2.0 - Added OpenClaw metadata to SKILL.md for improved integration and discovery. - Introduced the FILTER_KEYWORDS config option to allow filtering status alerts by keyword. - State and log filenames in documentation now accurately reflect new file names. - Updated requirements and bin dependencies in documentation.
v1.1.0
Reduce alert noise: raise threshold to 15s, add quiet hours (9AM-9PM Berlin), require stable recovery (2 readings)
v1.0.1
Declare required env vars and bins in metadata — fixes ClawHub scanner Suspicious rating
v1.0.0
Initial release
元数据
Slug claude-watchdog
版本 1.2.1
许可证
累计安装 0
当前安装数 0
历史版本数 5
常见问题

Skill 是什么?

Monitor the Claude API for outages and latency spikes with rich Telegram alerts. Status monitoring, latency probes, and automatic recovery notifications. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 644 次。

如何安装 Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-watchdog」即可一键安装,无需额外配置。

Skill 是免费的吗?

是的,Skill 完全免费(开源免费),可自由下载、安装和使用。

Skill 支持哪些平台?

Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Skill?

由 chapati(@chapati23)开发并维护,当前版本 v1.2.1。

💬 留言讨论