playwright-cli
Skill by jiwoochris
Automates browser interactions, web page testing and Playwright test work through the playwright-cli command line tool. Aimed at AI assistants that need to drive a browser and read page snapshots.
Install playwright-cli
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jiwoochris/artex-global /tmp/artex-global && mkdir -p ~/.claude/skills && cp -r /tmp/artex-global/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/jiwoochris/artex-global /tmp/artex-global && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/artex-global/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 a command line tool for driving a browser from an AI assistant. It can open a browser, navigate to pages, and interact with elements using refs from a page snapshot, CSS selectors or Playwright locators. It also covers screenshots, PDFs, tabs, cookies and storage, network request mocking, and DevTools-style debugging such as console output, request logs and tracing.
After each command, it returns the page URL, title and a snapshot file, so the assistant can see the current page state. Sessions can use Chrome, Firefox, WebKit or Edge, mobile emulation, or a persistent profile. The skill also points to reference files for running and debugging Playwright tests. It suits anyone who wants an assistant to test or automate web pages.
Written from the project's SKILL.md and checked against it.
What it can do
- open and gotoOpens a browser session and navigates to a URL.
- click, fill and typeInteracts with page elements using snapshot refs, selectors or locators.
- snapshot and findCaptures the page state and searches it for text or a regexp.
- screenshot and pdfSaves the page as an image or a PDF file.
- tab-new and tab-selectManages multiple browser tabs in one session.
- cookie and storage commandsReads and writes cookies, localStorage and sessionStorage.
- routeMocks or blocks network requests matching a URL pattern.
- console and requestsShows browser console messages and network requests for debugging.
- tracing-start and tracing-stopRecords a trace of actions while the browser is running.
- show --annotateOpens a dashboard where the user marks up a page for UI feedback.
What you need
- npm, to install @playwright/cli globally
- A browser: Chrome, Firefox, WebKit or Edge
Try asking
- Open example.com, fill in the contact form and take a snapshot.
- Mock the route https://api.example.com/** with a JSON body.
- Start tracing, click the checkout button, then stop tracing.
Good to know
- On Windows, & in URLs must be escaped in cmd.exe or PowerShell.
- The default profile is in-memory unless --persistent or --profile is used.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: 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.md12 KB -
references/element-attributes.md665 B -
references/playwright-tests.md2 KB -
references/request-mocking.md2 KB -
references/running-code.md6 KB
Show all 10 files
-
references/session-management.md6 KB -
references/storage-state.md5 KB -
references/test-generation.md16 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
Which browsers does playwright-cli support?
The source lists chrome, firefox, webkit and msedge as values for the --browser option when opening a session.
How does the assistant see what is on the page?
After each command, playwright-cli provides a snapshot of the browser state, and its refs can be used to target elements.
Can it keep a login between sessions?
Yes. Use --persistent or a --profile directory, or save and load state with state-save and state-load.
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 AGPL-3.0 licence. The service it connects to may have its own pricing.
Is playwright-cli safe to use?
It scores 92 of 100. Grades: maintenance A, licence C, 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.
