/playwright:playwright-clifrom playwright
Automates browser tasks via Playwright CLI: navigate pages, click elements, fill forms, take screenshots, and run e2e tests from shell commands.
Ships in playwright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Automate browsers through shell commands via the Bash tool.
Every interaction follows this pattern:
playwright-cli open <url>playwright-cli snapshotplaywright-cli click <ref>playwright-cli screenshot or playwright-cli snapshotAlways run snapshot before interacting — element refs come exclusively from
snapshot output and become stale after navigation.
| Command | Description |
|---|---|
open <url> | Open URL in new page |
goto <url> | Navigate current page |
go-back / go-forward | Browser back/forward |
reload | Reload current page |
close | Close the browser |
| Command | Description |
|---|---|
click <ref> | Click an element |
dblclick <ref> | Double-click an element |
fill <ref> <text> | Clear field, then type text |
type <text> | Type into focused element (appends) |
check <ref> / uncheck <ref> | Toggle checkbox |
select <ref> <values> | Select dropdown option(s) |
hover <ref> | Hover over element |
drag <start> <end> | Drag between elements |
upload <ref> <paths> | Upload file(s) to file input |
eval "<js>" | Evaluate JavaScript on page |
eval "<js>" <ref> | Evaluate JavaScript on element |
dialog-accept [text] | Accept dialog (optional prompt text) |
dialog-dismiss | Dismiss dialog |
resize <w> <h> | Resize browser window |
| Command | Description |
|---|---|
screenshot [ref] [--filename=f] | Capture PNG screenshot (page or element) |
snapshot [--filename=f] | Accessibility tree — structured, token-efficient |
pdf [--filename=f] | Generate PDF of the page |
Important:
--filenameresolves relative to the working directory, NOToutputDir. When using--filename, always prepend the project'soutputDirvalue (check.playwright/cli.config.json; defaults to.playwright-cli). Example:playwright-cli screenshot --filename=<outputDir>/my-screenshot.png
| Command | Description |
|---|---|
tab list | List open tabs |
tab create [url] | Open new tab |
tab select <index> | Switch to tab |
tab close [index] | Close tab |
playwright-cli press Enter # Enter, Tab, Escape, ArrowDown, etc.
playwright-cli keydown Shift # Hold key down
playwright-cli keyup Shift # Release key
playwright-cli mousemove 150 300 # Move to coordinates
playwright-cli mousedown [button] # Press button (left/right)
playwright-cli mouseup [button] # Release button
playwright-cli mousewheel 0 100 # Scroll (deltaX deltaY)
playwright-cli -s=<name> open <url> for parallel browsersplaywright-cli listplaywright-cli -s=<name> closeplaywright-cli close-allplaywright-cli kill-allplaywright-cli open <url> --persistentplaywright-cli open <url> --profile=/path/to/dirplaywright-cli delete-data or playwright-cli -s=<name> delete-dataPLAYWRIGHT_CLI_SESSION=my-projectplaywright-cli open <url> --browser=chromium # chromium (default), firefox, webkit, chrome, msedge
playwright-cli open <url> --headed # Visible browser window
playwright-cli open <url> --config=config.json # Custom config file
playwright-cli open <url> --extension # Connect via browser extension
Create .playwright/cli.config.json in the project for persistent settings:
{ "browser": { "browserName": "chromium", "launchOptions": { "headless": true } }, "outputDir": ".playwright-cli", "timeouts": { "action": 5000, "navigation": 60000 } }
Other options: network.allowedOrigins, network.blockedOrigins, saveVideo.
Environment variables use PLAYWRIGHT_MCP_ prefix (e.g., PLAYWRIGHT_MCP_BROWSER=firefox).
snapshot runssnapshot after goto, link clicks, or form submissionsfill clears the field first; type appends to current contentplaywright-cli kill-all to force-close all browsersrun-codeEXAMPLES.md (opens in a new tab)TROUBLESHOOTING.md (opens in a new tab)references/request-mocking.md (opens in a new tab)references/running-code.md (opens in a new tab)references/session-management.md (opens in a new tab)references/storage-state.md (opens in a new tab)references/test-generation.md (opens in a new tab)references/tracing.md (opens in a new tab)references/video-recording.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub joaquimscosta/arkhe-claude-plugins --plugin playwrightOther plugins' skills for the same job