Communitygithub.com

browser-qa

使用此技能,在部署功能後自動化視覺測試與 UI 互動驗證。

browser-qa 是什麼?

Browser QA 是一項專為開發者與 AI Agent 設計的技能,用於自動化視覺測試與 UI 互動驗證。它在功能部署至暫存或預覽環境後,透過瀏覽器自動化 MCP(如 Claude in Chrome、Playwright 或 Puppeteer)模擬真實使用者操作,進行冒煙測試、互動測試、視覺回歸與無障礙稽核。此技能強調安全至上:預設為唯讀模式,避免對生產環境執行變更操作(如結帳、付款、刪除),需明確同意並使用預備的測試憑證。支援 Chrome 外掛、Browserbase 與 Puppeteer 整合,並可結合 `/canary-watch` 進行部署後監控。輸出結構化 QA 報告,包含核心網頁指標、互動結果、版面偏移與 WCAG 違規,協助團隊判斷是否可發佈。

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

在你喜歡的 AI 中提問

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

說明文件

Browser QA — 自動化視覺測試與互動驗證

使用時機

  • 將功能部署到暫存/預覽環境後
  • 需要跨頁面驗證 UI 行為時
  • 出貨前 — 確認版面、表單、互動實際運作
  • 審查涉及前端程式碼的 PR 時
  • 無障礙稽核與響應式測試

運作方式

使用瀏覽器自動化 MCP(claude-in-chrome、Playwright 或 Puppeteer)像真實使用者一樣與即時頁面互動。

安全優先 — 爆炸半徑(預設唯讀)

Browser QA 會驅動真實的認證與使用者旅程,因此必須明確界定爆炸半徑。 預設為唯讀:絕不對生產 URL 執行變更旅程(結帳、付款、刪除、大量更新) — 需要明確同意以及使用暫存/預覽 URL。使用預先準備的測試憑證,絕不使用真實生產登入,並在儲存任何螢幕截圖前遮蓋憑證/權杖/PII。

階段 1:冒煙測試

1. 導航至目標 URL
2. 檢查主控台錯誤(過濾雜訊:分析工具、第三方)
3. 確認網路請求中無 4xx/5xx
4. 在桌面與行動裝置視口截取首屏螢幕截圖
5. 檢查核心網頁指標:LCP < 2.5s、CLS < 0.1、INP < 200ms
   (INP 於 2024 年 3 月取代 FID;閾值依據 web.dev)

階段 2:互動測試

1. 點擊每個導覽連結 — 確認無死連結
2. 以有效資料提交表單 — 確認成功狀態
3. 以無效資料提交表單 — 確認錯誤狀態
4. 測試認證流程:登入 → 受保護頁面 → 登出(僅使用測試憑證,絕不用生產環境)
5. 測試關鍵使用者旅程(結帳、引導流程、搜尋)
   — 預設唯讀;僅在明確同意的情況下,針對暫存環境執行變更旅程
     (請參閱上方「安全優先」)

階段 3:視覺回歸

1. 在 3 個斷點(375px、768px、1440px)截取關鍵頁面螢幕截圖
2. 與已提交的基準螢幕截圖比對
   — 無基準 ⇒ 回報 INCONCLUSIVE(無結論),絕不靜默 PASS
3. 標記超過 5px 的版面位移、遺失元素、溢出
4. 如適用,檢查深色模式

階段 4:無障礙

1. 在每個頁面上執行 axe-core 或同等工具
2. 標記 WCAG 2.2 AA 違規(對比度、標籤、焦點順序)
3. 驗證鍵盤導覽可從頭到尾運作
4. 檢查螢幕閱讀器地標

注意:axe-core 自動涵蓋約 30–40% 的 WCAG。測試通過是必要條件,而非充分條件 — 鍵盤導覽、焦點順序和螢幕閱讀器測試仍需人工檢查。請勿僅憑自動化測試通過即回報「無障礙」。

輸出格式

## QA 報告 — [URL] — [時間戳]

### 冒煙測試
- 主控台錯誤:0 個嚴重,2 個警告(分析工具雜訊)
- 網路:全部 200/304,無失敗
- 核心網頁指標:LCP 1.2s ✓、CLS 0.02 ✓、INP 89ms ✓

### 互動
- [✓] 導覽連結:12/12 正常運作
- [✗] 聯絡表單:缺少無效電子郵件的錯誤狀態
- [✓] 認證流程:登入/登出正常運作

### 視覺
- [✗] Hero 區塊在 375px 視口溢出
- [✓] 深色模式:所有頁面一致

### 無障礙
- 2 項 AA 違規:hero 圖片缺少替代文字、頁尾連結對比度不足

### 判定:附修正出貨(2 個問題,0 個阻塞)
# 判定 ∈ 出貨 / 附修正出貨 / 禁止出貨;若無視覺基準則使用 INCONCLUSIVE

整合方式

可與任何瀏覽器 MCP 搭配使用:

  • mChild__claude-in-chrome__* 工具(首選 — 使用你的實際 Chrome)
  • 透過 mcp__browserbase__* 使用 Playwright
  • 直接使用 Puppeteer 腳本

可搭配 /canary-watch 進行部署後監控。

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.

相關技能