Communitygithub.com

browser-qa

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

browser-qa 是什么?

Browser QA 技能用于自动化视觉测试和 UI 交互验证,特别适合在功能部署到预发布环境后、上线前或审查前端代码时使用。它通过浏览器自动化 MCP(如 claude-in-chrome、Playwright 或 Puppeteer)模拟真实用户行为,对页面进行四大阶段的全面检查:冒烟测试(检查控制台错误、网络请求、核心 Web 指标)、交互测试(验证导航、表单提交、认证流程)、视觉回归(多断点截图比较)和可访问性审计(运行 axe-core 等工具)。该技能强调安全第一,默认只读模式,仅在明确选择且使用测试凭据的情况下才允许对预发布 URL 执行变更性操作。输出格式为结构化 QA 报告,包含每个阶段的详细结果和最终判断(SHIP / SHIP WITH FIXES / DO NOT SHIP),并与多种浏览器 MCP 集成,还可配合 `/canary-watch` 实现部署后监控。

兼容平台✓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. 检查核心 Web 指标:LCP < 2.5s,CLS < 0.1,INP < 200ms
   (INP 于 2024 年 3 月取代 FID;阈值依据 web.dev)

阶段 2:交互测试

1. 点击每个导航链接——确认没有死链接
2. 用有效数据提交表单——确认成功状态
3. 用无效数据提交表单——确认错误状态
4. 测试认证流程:登录 → 受保护页面 → 退出(仅使用测试凭据,绝不使用生产凭据)
5. 测试关键用户旅程(下单、引导流程、搜索)
   ——默认只读;仅对预发布 URL 执行变更性旅程
     且需明确选择(见上文“安全第一”)

阶段 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,无失败
- 核心 Web 指标:LCP 1.2s ✓,CLS 0.02 ✓,INP 89ms ✓

### 交互测试
- [✓] 导航链接:12/12 正常
- [✗] 联系表单:无效邮箱缺失错误状态
- [✓] 认证流程:登录/退出正常

### 视觉
- [✗] 英雄区域在 375px 视口溢出
- [✓] 深色模式:所有页面一致

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

### 判定:SHIP WITH FIXES(2 个问题,0 个阻塞项)
# 判定 ∈ SHIP / SHIP WITH FIXES / DO NOT SHIP;若无视觉基线则使用 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.

相关技能