playwright-cli
Skill20 starsChanged 3 months agoMITView on GitHub
Use when a task needs Playwright-backed browser automation from the shell: open or attach to browser sessions, inspect snapshots and element refs, click/type/fill forms, debug Playwright tests, inspect console/network/storage, run Playwright snippets, capture screenshots/traces/videos, or generate reliable test code. Prefer for repeatable browser workflows and Playwright test work; not for static HTTP fetches, JSON APIs, or simple web search.
180 other projects use a version of this.
Adopted by
Most recently taken up by
- idavidov13/agentic-playwrighttheir own version, first seen Nov 8, 2026
- kurofune/claudittheir own version, first seen Nov 8, 2026
- naman10parikh/pennytheir own version, first seen Nov 8, 2026
- n1kben/agentstheir own version, first seen Nov 8, 2026
- Today-Weekly-Release-Company/codex-inittheir own version, first seen Nov 8, 2026
- taixuann/development-spacetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use fabric-sdk, ecosystem-reference 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.
MicrosoftSkillfabric-sdk
How to use @microsoft/fabric-app-data to connect web applications to Fabric data sources at runtime. Build browser-based apps that query semantic models via DAX using the FabricClient API.
Also in 9 projects that use this
naman10parikhSkillecosystem-reference
Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.
Also in 5 projects that use this
naman10parikhSkillfractal-delegation
Also in 5 projects that use this
MicrosoftSkillschema-discovery
Explore Power BI semantic model schemas using DAX INFO functions. Progressive metadata discovery strategy, scope estimation, and narrowing techniques for tables, columns, measures, and relationships.
Also in 9 projects that use this
- +6 more from naman10parikh
- +2 more from microsoft
Other versions180 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 180
- microsoft/playwright★ 100ksame name
- coleam00/Archon★ 24ksame name
- microsoft/playwright-cli★ 15ksame name
- dotnet/eShop★ 11ksame name
- TypeCellOS/BlockNote★ 10ksame name
- sanity-io/sanity★ 6.4ksame name
- github/gh-aw★ 5.6ksame name
- zebbern/claude-code-guide★ 4.7ksame name
- pwndoc/pwndoc★ 2.9ksame name
- jdecked/twemoji★ 1.9ksame name
170 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 repository5 other files it gives its agents.
- agentic-searchSkill
- chrome-devtools-cliSkill
- html-to-markdownSkill
- nodriver-browserSkill
- playwright-skillSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 161 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Use refs from the latest snapshot by default.
- Very specific: line 26
Use --raw when piping values into other tools.
- Very specific: line 27
Use named sessions with -s=<name> for concurrent or long-lived work.
- Very specific: line 28
Use open --persistent only when disk-persisted cookies/storage are needed.
- Very specific: line 29
Prefer attach --cdp=chrome, attach --cdp=msedge, or attach --cdp=http://127.0.0.1:9222 when the task needs an existing browser/session.
- Distinctive: line 50
When a Playwright test fails, prefer the CLI debug workflow:
- Distinctive: line 58
Keep the test process running while inspecting the paused page.
“Common” is measured: kept by at least 6 in 10 of the 161 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
playwright-cli
playwright-cli is a token-efficient shell interface to Playwright. It keeps browser state across commands, exposes page snapshots with stable element refs such as e15, and prints the Playwright code it ran so the interaction can be converted into tests.
Core Workflow
playwright-cli open https://example.com
playwright-cli snapshot
playwright-cli click e15
playwright-cli fill e5 "user@example.com"
playwright-cli press Enter
playwright-cli closeUse refs from the latest snapshot by default. Re-run snapshot after navigation, major DOM changes, or a failed ref action. Use CSS selectors or Playwright locators only when refs are unavailable or unstable.
Operating Rules
- Discover exact syntax with
playwright-cli --helpandplaywright-cli <command> --help; the CLI changes quickly. - Use
--rawwhen piping values into other tools. Use--jsononly if the installed CLI advertises it. - Use named sessions with
-s=<name>for concurrent or long-lived work. - Use
open --persistentonly when disk-persisted cookies/storage are needed. - Prefer
attach --cdp=chrome,attach --cdp=msedge, orattach --cdp=http://127.0.0.1:9222when the task needs an existing browser/session. - Close sessions when finished. Reserve
close-allandkill-allfor cleanup of stale sessions.
Common Tasks
playwright-cli open https://example.com --browser=chrome
playwright-cli snapshot --depth=4
playwright-cli screenshot --filename=page.png
playwright-cli console warning
playwright-cli requests --filter="/api/.*"
playwright-cli request-headers 3
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli tracing-start
playwright-cli tracing-stopFor a broader command map, read references/cli-reference.md.
Playwright Test Debugging
When a Playwright test fails, prefer the CLI debug workflow:
PLAYWRIGHT_HTML_OPEN=never npx playwright test --debug=cli
# wait for "Debugging Instructions", then attach to the printed session
playwright-cli attach tw-abcdefKeep the test process running while inspecting the paused page. Use snapshots, console/network inspection, and generated Playwright code to identify the fix.
References
Load only what the task needs:
references/cli-reference.md— command groups, output modes, and version-sensitive featuresreferences/playwright-tests.md— running and debugging Playwright testsreferences/request-mocking.md— route mocking and request interceptionreferences/running-code.md— custom Playwright snippets withrun-codereferences/session-management.md— named sessions and cleanupreferences/storage-state.md— cookies, localStorage, sessionStorage, auth statereferences/test-generation.md— turning CLI output into testsreferences/tracing.md— trace capture and inspectionreferences/video-recording.md— WebM recording and chapter markersreferences/element-attributes.md— inspect IDs/classes/data attributes not shown in snapshots
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.

