playwright-cli
Skill9 starsChanged 3 months agoMITView on GitHub
Use when automating browser interactions, E2E tests, web scraping, snapshotting, request mocking, or Playwright test generation/debug. Triggers on "open browser", "click button", "fill form", "take screenshot", "run playwright test", "playwright-cli", "@playwright/cli", or tasks needing persistent browser sessions.
- Installs packages
88 other projects use a version of this, 73 of them edited.
Adopted by
Most recently taken up by
- thunderstormwang/AgentSkillsedited, first seen Oct 5, 2026
- kurofune/clauditedited, first seen Oct 5, 2026
- zz-zhi54/skillsedited, first seen Oct 5, 2026
- magicpro97/vibeflowedited, first seen Oct 4, 2026
- laidrivm/skillsedited, first seen Oct 3, 2026
- weisser-dev/agentic-skillstheir own version, first seen Oct 3, 2026
Used with
Projects with it also use playwright-ci, playwright-migration and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zebbernSkillplaywright-ci
Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.
Also in 3 projects that use this
zebbernSkillplaywright-migration
Step-by-step migration guides for moving to Playwright from Cypress or Selenium/WebDriver — command mappings, architecture changes, and incremental adoption strategies.
Also in 3 projects that use this
MicrosoftSkillaspire
Orchestrates Aspire distributed applications using the Aspire CLI for running, debugging, and managing distributed apps. USE FOR: aspire start, aspire stop, start aspire app, aspire describe, list aspire integrations, debug aspire issues, view aspire logs, add aspire resource, aspire dashboard, update aspire apphost. DO NOT USE FOR: non-Aspire .NET apps (use dotnet CLI), container-only deployments (use docker/podman), Azure deployment after local testing (use azure-deploy skill). INVOKES: Aspire CLI commands (aspire start, aspire describe, aspire otel logs, aspire docs search, aspire add), bash. FOR SINGLE OPERATIONS: Use Aspire CLI commands directly for quick resource status or doc lookups.
Also in 3 projects that use this
CommandCodeAISkillplaywright-skill
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.
Also in 4 projects that use this
rogue-dev-studioSkillgithub-cli
GitHub CLI authentication and workflow configuration. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `github-cli` work when listed in TEAM.yaml or explicitly requested.
Also in 3 projects that use this
OpenAISkillimage-to-code
Implement a selected image, screenshot, mockup, or Image Gen reference as a faithful, responsive frontend.
Also in 5 projects that use this
- +1 more from zebbern
Other versions88 projects use a version of this.
Word for word · 0
None found.
Edited · 73
- microsoft/playwright★ 97k11% same
- coleam00/Archon★ 24k14% same
- microsoft/playwright-cli★ 14k11% same
- github/gh-aw★ 5.3k14% same
- K9i-0/ccpocket★ 1.1k13% same
- kdlbs/kandev★ 89914% same
- ktnyt/cclsp★ 67513% same
- kovrichard/catalyst★ 46913% same
- syahiidkamil/Software-Engineer-AI-Agent-Atlas★ 39714% same
- virtengine/bosun★ 28514% same
63 more not listed
Wrote their own version · 15
- zebbern/claude-code-guide★ 4.6ksame name
- testdino-hq/playwright-skill★ 383same name
- mizchi/skills★ 349same name
- appautomaton/webmaton★ 20same name
- ulises-jeremias/agent-toolkit★ 18same name
- gandazgul/dotopencode★ 14same name
- naman10parikh/agentgrid★ 9same name
- IvanCampos/agents★ 5same name
- benjaminwestern/google-engineer-skills★ 4same name
- hideki5123/agent-skill-set★ 2same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- agentmemory-agentsSkill
- agentmemory-architectureSkill
- agentmemory-configSkill
- agentmemory-hooksSkill
- agentmemory-mcp-toolsSkill
- agentmemory-rest-apiSkill
- agentmemorySkill
- antislopSkill
- caveman-compressSkill
- caveman-helpSkill
- cavemanSkill
- caveman-statsSkill
- clean-codeSkill
- cloudflareSkill
- codebase-designSkill
- code-reviewSkill
- commit-contextSkill
- commit-historySkill
- delegationSkill
- documentationSkill
- forgetSkill
- git-commitSkill
- graphifySkill
- grillingSkill
- handoff-compactSkill
- handoffSkill
- i-have-adhdSkill
- impeccableSkill
- jev-decisionSkill
- lessonSkill
- memory-disciplineSkill
- plansSkill
- ponytail-reviewSkill
- pwa-developmentSkill
- recallSkill
- recapSkill
- rememberSkill
- resolving-merge-conflictsSkill
- session-historySkill
- shadcnSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- ui-designSkill
- ui-ux-pro-maxSkill
- vercel-reactSkill
- verification-before-completionSkill
- viteSkill
- vitestSkill
- web-design-guidelinesSkill
- web-perfSkill
- write-agentmemory-skillSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 78 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 128
After each command, playwright-cli prints a snapshot of current state:
- Very specific: line 139
Use refs from snapshot (e1, e2, ...) to target elements.
- Very specific: line 261
If global is not in PATH, use local: npx --no-install playwright --version.
“Common” is measured: kept by at least 6 in 10 of the 78 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Browser Automation with playwright-cli
Token-efficient CLI for Playwright. Use when automation load is high (many page reads, big snapshots) and MCP tool schemas eat too much context. For small ad-hoc inspects, prefer chrome-devtools MCP.
Invoke via bash tool. Example: playwright-cli open https://example.com. Opencode runs these directly; the model never sees a heavy MCP tool schema for the browser.
Quick start
playwright-cli open # new browser
playwright-cli open https://example.com # open + navigate
playwright-cli goto https://playwright.dev
playwright-cli snapshot # get refs (e1, e2, ...)
playwright-cli click e15
playwright-cli type "page.click"
playwright-cli press Enter
playwright-cli screenshot # rarely needed; snapshot > screenshot
playwright-cli closeCore commands
playwright-cli open [url] # open browser, optionally navigate
playwright-cli goto <url> # navigate
playwright-cli snapshot # a11y tree with element refs
playwright-cli snapshot e5 # snapshot a specific element
playwright-cli snapshot --depth=4 # limit depth
playwright-cli snapshot --boxes # include bounding boxes
playwright-cli find "Sign in" # search snapshot (returns matching nodes + context)
playwright-cli find --regex "Sign (in|up)"
playwright-cli find --regex "/sign (in|up)/i" # slashes = flags
playwright-cli click <ref> [button] # click (default left)
playwright-cli dblclick <ref> [button]
playwright-cli hover <ref>
playwright-cli type <text> # type into focused element
playwright-cli fill <ref> <text> # fill input
playwright-cli fill <ref> <text> --submit # fill + press Enter
playwright-cli press <key> # Enter, ArrowDown, a, Control+A, ...
playwright-cli keydown <key> / keyup <key>
playwright-cli select <ref> <value> # dropdown
playwright-cli check <ref> / uncheck <ref>
playwright-cli drag <fromRef> <toRef>
playwright-cli drop <ref> --path=./file.png # drop file from outside page
playwright-cli drop <ref> --data="text/plain=hello"
playwright-cli upload <file...>
playwright-cli eval "document.title" # JS on page
playwright-cli eval "el => el.textContent" e5 # JS on element
playwright-cli dialog-accept [prompt] / dialog-dismiss
playwright-cli resize <w> <h>
playwright-cli close
playwright-cli go-back / go-forward / reload
playwright-cli mousemove <x> <y>
playwright-cli mousedown [button] / mouseup [button]
playwright-cli mousewheel <dx> <dy>
playwright-cli screenshot [ref] [--filename=f.png] [--hires]
playwright-cli pdf [--filename=page.pdf]
playwright-cli tab-list / tab-new [url] / tab-close [idx] / tab-select <idx>Storage
playwright-cli state-save [file] / state-load <file>
playwright-cli cookie-list [--domain=...] [--path=...]
playwright-cli cookie-get <name>
playwright-cli cookie-set <name> <val> [--domain=...] [--httpOnly] [--secure] [--sameSite=Lax] [--expires=unix]
playwright-cli cookie-delete <name>
playwright-cli cookie-clear
playwright-cli localstorage-list / get <k> / set <k> <v> / delete <k> / clear
playwright-cli sessionstorage-list / get <k> / set <k> <v> / delete <k> / clearNetwork
playwright-cli route "<pattern>" [--status=N] [--body=...] [--content-type=...] [--header="K: V"] [--remove-header=h1,h2]
playwright-cli route-list
playwright-cli unroute [<pattern>] # no arg = remove allPatterns: **/*.jpg, **/api/*/details, **/*.{png,jpg}, **/search?q=*.
DevTools
playwright-cli console [level] # level: error|warning|info|debug
playwright-cli requests / request <idx>
playwright-cli run-code "async page => { ... }" # arbitrary Playwright code
playwright-cli run-code --filename=./script.js
playwright-cli tracing-start / tracing-stop
playwright-cli video-start [file.webm]
playwright-cli video-chapter "<title>" [--description=...] [--duration=ms]
playwright-cli video-show-actions [--duration=ms] [--position=top-right]
playwright-cli video-hide-actions
playwright-cli video-stop
playwright-cli show [--annotate] # open visual dashboard
playwright-cli generate-locator <ref> [--raw]
playwright-cli highlight <ref> [--style="outline: 3px dashed red"] [--hide]Open parameters
playwright-cli open --browser=chrome|firefox|webkit|msedge
playwright-cli open --mobile # generic mobile (lighter snapshots)
playwright-cli open --device="iPhone 15"
playwright-cli open --persistent # profile persisted to disk
playwright-cli open --profile=/path/to/profile
playwright-cli open --headed
playwright-cli open --config=./.playwright/cli.config.json
playwright-cli attach --extension=chrome # Playwright extension
playwright-cli attach --cdp=chrome|msedge # running browser by channel
playwright-cli attach --cdp=http://localhost:9222 # CDP endpoint
playwright-cli detach # leave external browser running
playwright-cli delete-data # wipe default session dataSnapshots and refs
After each command, playwright-cli prints a snapshot of current state:
> playwright-cli goto https://example.com
### Page
- Page URL: https://example.com/
- Page Title: Example Domain
### Snapshot
[Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml)Use refs from snapshot (e1, e2, ...) to target elements. CSS selectors and Playwright locators also work:
playwright-cli click "#main > button.submit"
playwright-cli click "getByRole('button', { name: 'Submit' })"
playwright-cli click "getByTestId('submit-button')"Sessions (concurrent, isolated)
playwright-cli -s=auth open https://app.example.com/login
playwright-cli -s=public open https://example.com
playwright-cli -s=auth fill e1 "user@example.com"
playwright-cli -s=public snapshot
playwright-cli list # list all sessions
playwright-cli close # stop default
playwright-cli -s=auth close # stop named
playwright-cli close-all
playwright-cli kill-all # force-kill zombies
playwright-cli -s=auth delete-data # wipe session profile
export PLAYWRIGHT_CLI_SESSION=mysession # default session via envRaw output
--raw strips page status / generated code / snapshot sections; returns just the result. Use to pipe into other tools.
playwright-cli --raw eval "JSON.stringify(performance.timing)" | jq '.loadEventEnd - .navigationStart'
playwright-cli --raw snapshot > before.yml
playwright-cli click e5
playwright-cli --raw snapshot > after.yml
diff before.yml after.yml
TOKEN=$(playwright-cli --raw cookie-get session_id)--json wraps every reply as JSON: playwright-cli list --json.
Windows & gotcha
cmd.exe and PowerShell treat & as command separator → URL with multiple query params gets truncated.
playwright-cli goto "https://example.com/?a=1^&b=2"playwright-cli --% goto "https://example.com/?a=1&b=2"MCP choice (opencode)
| Need | Use |
| Many page reads, big snapshots, low context budget | playwright-cli via bash (this skill) |
| Quick live inspect / debug / Lighthouse / perf trace | chrome-devtools MCP |
| Cheap file-based screenshot/DOM peek | chrome-devtools MCP |
Reference docs (load on demand)
| Topic | File |
| Run/debug Playwright tests | references/playwright-tests.md |
| Request mocking (route, run-code patterns) | references/request-mocking.md |
Arbitrary Playwright code via run-code | references/running-code.md |
| Concurrent browser sessions, attach, persistent | references/session-management.md |
| Cookies, localStorage, sessionStorage, storage state | references/storage-state.md |
| Test generation (plan / generate / heal) | references/test-generation.md |
Tracing (.trace files, DOM snapshots) | references/tracing.md |
| Video recording + overlay/chapter API | references/video-recording.md |
| Inspect hidden element attributes (id, class, data-*) | references/element-attributes.md |
Examples
Form submit:
playwright-cli open https://example.com/form
playwright-cli snapshot
playwright-cli fill e1 "user@example.com"
playwright-cli fill e2 "password123"
playwright-cli click e3
playwright-cli snapshot
playwright-cli closeMulti-tab:
playwright-cli open https://example.com
playwright-cli tab-new https://example.com/other
playwright-cli tab-list
playwright-cli tab-select 0
playwright-cli closeDevTools debug:
playwright-cli open https://example.com
playwright-cli click e4
playwright-cli fill e7 "test"
playwright-cli console
playwright-cli requests
playwright-cli closeInteractive UI review (user annotates page):
playwright-cli open https://example.com
playwright-cli show --annotateInstall (already done globally; kept for reference)
npm install -g @playwright/cli@latest
playwright-cli --helpIf global is not in PATH, use local: npx --no-install playwright --version. Otherwise the global install above is required.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

