Communitygithub.com

金丝雀哨兵——部署后监控

使用此技能在发布后监控和验证已部署的 URL —— 检查 HTTP 端点、SSE 流、静态资源、控制台错误以及部署、合并或依赖升级后的性能退化。用于冒烟测试 / 金丝雀测试 / 部署后验证。

金丝雀哨兵——部署后监控 是什么?

金丝雀哨兵是一个部署后监控技能,适用于 Claude Code、Cursor 和 Codex 等 AI 编程助手。它允许用户在部署后自动验证 URL 的可用性和健康状态,通过循环检查 HTTP 状态码、控制台错误、网络故障、性能指标(LCP/CLS/INP)、关键内容元素、API 健康、静态资源和 SSE 流来检测回归问题。支持三种模式:快速检查(单次)、持续监控(按间隔循环)和差异对比(比较两个环境)。当触发关键阈值(如 HTTP 非 200、LCP 超过 4 秒、控制台错误超过 5 个等)时,会发送桌面通知并可转发到 Slack/Discord webhook。该技能常与浏览器 QA 技能配合使用,也可作为 git push 后的自动 hook 或 GitHub Actions 的 CI 步骤集成。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

金丝雀哨兵——部署后监控 是做什么的?

何时使用

  • 部署到生产或预发布环境后
  • 合并有风险的 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 状态码以及预期的内容类型?
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 倍
  - 静态资源内容类型意外改变
  - SSE 心跳延迟 > 基线 2 倍

info:      # 仅记录日志
  - 轻微性能波动
  - 新的网络请求(添加了第三方脚本?)

通知

当触发关键阈值时:

  • 桌面通知(macOS/Linux)
  • 可选:Slack/Discord webhook
  • 记录到 ~/.claude/canary-watch.log

输出

## 金丝雀报告——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 用于部署前验证
  • Hooks:添加为 git push 上的 PostToolUse hook,以便在部署后自动检查
  • 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.

相关技能