PL

playwright-mcp-ui-testing

Enables agentic UI testing and assertions without manually coding test scripts.

Install

mkdir -p .claude/skills/playwright-mcp-ui-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15141" && unzip -o skill.zip -d .claude/skills/playwright-mcp-ui-testing && rm skill.zip

Installs to .claude/skills/playwright-mcp-ui-testing

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

AI-driven browser UI testing using the Playwright MCP server. Guides the sqa-engineer to perform autonomous browser interactions, assertions, and evidence capture through the Playwright MCP tools. Use ONLY when the change involves UI or frontend components.
257 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Design UI test cases based on user flows
  • Execute test cases using Playwright MCP tools
  • Navigate to URLs and interact with UI elements
  • Capture accessibility tree snapshots for assertions
  • Take screenshots as evidence
  • Produce structured test reports

How it works

The skill guides the SQA engineer to design test cases and then execute them using Playwright MCP tools, following a Snapshot-Act-Snapshot pattern for interactions and capturing evidence.

Inputs & outputs

You give it
UI/frontend component changes, user flows, acceptance criteria
You get back
structured UI test report with pass/fail status and evidence

When to use playwright-mcp-ui-testing

  • Verify UI component behavior
  • Run smoke tests on frontend changes
  • Validate user flow interaction

About this skill

playwright-mcp-ui-testing

This skill guides the sqa-engineer agent to perform AI-driven UI tests using the Playwright MCP server (@playwright/mcp). The agent uses MCP browser tools to navigate, interact, observe, and assert UI behavior autonomously — without writing coded test files. This skill is ONLY invoked when the software change involves UI or frontend components.


Prerequisites

