playwriter

playwriter

Controls Chrome browser via Playwright MCP for web automation, testing, screenshots, and scraping. Use when explicitly asked to "use playwriter".

0
0포크
업데이트됨 1/24/2026
SKILL.md
readonlyread-only
name
playwriter
description

Controls Chrome browser via Playwright MCP for web automation, testing, screenshots, and scraping. Use when explicitly asked to "use playwriter".

Playwriter

Browser automation via MCP. Requires Chrome extension installed and clicked on target tab.

Tools

execute

Run Playwright code with access to page, context, state (persistent), and utility functions.

// Single-line format with semicolons
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });

reset

Reset CDP connection when errors occur or pages show as about:blank.

Core Patterns

Check Page State (do this after actions)

console.log('url:', page.url()); console.log(await accessibilitySnapshot({ page }).then(x => x.split('\n').slice(0, 30).join('\n')));

Click Elements (use aria-ref from snapshot)

await page.locator('aria-ref=e13').click();

Fill Input

await page.locator('input[name="email"]').fill('test@example.com');

Screenshot

await page.screenshot({ path: 'shot.png', scale: 'css' });

Visual Screenshot with Labels

await screenshotWithAccessibilityLabels({ page });

Utility Functions

Function Purpose
accessibilitySnapshot({ page, search? }) Get structured text of interactive elements
screenshotWithAccessibilityLabels({ page }) Screenshot with Vimium-style element labels
getCleanHTML({ locator }) Get cleaned semantic HTML
getLatestLogs({ page?, count?, search? }) Retrieve browser console logs
waitForPageLoad({ page }) Smart load detection
getCDPSession({ page }) Send raw CDP commands

Rules

  • Multiple calls: Break complex logic into separate execute calls
  • Never close: Don't call browser.close() or context.close()
  • No bringToFront: Never call unless user asks
  • Always verify: Check page state after clicks/navigation
  • Persist data: Use state.myVar = value across calls

You Might Also Like

Related Skills

mcporter

mcporter

179Kdev-mcp

Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.

openclaw avataropenclaw
받기
model-usage

model-usage

88Kdev-mcp

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

moltbot avatarmoltbot
받기

Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.

affaan-m avataraffaan-m
받기

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

davila7 avatardavila7
받기

Claude Code 高级开发指南 - 全面的中文教程,涵盖工具使用、REPL 环境、开发工作流、MCP 集成、高级模式和最佳实践。适合学习 Claude Code 的高级功能和开发技巧。

2025Emma avatar2025Emma
받기

This skill should be used when the user asks to "offload context to files", "implement dynamic context discovery", "use filesystem for agent memory", "reduce context window bloat", or mentions file-based context management, tool output persistence, agent scratch pads, or just-in-time context loading.

muratcankoylan avatarmuratcankoylan
받기