Canary Watch

affaan-m/ECC/skills/canary-watch

作者 affaan-mef648e01899ba3e8dc6371642deaaf64b4477775无许可证275K 个星标收录于 2026年10月9日更新于 2026年10月9日仓库4天前更新

Use this skill to monitor and verify a deployed URL after releases — checks HTTP endpoints, SSE streams, static assets, console errors, and performance regressions after deploys, merges, or dependency upgrades. Smoke / canary / post-deploy verification.

仅含说明DevOps & Cloud
AI 生成的概览

在发布后监控已部署的 URL,检查 HTTP 状态、控制台错误、性能、静态资源和 SSE 流是否存在回归。

功能
Canary Watch 对已部署的 URL 执行发布后验证,可单次检查,也可在设定的时间窗口内持续循环监控。它检查 HTTP 状态、新增的控制台错误、网络与 API 失败、LCP 和 CLS 等性能指标相对基线的变化、关键页面内容、静态资源响应以及 SSE 流的连通性。它按严重、警告和信息三级阈值判定,并生成包含状态、基线对比和差值的 Markdown 金丝雀报告,可选通过桌面通知或 Slack/Discord webhook 告警,并写入本地日志文件。
适用场景
适用于部署到生产或预发环境之后、合并高风险 PR 之后、依赖升级之后,或发布窗口期间的持续监控。也适合用来确认某个修复是否真正生效,以及对比预发与生产环境。
运行要求
仅为说明文档,不附带脚本。需要提供要监控的已部署 URL,做回归对比时还需要基线数值。可选配置 Slack 或 Discord webhook 通知、桌面通知支持,以及对本地日志路径的写入权限。需要能访问被监控站点的网络。

Canary Watch — Post-Deploy Monitoring

When to Use

  • After deploying to production or staging
  • After merging a risky PR
  • When you want to verify a fix actually fixed it
  • Continuous monitoring during a launch window
  • After dependency upgrades

How It Works

Monitors a deployed URL for regressions. Runs in a loop until stopped or until the watch window expires.

What It Watches

1. HTTP Status — is the page returning 200?2. Console Errors — new errors that weren't there before?3. Network Failures — failed API calls, 5xx responses?4. Performance — LCP/CLS/INP regression vs baseline?5. Content — did key elements disappear? (h1, nav, footer, CTA)6. API Health — are critical endpoints responding within SLA?7. Static Assets — are JS, CSS, image, and font requests returning 2xx/3xx with expected content types?8. SSE Streams — do event-stream endpoints connect and receive an initial event or heartbeat?

Watch Modes

Quick check (default): single pass, report results

/canary-watch https://myapp.com

Sustained watch: check every N minutes for M hours

/canary-watch https://myapp.com --interval 5m --duration 2h

Diff mode: compare staging vs production

/canary-watch --compare https://staging.myapp.com https://myapp.com

Alert Thresholds

yaml
critical:  # immediate alert  - HTTP status != 200  - Console error count > 5 (new errors only)  - LCP > 4s  - API endpoint returns 5xx  - Static asset returns 4xx/5xx  - SSE endpoint cannot connect or drops before first heartbeat
warning:   # flag in report  - LCP increased > 500ms from baseline  - CLS > 0.1  - New console warnings  - Response time > 2x baseline  - Static asset content type changed unexpectedly  - SSE heartbeat latency > 2x baseline
info:      # log only  - Minor performance variance  - New network requests (third-party scripts added?)

Notifications

When a critical threshold is crossed:

  • Desktop notification (macOS/Linux)
  • Optional: Slack/Discord webhook
  • Log to ~/.claude/canary-watch.log

Output

markdown
## Canary Report — myapp.com — 2026-03-23 03:15 PST
### Status: HEALTHY ✓
| Check | Result | Baseline | Delta ||-------|--------|----------|-------|| HTTP | 200 ✓ | 200 | — || Console errors | 0 ✓ | 0 | — || LCP | 1.8s ✓ | 1.6s | +200ms || CLS | 0.01 ✓ | 0.01 | — || API /health | 145ms ✓ | 120ms | +25ms || Static assets | 42/42 ✓ | 42/42 | — || SSE /events | connected ✓ | connected | +80ms heartbeat |
### No regressions detected. Deploy is clean.

Integration

Pair with:

  • /browser-qa for pre-deploy verification
  • Hooks: add as a PostToolUse hook on git push to auto-check after deploys
  • CI: run in GitHub Actions after deploy step

来源与署名

来源:affaan-m/ECC位于skills/canary-watch提交ef648e0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架