Communitygithub.com

browser-qa

使用此技能透過瀏覽器自動化來執行視覺測試與 UI 互動驗證,特別是在部署功能之後。

browser-qa 是什麼?

Browser QA 是一款專為開發者與 AI 代理設計的技能,用於自動化視覺測試、互動驗證與無障礙稽核。它可與 Chrome 內的 Claude、Playwright 或 Puppeteer 等瀏覽器 MCP 整合,模擬真實使用者操作,並產生結構化報告。此技能支援四階段流程:煙霧測試(檢查主控台錯誤、網路狀態與 Core Web Vitals)、互動測試(驗證導覽、表單、認證流程)、視覺回歸測試(在不同響應式斷點截圖並比較基準)以及無障礙測試(執行 axe-core 並檢查 WCAG 2.2 AA 違規)。安全性是首要考量,預設為唯讀模式,僅在明確同意且使用測試憑證時才允許對暫存/預覽環境執行變更操作。此技能適合用於部署前驗證、前端 PR 審查以及持續監控。

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

在你喜歡的 AI 中提問

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

說明文件

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

使用時機

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

運作方式

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

安全第一 — 影響範圍(預設唯讀)

Browser QA 會操作真實驗證與真實使用者流程,因此需明確標示影響範圍。 預設為唯讀:絕對不要對生產環境 URL 執行變更操作(結帳、付款、刪除、大量更新)— 需明確同意且提供暫存/預覽 URL。請使用預先建立的測試憑證,切勿使用真實的生產環境登入資訊,並在儲存任何螢幕截圖前編輯掉憑證/權杖/PII。

第一階段:煙霧測試

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

第二階段:互動測試

1. 點擊每個導覽連結 — 確認沒有死連結
2. 使用有效資料送出表單 — 確認成功狀態
3. 使用無效資料送出表單 — 確認錯誤狀態
4. 測試身分驗證流程:登入 → 受保護頁面 → 登出(僅使用測試憑證,絕不使用正式環境)
5. 測試關鍵使用者流程(結帳、入職引導、搜尋)
   — 預設唯讀;僅在明確同意下方可對暫存環境執行變更操作(見上方「安全第一」)

第三階段:視覺回歸測試

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

第四階段:無障礙測試

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

注意:axe-core 約可自動涵蓋 30–40% 的 WCAG 項目。一次乾淨的執行是必要條件,非充分條件 — 鍵盤導覽、焦點順序以及螢幕閱讀器測試仍需手動檢查。請勿僅憑自動化測試通過就回報「無障礙」。

輸出格式

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

### 煙霧測試
- 主控台錯誤:0 個重大錯誤,2 個警告(分析工具雜訊)
- 網路:全部 200/304,無失敗
- Core Web Vitals:LCP 1.2s ✓、CLS 0.02 ✓、INP 89ms ✓

### 互動測試
- [✓] 導覽連結:12/12 正常運作
- [✗] 聯絡表單:無效 email 缺少錯誤狀態
- [✓] 身分驗證流程:登入/登出正常運作

### 視覺測試
- [✗] 英雄區塊在 375px 視口溢位
- [✓] 深色模式:所有頁面一致

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

### 結論:附修正出貨(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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

相關技能