playwright-cli
Skill by pwndoc
Automates browser interactions and web page tests through the playwright-cli command line tool. It is aimed at developers and testers who want an AI assistant to drive Playwright browser sessions.
Install playwright-cli
Built from the published package, never by AI.
git clone --depth 1 https://github.com/pwndoc/pwndoc /tmp/pwndoc && mkdir -p ~/.claude/skills && cp -r /tmp/pwndoc/.claude/skills/playwright-cli ~/.claude/skills/playwright-cliRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/pwndoc/pwndoc /tmp/pwndoc && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/pwndoc/.claude/skills/playwright-cli ~/.gemini/antigravity-cli/skills/playwright-cliAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
playwright-cli is an agent skill that teaches an AI assistant to control a browser through the playwright-cli command line tool. It covers opening and navigating pages, clicking, typing, filling forms, managing tabs, handling cookies and storage, mocking network routes, and collecting console, network, tracing and video data. After each command it reports the page URL, title and a snapshot of the page state. Elements can be targeted by snapshot ref, CSS selector or Playwright locator.
The skill also supports named browser sessions, several browser types (chrome, firefox, webkit and msedge), persistent profiles and a connection through a browser extension. It links to reference guides for running and debugging Playwright tests, test generation and tracing. It suits developers and testers who want an assistant to automate or check web pages.
Written from the project's SKILL.md and checked against it.
What it can do
- Open and navigateOpens browsers and pages with open, goto, reload, go-back and go-forward.
- Interact with elementsClicks, types, fills, hovers, drags, selects, uploads and checks page elements.
- SnapshotsThe snapshot command saves the page state with element refs for later actions.
- Storage managementLists, gets, sets and deletes cookies, localStorage and sessionStorage values.
- Network mockingUses route and unroute to mock or block requests by URL pattern.
- DevToolsReads console and network output and runs tracing and video recording.
- TabsCreates, lists, selects and closes browser tabs.
- Screenshots and PDFSaves screenshots of the page or an element, and exports the page as a PDF.
- Browser sessionsRuns named sessions and lists, closes or force-kills browser processes.
- Playwright test guidesLinks to reference guides for running, debugging and generating Playwright tests.
What you need
- npm and npx, used to install or run @playwright/cli
- Bash access, since the skill allows Bash(playwright-cli:*) commands
Try asking
- Open example.com, fill in the login form and take a snapshot.
- Mock all .jpg requests with a 404 status and reload the page.
- Start a trace, click the submit button and stop the trace.
Good to know
- The browser profile is in-memory by default unless --persistent or --profile is used.
- Actions depend on snapshot refs or selectors that the assistant must read from the page state.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/playwright-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Bash(playwright-cli:*) Bash(npx:*) Bash(npm:*)
-
SKILL.md8 KB -
references/element-attributes.md665 B -
references/playwright-tests.md2 KB -
references/request-mocking.md2 KB -
references/running-code.md5 KB
Show all 10 files
-
references/session-management.md4 KB -
references/storage-state.md5 KB -
references/test-generation.md2 KB -
references/tracing.md3 KB -
references/video-recording.md5 KB
Alternatives to playwright-cli
All alternatives →Antigravity Workflows guides an assistant through multi-skill workflows for shipping a SaaS MVP, auditing web app security, building AI agents, running browser QA, and designing a domain model. It is for users who want several skills combined with verified checkpoints.
Guides building end-to-end test suites with Playwright and Cypress. It is for developers who write E2E tests, debug flaky tests, or set testing standards.
Upgrades Chrome or Firefox versions in the Flutter Web Engine and Framework tests. It verifies the version, updates config files, syncs CI builder JSON and runs local tests before the CIPD upload.
Builds reliable browser checks for real web workflows using semantic locators, bounded waits, isolated test data and explicit outcome checks. It is for developers and testers writing or debugging browser tests.
Diagnoses memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Built for developers investigating high memory use, unbounded growth, or object retention.
Guides an assistant through using Claude in Chrome, a browser extension whose tools act in the person's real Chrome with their own sign-ins. It is for users who want the assistant to work in their browser safely.
Compare with antigravity-workflows, e2e-testing-patterns or upgrade-browser
playwright-cli: common questions
How does the skill find elements on a page?
By default it uses refs from the snapshot, such as e15. It also accepts CSS selectors and Playwright locators like getByRole or getByTestId.
Which browsers can it open?
The source lists chrome, firefox, webkit and msedge, selected with the --browser option. It can also connect to a browser through an extension with --extension.
Is browser data kept between sessions?
The profile is in-memory by default. Using --persistent or --profile keeps a persistent profile, and delete-data removes user data for the default session.
How do I install playwright-cli?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is playwright-cli free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is playwright-cli safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to playwright-cli?
Similar skills: antigravity-workflows, e2e-testing-patterns, upgrade-browser, browser-automation.
