playwright
Skill0 starsChanged 25 days agoMITView on GitHub
Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.
- Installs packages
94 other projects use a version of this, 36 of them edited.
Adopted by
Most recently taken up by
- Pamir-AI/skillstheir own version, first seen Nov 8, 2026
- shetengteng/skillix-hubtheir own version, first seen Nov 8, 2026
- LuisSambrano/antigravity-configtheir own version, first seen Nov 8, 2026
- fmind/dottheir own version, first seen Nov 8, 2026
- fmind/dotfilestheir own version, first seen Nov 8, 2026
- miminashi/pvesetheir own version, first seen Nov 4, 2026
Used with
Projects with it also use develop-web-game, msw 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.
hebertzhuSkilldevelop-web-game
Use when building or iterating on a web game and you need a tight implement-test-observe loop; prefer the bundled Playwright client, inspect screenshots and text state, and validate every meaningful change before moving on.
Also in 4 projects that use this
thongdn-itSkillmsw
MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.
Also in 3 projects that use this
SupabaseSkillreact-hook-form
Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,
Also in 3 projects that use this
thongdn-itSkilltailwind
Tailwind CSS v4 performance optimization and best practices guidelines (formerly tailwindcss-v4-style). This skill should be used when writing, reviewing, or refactoring Tailwind CSS v4 code to ensure optimal build performance, minimal CSS output, and correct usage of v4 features. Triggers on tasks involving Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.
Also in 5 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 6 projects that use this
OpenAISkillweb-perf
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.
Also in 5 projects that use this
- +1 more from thongdn-it
Other versions94 projects use a version of this.
Word for word · 0
None found.
Edited · 36
- openai/skills★ 27k79% same
- netease-youdao/LobsterAI★ 6.2k71% same
- freestylefly/wesight★ 96971% same
- JetBrains/skills★ 38675% same
- matyasstoch/david-skills★ 5979% same
- z91772524-ai/pojia-next-mac★ 3979% same
- VoDaiLocz/kilo-kit-mcp★ 2879% same
- ingpoc/SKILLS★ 979% same
- 4gentic/obelus★ 878% same
- Envy-7z/katalyst★ 476% same
26 more not listed
Wrote their own version · 58
- openai/openai-agents-python★ 31ksame name
- prowler-cloud/prowler★ 15ksame name
- hyperdxio/hyperdx★ 10ksame name
- bluesky-social/atproto★ 9.7ksame name
- Kiln-AI/Kiln★ 5.3ksame name
- Gram-ax/gramax★ 609same name
- Mindrally/skills★ 275same name
- alexeykrol/claude-code-starter★ 194same name
- magnus919/agent-skills★ 172same name
- kandada/aacode★ 134same name
48 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 repository24 other files it gives its agents.
- codebase-designSkill
- improve-codebase-architectureSkill
- uv-pythonSkill
- bw-loginSkill
- project-iconSkill
- recover-mouse-inputSkill
- wizardSkill
- dispatching-parallel-agentsSkill
- handoffSkill
- hill-climbSkill
- opcSkill
- opnSkill
- personal-skillsSkill
- reassign-pmSkill
- repo-lessonsSkill
- trialSkill
- unstuckSkill
- woSkill
- sampleSkill
- find-docsSkill
- liteparseSkill
- tco-searchSkill
- browse-xSkill
- frontend-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 4 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 81 edited versions we read keep these.
4
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 10
Treat this skill as CLI-first automation.
- Very specific: line 14
Before proposing commands, check whether npx is available (the wrapper depends on it):
- Very specific: line 20
If it is not available, pause and ask the user to install Node.js/npm (which provides npx).
- Very specific: line 43
Always run the wrapper as bash "$PWCLI".
- Very specific: line 47
Keep Chromium's sandbox on.
- Distinctive: line 74
Not needed on macOS or Linux.
- Distinctive: line 78
Use the wrapper script:
- Very specific: line 89
If the user prefers a global install, this is also valid (the command is then playwright-core cli):
- Distinctive: line 163
Prefer the wrapper unless the repository already standardizes on a global install.
- Very specific: line 174
Always snapshot before referencing element ids like e12.
- Very specific: line 176
Prefer explicit commands over eval and run-code unless needed.
- Very specific: line 177
When you do not have a fresh snapshot, use placeholder refs like eX and say why.
- Very specific: line 178
Use --headed when a visual check will help.
- Very specific: line 179
When capturing artifacts in this repo, use output/playwright/ and avoid introducing new top-level artifact folders.
- Distinctive: line 180
Default to CLI commands and workflows, not Playwright test specs.
“Common” is measured: kept by at least 6 in 10 of the 81 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 Skill
Drive a real browser from the terminal using playwright-cli. Prefer the bundled wrapper script so the CLI works even when it is not globally installed.
Treat this skill as CLI-first automation. Do not pivot to @playwright/test unless the user explicitly asks for test files.
Prerequisite check (required)
Before proposing commands, check whether npx is available (the wrapper depends on it):
command -v npx >/dev/null 2>&1If it is not available, pause and ask the user to install Node.js/npm (which provides npx). Provide these steps verbatim:
# Verify Node/npm are installed
node --version
npm --version
# If missing, install Node.js/npm, then:
npm install -g playwright-core@1.64.1
playwright-core cli --helpOnce npx is present, proceed with the wrapper script. A global install is optional.
Skill path (set once)
export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export PWCLI="$CODEX_HOME/skills/playwright/scripts/playwright_cli.sh"User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).
Always run the wrapper as bash "$PWCLI". A skill install or sync may not keep the script's execute bit, and then "$PWCLI" on its own fails with Permission denied.
Browser sandbox (required)
Keep Chromium's sandbox on. Set it once per host in the CLI's global config, ~/.playwright/cli.config.json (%USERPROFILE%\.playwright\cli.config.json on Windows):
{"browser":{"browserName":"chromium","launchOptions":{"channel":"chrome","chromiumSandbox":true}}}channel: "chrome"runs the installed Google Chrome, which keeps itself up to date. KeepbrowserName: without it the CLI ignoreschanneland always uses Chrome.- Without
chromiumSandbox: true, the CLI starts Playwright's bundled Chromium on Linux with--no-sandbox. - The CLI applies a session's own config (
--config, or.playwright/cli.config.jsonin the working folder) on top of this file. Never setchromiumSandboxto false there or pass--no-sandbox. - On a Linux host without Google Chrome, set
"channel": "chromium"(Playwright's bundled Chromium, installed withbash "$PWCLI" install-browser chromium) and keepchromiumSandbox: true. It sandboxes through unprivileged user namespaces. If the browser will not start with the sandbox, stop and report it; do not turn the sandbox off.
Windows: seeded profiles (required)
On a fresh Chrome or Edge profile, Chrome checks whether the Windows account has a blank password by trying to log on with an empty one. Each try logs a failed logon (Security event 4625), and enough of them in a few minutes lock the account, SSH included. A profile whose Local State already holds the cached answer (password_manager.os_password_blank false, os_password_last_changed "9223372036854775807") skips the check. scripts/seed_local_state.ps1 writes it: it merges those two keys into an existing Local State and keeps every other key, creates the file only when it is missing, and writes nothing when the profile is already seeded, so it is safe before every launch.
On Windows (Git Bash) the wrapper checks open, attach and show first, about a second each. It lets one through only when it starts no Chrome or Edge, or starts one on a profile it has just seeded. Anything it cannot prove stops with exit 2 before a browser starts. Fix the cause it names; never start the browser another way.
openfinds the profile the CLI will start, as the CLI does:--profile, elsebrowser.userDataDirfrom the config files orPLAYWRIGHT_MCP_USER_DATA_DIR, else the CLI's own folder for--persistent. It seeds that folder and passes it to the CLI as--profile.--profileneeds one non-empty value: an empty, repeated or negated one is refused.- A session with none of those would start on a temporary profile that the browser launch creates, too late to seed. The wrapper gives it a fresh seeded profile instead, a new one at each
open, so it still starts empty.delete-dataremoves these. Anopenremoves earlier ones only when they are older than 30 minutes, hold no browser lock, and no session file or running process names them. - Refused on Windows:
- a config with
browser.isolated: trueorPLAYWRIGHT_MCP_ISOLATED; - extension mode (
attach --extension,PLAYWRIGHT_MCP_EXTENSION, orextensionin a config), whose relay starts Chrome on a profile the wrapper does not seed; showandshow --annotate, whose dashboard runs Chrome on a temporary profile (show --port <n>andshow --killstart none);PWDEBUGother than0orfalse, since the Playwright Inspector runs Chrome on a temporary profile.
- a config with
- The wrapper also sets
PW_CODEGEN_NO_INSPECTOR=1, so a paused headed session does not open the Inspector;resumestill works. attachto a running browser (attach <name>,--endpoint,--cdp) starts no browser and goes through. So do Firefox and WebKit, which have no such check.- To start Chrome or Edge on Windows outside the wrapper (a Playwright script, code run through
run-code, or a browser you launch yourself), use a profile folder and seed it first:powershell -NoProfile -ExecutionPolicy Bypass -File "$(dirname "$PWCLI")/seed_local_state.ps1" -Profile <dir>. Then launch withchromium.launchPersistentContext('<dir>', ...)or--user-data-dir=<dir>. If the helper fails, do not launch. Never usechromium.launch()there: it starts on a temporary profile. - Not needed on macOS or Linux; the wrapper skips it there.
Quick start
Use the wrapper script:
bash "$PWCLI" open https://playwright.dev --headed
bash "$PWCLI" snapshot
bash "$PWCLI" click e15
bash "$PWCLI" type "Playwright"
bash "$PWCLI" press Enter
bash "$PWCLI" screenshotIf the user prefers a global install, this is also valid (the command is then playwright-core cli):
npm install -g playwright-core@1.64.1
playwright-core cli --helpCore workflow
- Open the page.
- Snapshot to get stable element refs.
- Interact using refs from the latest snapshot.
- Re-snapshot after navigation or significant DOM changes.
- Capture artifacts (screenshot, pdf, traces) when useful.
Minimal loop:
bash "$PWCLI" open https://example.com
bash "$PWCLI" snapshot
bash "$PWCLI" click e3
bash "$PWCLI" snapshotWhen to snapshot again
Snapshot again after:
- navigation
- clicking elements that change the UI substantially
- opening/closing modals or menus
- tab switches
Refs can go stale. When a command fails due to a missing ref, snapshot again.
Recommended patterns
Form fill and submit
bash "$PWCLI" open https://example.com/form
bash "$PWCLI" snapshot
bash "$PWCLI" fill e1 "user@example.com"
bash "$PWCLI" fill e2 "password123"
bash "$PWCLI" click e3
bash "$PWCLI" snapshotDebug a UI flow with traces
bash "$PWCLI" open https://example.com --headed
bash "$PWCLI" tracing-start
# ...interactions...
bash "$PWCLI" tracing-stopMulti-tab work
bash "$PWCLI" tab-new https://example.com
bash "$PWCLI" tab-list
bash "$PWCLI" tab-select 0
bash "$PWCLI" snapshotWrapper script
The wrapper script uses the pinned npx --package playwright-core@1.64.1 playwright-core cli so the CLI can run without a global install. That is the CLI shipped in the stable Playwright release. The separate @playwright/cli package pins pre-release Playwright builds, so the skill does not use it; move the pin only to a newer stable playwright-core.
bash "$PWCLI" --helpPrefer the wrapper unless the repository already standardizes on a global install.
References
Open only what you need:
- CLI command reference:
references/cli.md - Practical workflows and troubleshooting:
references/workflows.md
Guardrails
- Always snapshot before referencing element ids like
e12. - Re-snapshot when refs seem stale.
- Prefer explicit commands over
evalandrun-codeunless needed. - When you do not have a fresh snapshot, use placeholder refs like
eXand say why; do not bypass refs withrun-code. - Use
--headedwhen a visual check will help. - When capturing artifacts in this repo, use
output/playwright/and avoid introducing new top-level artifact folders. - Default to CLI commands and workflows, not Playwright test specs.
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.

