Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cleanexpo avatar

Playwright Browser

  • 1 installs
  • 1 repo stars
  • Updated June 17, 2026
  • cleanexpo/unite-hub

Helps with ai & agent building tasks.

About

playwright-browser is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • playwright-browser
  • AI & Agent Building
  • AI-coding skill

Playwright Browser by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #14,098 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cleanexpo/unite-hub --skill playwright-browser

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars1
Last updatedJune 17, 2026
Repositorycleanexpo/unite-hub

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Playwright Browser Automation

Headless browser automation using Playwright CLI and MCP tools for E2E testing, UI verification, screenshots, and web scraping.

When to Apply

Positive Triggers

  • E2E test execution (test:e2e, playwright test)
  • UI screenshot capture for review or regression
  • Web scraping / content extraction
  • Form submission testing
  • Visual regression testing
  • Lighthouse / performance auditing via browser
  • Multi-page workflow validation

Negative Triggers (Do NOT Apply)

  • Unit tests (use Vitest/Pytest)
  • API-only tests (use httpx/fetch)
  • Personal browser sessions (use claude-browser skill)
  • Static code analysis

Core Principles

1. Headless by default — use --headed only when debugging 2. Screenshot at each step — capture visual evidence for review 3. Parallel sessions — leverage Playwright's built-in parallelism 4. Persistent profiles — reuse auth state across test runs 5. CI-safe — all operations must work in headless CI environments

MCP Playwright Tools

These tools are available via the mcp__playwright__* namespace:

ToolPurpose
browser_navigateNavigate to URL
browser_clickClick element by selector or text
browser_fill_formFill form fields
browser_take_screenshotCapture page screenshot
browser_snapshotGet accessibility tree snapshot
browser_evaluateExecute JavaScript in page context
browser_press_keySimulate keyboard input
browser_typeType text into focused element
browser_select_optionSelect dropdown option
browser_wait_forWait for element/condition
browser_network_requestsInspect network activity
browser_console_messagesRead console output
browser_hoverHover over element
browser_dragDrag and drop
browser_handle_dialogAccept/dismiss dialogs
browser_file_uploadUpload files
browser_tabsManage browser tabs
browser_navigate_backGo back
browser_resizeResize viewport
browser_closeClose browser
browser_installInstall browser binaries
browser_run_codeRun Playwright code snippet

Usage Pattern

1. Load tools: ToolSearch "playwright"
2. Navigate: browser_navigate to target URL
3. Interact: browser_click, browser_fill_form, browser_type
4. Capture: browser_take_screenshot at each significant step
5. Verify: browser_snapshot for accessibility tree, browser_evaluate for assertions
6. Clean up: browser_close when done

CLI Playwright Commands

# Install browsers
npx playwright install chromium

# Run all E2E tests
npx playwright test

# Run specific test file
npx playwright test tests/e2e/login.spec.ts

# Run with headed browser (debugging)
npx playwright test --headed

# Generate test from user interaction
npx playwright codegen http://localhost:3000

# Show HTML report
npx playwright show-report

# Run with specific project/browser
npx playwright test --project=chromium

Screenshot Workflow

Naming Convention

{step-number}-{description}.png

Examples: 01-login-page.png, 02-form-filled.png, 03-dashboard-loaded.png

Storage

ai-review/screenshots/     # Automated review screenshots
test-results/              # Playwright test artifacts
playwright-report/         # HTML report with traces

Capture Strategy

  • Before action: Capture initial state
  • After action: Capture result state
  • On failure: Automatic screenshot (Playwright default)
  • Full page: Use fullPage: true for long pages

Session Management

Auth State Reuse

// Save auth state after login
await page.context().storageState({ path: 'auth-state.json' });

// Reuse in subsequent tests
const context = await browser.newContext({
  storageState: 'auth-state.json'
});

Persistent Contexts

For multi-step workflows that span multiple tool calls, maintain browser context between operations. Close explicitly when done.

Parallel Execution

Playwright supports parallel test execution natively:

# Run tests in parallel (default)
npx playwright test --workers=4

# Run serially (debugging)
npx playwright test --workers=1

For MCP tool usage, open multiple browser tabs for parallel story validation.

Project Integration

FilePurpose
apps/web/playwright.config.tsPlaywright configuration
apps/web/tests/e2e/E2E test directory
apps/web/package.jsontest:e2e script

Anti-Patterns

  • Running headed browsers in CI — always use headless
  • Hardcoding selectors — prefer data-testid or accessible roles
  • Ignoring timeouts — set explicit timeouts per action
  • Skipping screenshots — always capture evidence for review
  • Using page.waitForTimeout() — prefer page.waitForSelector() or browser_wait_for

Pre-Merge Checklist

  • [ ] All E2E tests pass in headless mode
  • [ ] Screenshots captured for new UI flows
  • [ ] Auth state properly managed (no credential leaks)
  • [ ] Network requests validated (no unexpected external calls)
  • [ ] Console errors checked (no uncaught exceptions)
  • [ ] Viewport tested at standard breakpoints (mobile, tablet, desktop)

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.