Help us improve
Share bugs, ideas, or general feedback.
From web-squire
Headless browser automation using Playwright CLI. Use when you need headless browsing, parallel browser sessions, UI testing, screenshots, web scraping, or browser automation that can run in the background. Keywords - playwright, headless, browser, test, screenshot, scrape, parallel.
npx claudepluginhub cn-dataworks/web-squire-plugin --plugin web-squireHow this skill is triggered — by the user, by Claude, or both
Slash command
/web-squire:playwright-cliThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automate browsers using `playwright-cli` — a token-efficient CLI for Playwright. Runs headless by default, supports parallel sessions via named sessions (`-s=`), and doesn't load tool schemas into context.
Automates browsers via Playwright CLI shell commands: navigate pages, interact with elements (click, fill, type), capture screenshots/snapshots/PDFs, manage tabs for web testing.
Automates browsers via playwright-cli CLI commands executed through Bash. Supports navigation, interaction (click, type, fill), screenshots, PDFs, session/tabs management for E2E testing.
Automates browser tasks via Playwright CLI for AI agents: navigate pages, take snapshots/screenshots, fill forms, click elements from command line. Use with shell access.
Share bugs, ideas, or general feedback.
Automate browsers using playwright-cli — a token-efficient CLI for Playwright. Runs headless by default, supports parallel sessions via named sessions (-s=), and doesn't load tool schemas into context.
--headed to open to see the browser-s=<name> to run multiple independent browser instancesPLAYWRIGHT_MCP_CAPS=vision to receive screenshots as image responses in context instead of just saving to diskAlways use a named session. Derive a short, descriptive kebab-case name from the user's prompt. This gives each task a persistent browser profile (cookies, localStorage, history) that accumulates across calls.
# Derive session name from prompt context:
# "test the checkout flow on mystore.com" → -s=mystore-checkout
# "scrape pricing from competitor.com" → -s=competitor-pricing
# "UI test the login page" → -s=login-ui-test
playwright-cli -s=mystore-checkout open https://mystore.com --persistent
playwright-cli -s=mystore-checkout snapshot
playwright-cli -s=mystore-checkout click e12
Managing sessions:
playwright-cli list # list all sessions
playwright-cli close-all # close all sessions
playwright-cli -s=<name> close # close specific session
playwright-cli -s=<name> delete-data # wipe session profile
Core: open [url], goto <url>, click <ref>, fill <ref> <text>, type <text>, snapshot, screenshot [ref], close
Navigate: go-back, go-forward, reload
Keyboard: press <key>, keydown <key>, keyup <key>
Mouse: mousemove <x> <y>, mousedown, mouseup, mousewheel <dx> <dy>
Tabs: tab-list, tab-new [url], tab-close [index], tab-select <index>
Save: screenshot [ref], pdf, screenshot --filename=f
Storage: state-save, state-load, cookie-*, localstorage-*, sessionstorage-*
Network: route <pattern>, route-list, unroute, network
DevTools: console, run-code <code>, tracing-start/stop, video-start/stop
Sessions: -s=<name> <cmd>, list, close-all, kill-all
Config: open --headed, open --browser=chrome, resize <w> <h>
--persistent to preserve cookies/state. Always set the viewport via env var at launch:PLAYWRIGHT_MCP_VIEWPORT_SIZE=1440x900 playwright-cli -s=<session-name> open <url> --persistent
# or headed:
PLAYWRIGHT_MCP_VIEWPORT_SIZE=1440x900 playwright-cli -s=<session-name> open <url> --persistent --headed
# or with vision (screenshots returned as image responses in context):
PLAYWRIGHT_MCP_VIEWPORT_SIZE=1440x900 PLAYWRIGHT_MCP_CAPS=vision playwright-cli -s=<session-name> open <url> --persistent
playwright-cli -s=<session-name> snapshot
playwright-cli -s=<session-name> click <ref>
playwright-cli -s=<session-name> fill <ref> "text"
playwright-cli -s=<session-name> type "text"
playwright-cli -s=<session-name> press Enter
playwright-cli -s=<session-name> screenshot
playwright-cli -s=<session-name> screenshot --filename=output.png
playwright-cli -s=<session-name> close
If a playwright-cli.json exists in the working directory, use it automatically. Otherwise, skip configuration — the env var and CLI defaults are sufficient.
{
"browser": {
"browserName": "chromium",
"launchOptions": { "headless": true },
"contextOptions": { "viewport": { "width": 1440, "height": 900 } }
},
"outputDir": "./screenshots"
}
Run playwright-cli --help or playwright-cli --help <command> for detailed command usage.