{
  "schemaVersion": "1.0",
  "item": {
    "slug": "gateway-watchdog",
    "name": "Gateway Watchdog",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/guoqunabc/gateway-watchdog",
    "canonicalUrl": "https://clawhub.ai/guoqunabc/gateway-watchdog",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/gateway-watchdog",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=gateway-watchdog",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/gateway-watchdog.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/gateway-watchdog"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/gateway-watchdog",
    "agentPageUrl": "https://openagent3.xyz/skills/gateway-watchdog/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gateway-watchdog/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gateway-watchdog/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Gateway Watchdog",
        "body": "Detect abnormal error patterns in the OpenClaw Gateway before they cause damage. Works with all channels: Telegram, WhatsApp, Discord, Slack, Signal, iMessage, Feishu, and more.\n\nBorn from a real incident: a silent try-catch caused 76,744 failed retries in 8 hours — undetected until the API quota was exhausted."
      },
      {
        "title": "What It Detects",
        "body": "CategoryPatternsRate limitingHTTP 429, rate.limit, too many requestsServer errorsHTTP 5xx status codesAuth/permissionHTTP 401/403, unauthorized, forbidden, token expiredNetwork errorsETIMEDOUT, ECONNREFUSED, ECONNRESET, ENOTFOUND, socket hang upDelivery failuressendMessage failed, deliver failed, fetch failedCustomUser-defined via WATCHDOG_EXTRA_PATTERNS env var"
      },
      {
        "title": "Smart Analysis",
        "body": "Error rate (errors/min) — more meaningful than raw count\nSpike detection — alerts when errors jump 3x+ vs last check\nError concentration — flags when 80%+ errors are one type (single fault source)"
      },
      {
        "title": "Quick Start",
        "body": "bash scripts/gateway-watchdog.sh check     # silent unless errors exceed threshold\nbash scripts/gateway-watchdog.sh verbose   # always outputs full report\nbash scripts/gateway-watchdog.sh history   # show monitoring history\nbash scripts/gateway-watchdog.sh trend     # last 24h error trend"
      },
      {
        "title": "Heartbeat integration",
        "body": "Add to HEARTBEAT.md:\n\n## Gateway Error Monitoring (every heartbeat)\n- Run `~/.openclaw/workspace/skills/gateway-watchdog/scripts/gateway-watchdog.sh check`\n- If output is non-empty, report to user immediately\n- No output = healthy, skip reporting"
      },
      {
        "title": "Cron (optional)",
        "body": "openclaw cron add \\\n  --name \"gateway-watchdog\" \\\n  --schedule \"*/30 * * * *\" \\\n  --task \"Run gateway-watchdog.sh verbose. If errors detected, notify user with the report.\" \\\n  --channel last"
      },
      {
        "title": "Configuration",
        "body": "All via environment variables:\n\nVariableDefaultDescriptionWATCHDOG_THRESHOLD30Error count that triggers alertWATCHDOG_WINDOW30Monitoring window in minutesWATCHDOG_SPIKE_RATIO3Alert when errors jump Nx vs last checkWATCHDOG_EXTRA_PATTERNS(empty)Custom regex patterns (e.g., 99991400|99991403)WATCHDOG_STATE~/.local/state/gateway-watchdog/state.jsonState fileWATCHDOG_LOG~/.local/state/gateway-watchdog/history.logHistory log"
      },
      {
        "title": "Adding channel-specific patterns",
        "body": "# Feishu-specific error codes\nexport WATCHDOG_EXTRA_PATTERNS='99991400|99991403|99991404|99991429'\n\n# Telegram-specific\nexport WATCHDOG_EXTRA_PATTERNS='Too Many Requests|FLOOD_WAIT|bot was blocked'\n\n# Discord-specific\nexport WATCHDOG_EXTRA_PATTERNS='DiscordAPIError|Missing Permissions|Unknown Channel'"
      },
      {
        "title": "🔴 Alert (Chinese locale)",
        "body": "🔴 Gateway 最近 30 分钟出现 150 条异常错误（阈值: 30，5/min）\n📈 错误突增: 12 → 150（3倍阈值触发）\n\n错误分类：\n  429/限流: 120\n  5xx服务端错误: 5\n  认证/权限: 0\n  网络错误: 5\n  消息投递失败: 20\n\n  ⚠️  单一错误类型「429/限流」占比 80%，可能是单一故障源"
      },
      {
        "title": "🔴 Alert (English equivalent)",
        "body": "🔴 Gateway detected 150 errors in the last 30 min (threshold: 30, 5/min)\n📈 Error spike: 12 → 150 (3x threshold triggered)\n\nError breakdown:\n  429/Rate-limit: 120\n  5xx Server errors: 5\n  Auth/Permission: 0\n  Network errors: 5\n  Delivery failures: 20\n\n  ⚠️  Single error type \"429/Rate-limit\" accounts for 80%+ — likely a single fault source"
      },
      {
        "title": "💚 Healthy",
        "body": "No output from check mode."
      },
      {
        "title": "Limitations",
        "body": "Requires systemd + journalctl (falls back to ~/.openclaw/logs/ on macOS)\nReactive, not preventive\nCannot pinpoint which extension is failing — check error details for clues"
      },
      {
        "title": "Security",
        "body": "Read-only: Only reads logs\nNo credentials: No API keys accessed\nNo network: No outbound requests\nUser state only: State in ~/.local/state/gateway-watchdog/ (XDG standard, no elevated permissions needed)"
      }
    ],
    "body": "Gateway Watchdog\n\nDetect abnormal error patterns in the OpenClaw Gateway before they cause damage. Works with all channels: Telegram, WhatsApp, Discord, Slack, Signal, iMessage, Feishu, and more.\n\nBorn from a real incident: a silent try-catch caused 76,744 failed retries in 8 hours — undetected until the API quota was exhausted.\n\nWhat It Detects\nCategory\tPatterns\nRate limiting\tHTTP 429, rate.limit, too many requests\nServer errors\tHTTP 5xx status codes\nAuth/permission\tHTTP 401/403, unauthorized, forbidden, token expired\nNetwork errors\tETIMEDOUT, ECONNREFUSED, ECONNRESET, ENOTFOUND, socket hang up\nDelivery failures\tsendMessage failed, deliver failed, fetch failed\nCustom\tUser-defined via WATCHDOG_EXTRA_PATTERNS env var\nSmart Analysis\nError rate (errors/min) — more meaningful than raw count\nSpike detection — alerts when errors jump 3x+ vs last check\nError concentration — flags when 80%+ errors are one type (single fault source)\nQuick Start\nbash scripts/gateway-watchdog.sh check     # silent unless errors exceed threshold\nbash scripts/gateway-watchdog.sh verbose   # always outputs full report\nbash scripts/gateway-watchdog.sh history   # show monitoring history\nbash scripts/gateway-watchdog.sh trend     # last 24h error trend\n\nHeartbeat integration\n\nAdd to HEARTBEAT.md:\n\n## Gateway Error Monitoring (every heartbeat)\n- Run `~/.openclaw/workspace/skills/gateway-watchdog/scripts/gateway-watchdog.sh check`\n- If output is non-empty, report to user immediately\n- No output = healthy, skip reporting\n\nCron (optional)\nopenclaw cron add \\\n  --name \"gateway-watchdog\" \\\n  --schedule \"*/30 * * * *\" \\\n  --task \"Run gateway-watchdog.sh verbose. If errors detected, notify user with the report.\" \\\n  --channel last\n\nConfiguration\n\nAll via environment variables:\n\nVariable\tDefault\tDescription\nWATCHDOG_THRESHOLD\t30\tError count that triggers alert\nWATCHDOG_WINDOW\t30\tMonitoring window in minutes\nWATCHDOG_SPIKE_RATIO\t3\tAlert when errors jump Nx vs last check\nWATCHDOG_EXTRA_PATTERNS\t(empty)\tCustom regex patterns (e.g., 99991400|99991403)\nWATCHDOG_STATE\t~/.local/state/gateway-watchdog/state.json\tState file\nWATCHDOG_LOG\t~/.local/state/gateway-watchdog/history.log\tHistory log\nAdding channel-specific patterns\n# Feishu-specific error codes\nexport WATCHDOG_EXTRA_PATTERNS='99991400|99991403|99991404|99991429'\n\n# Telegram-specific\nexport WATCHDOG_EXTRA_PATTERNS='Too Many Requests|FLOOD_WAIT|bot was blocked'\n\n# Discord-specific\nexport WATCHDOG_EXTRA_PATTERNS='DiscordAPIError|Missing Permissions|Unknown Channel'\n\nInterpreting Results\n🔴 Alert (Chinese locale)\n🔴 Gateway 最近 30 分钟出现 150 条异常错误（阈值: 30，5/min）\n📈 错误突增: 12 → 150（3倍阈值触发）\n\n错误分类：\n  429/限流: 120\n  5xx服务端错误: 5\n  认证/权限: 0\n  网络错误: 5\n  消息投递失败: 20\n\n  ⚠️  单一错误类型「429/限流」占比 80%，可能是单一故障源\n\n🔴 Alert (English equivalent)\n🔴 Gateway detected 150 errors in the last 30 min (threshold: 30, 5/min)\n📈 Error spike: 12 → 150 (3x threshold triggered)\n\nError breakdown:\n  429/Rate-limit: 120\n  5xx Server errors: 5\n  Auth/Permission: 0\n  Network errors: 5\n  Delivery failures: 20\n\n  ⚠️  Single error type \"429/Rate-limit\" accounts for 80%+ — likely a single fault source\n\n💚 Healthy\n\nNo output from check mode.\n\nLimitations\nRequires systemd + journalctl (falls back to ~/.openclaw/logs/ on macOS)\nReactive, not preventive\nCannot pinpoint which extension is failing — check error details for clues\nSecurity\nRead-only: Only reads logs\nNo credentials: No API keys accessed\nNo network: No outbound requests\nUser state only: State in ~/.local/state/gateway-watchdog/ (XDG standard, no elevated permissions needed)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/guoqunabc/gateway-watchdog",
    "publisherUrl": "https://clawhub.ai/guoqunabc/gateway-watchdog",
    "owner": "guoqunabc",
    "version": "1.4.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/gateway-watchdog",
    "downloadUrl": "https://openagent3.xyz/downloads/gateway-watchdog",
    "agentUrl": "https://openagent3.xyz/skills/gateway-watchdog/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gateway-watchdog/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gateway-watchdog/agent.md"
  }
}