Before invoking this skill:

  1. Confirm the change is UI/frontend-related. If not, skip this skill entirely.
  2. The Playwright MCP server is already available via the docker MCP gateway (configured in .mcp.json). No additional setup is required — all browser tools are available with the mcp__docker-mcp-gateway__ prefix.
  3. Ensure the application is running (start via dotnet run or via the Aspire AppHost in samples/AppHost).
  4. Discover the service URL (check Aspire dashboard at http://localhost:15888 or use the configured launchUrl).

Phase 0 — Context Load (silent)

  1. Read CLAUDE.md to understand the component under test.
  2. Read the spec file at docs/specs/<feature-slug>.spec.md if it exists.
  3. Load persistent memory: Skill("manage-memory", args: "sqa-engineer").
  4. Identify which UI routes/components were changed by the software-engineer.

Phase 1 — Test Case Design

Design UI test cases based on user flows and acceptance criteria before interacting with the browser. For each test case specify:

  • Scenario name (maps to an AC ID if available, e.g., [AC-2] Submit form with valid data)
  • Starting URL
  • Steps (navigation, interactions, form inputs)
  • Expected outcome (element visible, text present, URL changed, etc.)
  • Evidence (screenshot filename)

Phase 2 — AI-Driven Browser Execution

Execute each test case using the Playwright MCP tools. Follow the SAA pattern (Snapshot → Act → Snapshot) for every interaction:

Core Tool Reference

All browser tools are invoked via the docker MCP gateway. Use the exact tool names below:

ToolPurpose
mcp__docker-mcp-gateway__browser_navigateNavigate to a URL
mcp__docker-mcp-gateway__browser_snapshotCapture accessibility tree — use this for all assertions
mcp__docker-mcp-gateway__browser_take_screenshotCapture screenshot as evidence
mcp__docker-mcp-gateway__browser_clickClick an element by ARIA ref
mcp__docker-mcp-gateway__browser_typeType into a focused element
mcp__docker-mcp-gateway__browser_fill_formFill a form field
mcp__docker-mcp-gateway__browser_press_keyPress keyboard key (Enter, Tab, Escape, etc.)
mcp__docker-mcp-gateway__browser_select_optionSelect a dropdown option
mcp__docker-mcp-gateway__browser_wait_forWait for element/condition
mcp__docker-mcp-gateway__browser_console_messagesRetrieve browser console log
mcp__docker-mcp-gateway__browser_network_requestsList intercepted network requests
mcp__docker-mcp-gateway__browser_hoverHover over an element
mcp__docker-mcp-gateway__browser_drag / mcp__docker-mcp-gateway__browser_dropDrag and drop
mcp__docker-mcp-gateway__browser_handle_dialogHandle JS alert/confirm/prompt dialogs
mcp__docker-mcp-gateway__browser_evalExecute JavaScript (escape hatch — requires justification)
mcp__docker-mcp-gateway__browser_tabsList open browser tabs
mcp__docker-mcp-gateway__browser_resizeResize the browser window
mcp__docker-mcp-gateway__browser_navigate_backNavigate back
mcp__docker-mcp-gateway__browser_network_requestInspect a specific network request

SAA Pattern (Mandatory for every interaction)

Step 1: mcp__docker-mcp-gateway__browser_snapshot          → read current state, identify ARIA refs
Step 2: mcp__docker-mcp-gateway__browser_click / browser_type / browser_fill_form   → perform the interaction
Step 3: mcp__docker-mcp-gateway__browser_snapshot          → verify state changed as expected

Never skip the post-action snapshot — it is the assertion.

Evidence Capture

After each test case (pass or fail), capture a screenshot:

Tool: mcp__docker-mcp-gateway__browser_take_screenshot

Also capture console errors:

Tool: mcp__docker-mcp-gateway__browser_console_messages

Treat any [error] level entries as implicit test failures.


Phase 3 — Test Report

Produce a structured test report:

## AI-Driven UI Test Report

### Application: <app name and URL>
### Date: <ISO date>

| Scenario | AC ID | Steps | Result | Evidence |
|----------|-------|-------|--------|----------|
| Submit valid form | AC-2 | 3 | ✅ PASS | screenshots/submit-valid-pass.png |
| Submit empty form | AC-3 | 2 | ❌ FAIL | screenshots/submit-empty-fail.png |

### Console Errors Found
- [None] / [list any errors]

### Network Errors Found
- [None] / [list any 4xx/5xx responses]

### Summary: N passed, M failed

Rules and Constraints

  • Snapshot mode is preferred over vision mode — cheaper, faster, no vision model required.
  • Never use mcp__docker-mcp-gateway__browser_eval as a shortcut to set state directly. Use actual UI flows. Document any unavoidable use in the test report.
  • Flaky timing: always use browser_wait_for after navigation/form submission — never assume instant rendering.
  • ARIA anchoring: if UI elements lack proper ARIA labels/roles, surface it as a bug to the software-engineer and request semantic markup fixes before retesting.
  • Screenshots are mandatory evidence — never submit a test report without screenshot files.
  • This skill produces a report, not test code. The write-tests skill produces .cs test files. This skill produces browser interaction results and a markdown report.

Escape Hatches (Require Justification in Report)

  • mcp__docker-mcp-gateway__browser_eval / mcp__docker-mcp-gateway__browser_run_code_unsafe: only when no combination of interaction tools can achieve the required state.
  • If visual/CSS rendering testing is needed, capture multiple screenshots with mcp__docker-mcp-gateway__browser_take_screenshot at different viewports using mcp__docker-mcp-gateway__browser_resize.

When not to use it

  • The change does not involve UI or frontend components

Prerequisites

Playwright MCP server available via docker MCP gatewayApplication is runningService URL is discovered

Limitations

  • The skill is only invoked when the change involves UI or frontend components
  • It prefers snapshot mode over vision mode
  • It does not produce test code, only a report

How it compares

This skill enables AI-driven UI testing without writing coded test files, using autonomous browser interactions and assertions, which differs from traditional manual or script-based UI testing.

Compared to similar skills

playwright-mcp-ui-testing side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
playwright-mcp-ui-testing (this skill)03moNo flagsIntermediate
webapp-testing3533moReviewIntermediate
ui-ux-expert-skill919moReviewAdvanced
accessibility425moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

webapp-testing

anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

353585

ui-ux-expert-skill

fercracix33

Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.

91244

accessibility

tech-leads-club

Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

42174

playwright-browser-automation

lackeyjb

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.

29146

svelte-expert

Raudbjorn

Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.

11107

browser-daemon

noiv

Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.

587

Search skills

Search the agent skills registry