Communitygithub.com

Canary Watch — 部署後監控

使用此技能來監控和驗證發布後的部署 URL —— 檢查 HTTP 端點、SSE 串流、靜態資源、主控台錯誤以及部署、合併或依賴升級後的效能回歸。煙霧測試 / Canary 測試 / 部署後驗證。

Canary Watch — 部署後監控 是什麼?

Canary Watch 是一個專門用於部署後監控的 AI 代理技能,能夠在部署、合併風險 PR、驗證修復效果、持續監控發布窗口或依賴升級後,自動檢查目標 URL 是否存在回歸問題。它支援多種監控模式:快速單次檢查、定時持續監控(可設定間隔和持續時間)以及差異比較模式(例如 staging 與 production 比對)。監控項目涵蓋 HTTP 狀態碼、主控台錯誤、網路請求失敗、LCP/CLS/INP 等效能指標、關鍵頁面元素是否存在、API 健康度與 SLA、靜態資源的正確回應與 Content-Type,以及 SSE 事件串流的連線與初始心跳。當發現嚴重違規(如 HTTP 非 200、LCP 超過 4 秒、API 5xx、SSE 無法連線)時,會立即觸發通知(桌面通知,可選 Slack/Discord Webhook),並記錄到本地日誌。該技能可與 `/browser-qa` 等技能搭配,亦可作為 Git 推播鉤子或 GitHub Actions 中的自動化步驟,協助團隊確保存取環境維持高品質。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/canary-watch

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Canary Watch — 部署後監控 是做什麼的?

使用時機

  • 部署至生產或暫存環境後
  • 合併高風險 PR 後
  • 想驗證某項修復是否確實生效時
  • 發布窗口期間的持續監控
  • 依賴升級後

運作方式

監控已部署 URL 是否存在回歸問題。會持續循環執行,直到被停止或監控時段結束。

監控項目

1. HTTP 狀態 — 頁面是否回傳 200?
2. 主控台錯誤 — 是否出現先前沒有的新錯誤?
3. 網路失敗 — API 呼叫失敗、5xx 回應?
4. 效能 — LCP/CLS/INP 與基線相比是否有回歸?
5. 內容 — 關鍵元素是否消失?(h1、nav、footer、CTA)
6. API 健康度 — 關鍵端點是否在 SLA 內回應?
7. 靜態資源 — JS、CSS、圖片和字型請求是否回傳 2xx/3xx 且 Content-Type 符合預期?
8. SSE 串流 — 事件串流端點是否能夠連線並接收到初始事件或心跳?

監控模式

快速檢查(預設):單次執行,報告結果

/canary-watch https://myapp.com

持續監控:每隔 N 分鐘檢查一次,持續 M 小時

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

差異模式:比較暫存與生產環境

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

警示閾值

critical:  # 立即警示
  - HTTP 狀態不等於 200
  - 主控台錯誤數量 > 5(僅計算新錯誤)
  - LCP > 4s
  - API 端點回傳 5xx
  - 靜態資源回傳 4xx/5xx
  - SSE 端點無法連線或在首次心跳前斷線

warning:   # 在報告中標記
  - LCP 較基線增加超過 500ms
  - CLS > 0.1
  - 新的主控台警告
  - 回應時間超過基線的 2 倍
  - 靜態資源的 Content-Type 出乎意料地改變
  - SSE 心跳延遲超過基線的 2 倍

info:      # 僅記錄
  - 微小的效能變異
  - 新的網路請求(是否新增了第三方腳本?)

通知方式

當觸發嚴重閾值時:

  • 桌面通知(macOS/Linux)
  • 可選:Slack/Discord Webhook
  • 記錄至 ~/.claude/canary-watch.log

輸出範例

## Canary 報告 — myapp.com — 2026-03-23 03:15 PST

### 狀態:健康 ✓

| 檢查項目 | 結果 | 基線 | 差異 |
|----------|------|------|------|
| HTTP | 200 ✓ | 200 | — |
| 主控台錯誤 | 0 ✓ | 0 | — |
| LCP | 1.8s ✓ | 1.6s | +200ms |
| CLS | 0.01 ✓ | 0.01 | — |
| API /health | 145ms ✓ | 120ms | +25ms |
| 靜態資源 | 42/42 ✓ | 42/42 | — |
| SSE /events | 已連線 ✓ | 已連線 | +80ms 心跳 |

### 未檢測到任何回歸問題。部署狀態乾淨。

整合方式

搭配使用:

  • /browser-qa 進行部署前驗證
  • 鉤子:在 git push 時加入 PostToolUse 鉤子,在部署後自動檢查
  • CI:在 GitHub Actions 的部署步驟後執行此檢查

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能