playwright-cli
Skill5 starsChanged 9 months agoMITView on GitHub
Translate natural-language browser automation requests into exact `playwright-cli` commands for interactive web testing and debugging. Use when requests involve opening/navigating pages, interacting with elements, capturing snapshots/screenshots/PDFs, using tabs, inspecting console/network, mocking routes, managing cookies/storage/state, configuring browser sessions, or controlling named Playwright CLI sessions.
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 repository13 other files it gives its agents.
- apple-music-playerSkill
- apple-notesSkill
- applescript-open-appSkill
- confettiSkill
- ffmpeg-video-editor-h265Skill
- githubSkill
- git-searchSkill
- launchd-non-apple-jobsSkill
- mailapp-send-emailSkill
- open-meteo-weatherSkill
- opml-readerSkill
- saySkill
- screen-recorderSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 9 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 161 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use playwright-cli directly (already installed) to execute browser automation from natural-language requests.
- Distinctive: line 12
Verify the CLI is available:
- Very specific: line 29
Run playwright-cli snapshot before commands that require element refs (click, fill, check, select, hover, drag, etc.) unless a fresh …
- Very specific: line 32
Treat ### Error output as command failure, even when process exit code is 0.
- Distinctive: line 34
Use explicit filenames when saving artifacts (screenshots, snapshots, PDFs, videos, storage state).
- Very specific: line 49
Use -s=<name> when the user asks for a named/session-isolated browser.
- Very specific: line 50
Prefer native commands over eval and run-code.
- Distinctive: line 51
Keep session names short and filesystem-safe (lowercase letters + numbers, no punctuation, target <= 12 chars) to avoid local socket path …
- Very specific: line 55
Do not classify pass/fail from shell exit codes for eval or run-code.
- Distinctive: line 56
Always inspect command output:
- Very specific: line 57
If output contains ### Error, treat as failure.
- Very specific: line 58
If output contains ### Result, use that value for assertions.
- Very specific: line 59
Prefer eval for boolean checks and DOM assertions.
- Very specific: line 60
Use run-code for imperative Playwright flows only.
- Distinctive: line 65
When user requests pass and fail screenshots:
- Distinctive: line 73
Always return compressed JPEG screenshots, not raw PNG screenshots.
- Very specific: line 83
If ffmpeg is unavailable, stop and report the missing dependency instead of returning an uncompressed PNG.
- Distinctive: line 87
Use default session unless the user requests named sessions.
- Distinctive: line 88
Keep multi-step flows in one session for continuity.
- Distinctive: line 89
Place generated artifacts in predictable paths when the user does not specify:
“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
Use playwright-cli directly (already installed) to execute browser automation from natural-language requests.
Quick Start
- Verify the CLI is available:
command -v playwright-cli >/dev/null 2>&1 - Open a browser session:
playwright-cli open https://example.com - Capture refs before ref-based commands:
playwright-cli snapshot
Natural-Language Execution Workflow
- Parse the request into atomic actions.
- Convert each action to command templates from
references/command-map.md. - Run
playwright-cli snapshotbefore commands that require element refs (click,fill,check,select,hover,drag, etc.) unless a fresh snapshot is already available. - Re-run
playwright-cli snapshotafter navigation or major DOM changes. - For assertions, prefer
playwright-cli evaland parse the### Resultvalue from stdout. - Treat
### Erroroutput as command failure, even when process exit code is0. - For screenshots, capture PNG first, then compress to JPEG with
ffmpegbefore final save/return. - Use explicit filenames when saving artifacts (screenshots, snapshots, PDFs, videos, storage state).
- Return executed commands and key results (URLs, counts, file paths, errors).
Command Mapping Rules
- Map intent verbs directly:
- open/launch ->
open - navigate ->
goto - click/tap ->
click - double click/double tap ->
dblclick - type/input ->
type - fill/set field ->
fill - back/forward/refresh ->
go-back/go-forward/reload
- open/launch ->
- Preserve user-provided optional flags and values.
- Omit optional args when unspecified.
- Use
-s=<name>when the user asks for a named/session-isolated browser. - Prefer native commands over
evalandrun-code; useevalorrun-codeonly if no first-class command exists. - Keep session names short and filesystem-safe (lowercase letters + numbers, no punctuation, target <= 12 chars) to avoid local socket path errors on macOS.
Reliability Guardrails (Must Follow)
- Do not classify pass/fail from shell exit codes for
evalorrun-code. - Always inspect command output:
- If output contains
### Error, treat as failure. - If output contains
### Result, use that value for assertions.
- If output contains
- Prefer
evalfor boolean checks and DOM assertions. - Use
run-codefor imperative Playwright flows only. run-codeexpects a valid JS expression; statements like barereturn ...orthrow ...are invalid.- For JS snippets passed to
eval, prefer expression-safe patterns:- Good:
Array.from(...).some(function(x){ ... }) - Risky in this CLI context: snippets that are parsed as non-expression wrappers.
- Good:
- When user requests pass and fail screenshots:
- Capture one screenshot per scenario after assertion.
- Capture to temporary PNG, then convert with
ffmpegto JPEG as the final artifact. - Name final files with scenario status prefix, e.g.
pass-<name>.jpg,fail-<name>.jpg. - Save a machine-readable index file (
results.txtor JSON) mapping scenario -> status -> final JPEG artifact path.
Screenshot Compression Rule (Required)
- Always return compressed JPEG screenshots, not raw PNG screenshots.
- Required flow:
- Capture screenshot to temporary PNG path.
- Compress to JPEG with
ffmpeg. - Return/report only the JPEG path.
- Default command pattern:
playwright-cli screenshot --full-page --filename "$TMP_PNG" ffmpeg -y -i "$TMP_PNG" -q:v 4 "$FINAL_JPG" - If
ffmpegis unavailable, stop and report the missing dependency instead of returning an uncompressed PNG.
Session and Artifact Conventions
- Use default session unless the user requests named sessions.
- Keep multi-step flows in one session for continuity.
- Place generated artifacts in predictable paths when the user does not specify:
output/playwright/*.jpgoutput/playwright/*.pdfoutput/playwright/*.jsonoutput/playwright/*.zip
Full Command Coverage
Load references/command-map.md when mapping or validating command usage. It contains the complete command catalog for:
- Core
- Navigation
- Keyboard
- Mouse
- Save as
- Tabs
- Storage (state, cookies, localStorage, sessionStorage)
- Network
- DevTools
- Install
- Configuration
- Sessions
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.

