Communitygithub.com

browser-qa

使用此技能通过浏览器自动化在功能部署后自动进行可视化测试和UI交互验证。

browser-qa 是什么?

Browser QA 是一个面向开发者的 AI 技能,专注于在功能部署到预发布环境后,通过浏览器自动化工具(如 claude-in-chrome、Playwright 或 Puppeteer)执行全面的 UI 交互验证和可视化回归测试。它支持包括桌面端和移动端在内的多分辨率测试,并集成 accessibility 审计功能,帮助团队在代码上线前发现布局溢出、控制台错误、网络请求失败以及可访问性问题。该技能以安全性为核心,默认采用只读模式,避免对生产环境造成数据变更风险,并建议使用测试凭据而非真实生产登录信息。最终生成结构化的 QA 报告,包含烟雾测试、交互测试、视觉回归和可访问性等模块,并给出 `SHIP / SHIP WITH FIXES / DO NOT SHIP` 的明确裁决建议。

兼容平台✓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。请使用 测试凭据,切勿使用真实生产登录信息,并在保存任何截图前 脱敏 处理凭据/令牌/个人身份信息。

阶段 1:烟雾测试

1. 导航至目标 URL
2. 检查控制台错误(过滤干扰项:分析工具、第三方脚本)
3. 确认网络请求中无 4xx/5xx 错误
4. 对桌面端和移动端视口截取首屏截图
5. 检查核心 Web 指标:LCP < 2.5 秒,CLS < 0.1,INP < 200 毫秒
   (INP 于 2024 年 3 月取代 FID;阈值依据 web.dev 定义)

阶段 2:交互测试

1. 点击每个导航链接 —— 确认无死链接
2. 使用有效数据提交表单 —— 确认成功状态
3. 使用无效数据提交表单 —— 确认错误状态
4. 测试身份验证流程:登录 → 受保护页面 → 登出(仅使用测试凭据,切勿使用生产环境)
5. 测试关键用户流程(结账、新用户引导、搜索)
   —— 默认为只读模式;仅针对预发布环境运行有副作用的流程,
     并需明确选择加入(参见上方“安全第一”)

阶段 3:视觉回归

1. 在 3 个断点(375 像素、768 像素、1440 像素)下截取关键页面截图
2. 与已提交的基线截图进行对比
   —— 若无基线,报告为“不确定”,切勿静默通过
3. 标记超过 5 像素的布局偏移、缺失元素、溢出问题
4. 如果适用,检查暗色模式

阶段 4:可访问性

1. 在每个页面上运行 axe-core 或同等工具
2. 标记 WCAG 2.2 AA 违反项(对比度、标签、焦点顺序)
3. 确认键盘导航可端到端正常工作
4. 检查屏幕阅读器标识

注意:axe-core 通常可覆盖大约 30%–40% 的 WCAG 规则。通过自动化测试是 必要条件,而非充分条件 —— 键盘导航、焦点顺序以及屏幕阅读器测试仍需人工检查。切勿仅凭自动通过就报告“可访问”。

输出格式

## QA 报告 —— [URL] —— [时间戳]

### 烟雾测试
- 控制台错误:0 个严重错误,2 个警告(分析工具干扰)
- 网络请求:全部为 200/304,无失败
- 核心 Web 指标:LCP 1.2 秒 ✓,CLS 0.02 ✓,INP 89 毫秒 ✓

### 交互测试
- [✓] 导航链接:12/12 正常
- [✗] 联系表单:无无效电子邮件时的错误状态
- [✓] 身份验证流程:登录/登出正常

### 可视化
- [✗] 英雄区域在 375 像素视口下溢出
- [✓] 暗色模式:所有页面一致

### 可访问性
- 2 项 AA 违反:英雄图片缺少替代文本,页脚链接对比度低

### 裁决:附带修复上线(2 个问题,0 个阻塞项)
# 裁决 ∈ 上线 / 附带修复上线 / 不可上线;若无视觉基线则使用“不确定”

集成

适用于任何浏览器 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.

相关技能