Playwright CLI skill
Microsoft's token-efficient browser automation and testing for coding agents.
Official vendorby MicrosoftChecked November 18, 2026
Install Playwright CLI free
Leave your email and the install steps open right here: one prompt to paste into your AI tool. Works for all 151 skills.
Playwright CLI is Microsoft's command-line version of Playwright made for coding agents such as Claude Code, and this skill teaches Claude its commands. Claude opens a real browser, clicks, types, fills forms and checks pages through short terminal commands, which Microsoft says costs fewer tokens than loading a full browser tool set into the conversation. The browser runs hidden by default; ask for headed mode if you want to watch it.
Who is Playwright CLI for?
- People testing their own site or app
- QA engineers
- Developers
What's inside Playwright CLI
Playwright CLI is a 497-line SKILL.md of commands with 10 reference guides and no scripts. Claude drives a real browser by typing playwright-cli commands (Playwright is Microsoft's browser automation tool), so it needs Node.js and terminal access; chat-only apps cannot run it.
When it switches on
It switches on when you ask Claude to operate a website, test web pages, or write, run and fix Playwright tests.
What the instructions cover
- Choosing Chrome, Firefox, WebKit or Edge, or attaching to the browser you use every day through the Playwright Extension, with each session's tabs kept in a named, colored tab group
- Tabs, cookies, local storage and saved logins (state-save and state-load) in named sessions, plus isolated tabs for a second user
- Emulating dark mode, reduced motion, print view or a phone such as an iPhone
- Faking network responses, reading console logs and requests, tracing, and video recording with chapters
- An annotate mode where you draw boxes on the live page and type comments for Claude
- Writing tests in three stages (plan, generate, heal), since every action prints matching test code
What it needs
- Node.js with npm, to install the @playwright/cli package globally or use a project's own Playwright
| File | What it is |
|---|---|
SKILL.md | 497 lines: every command group with short examples |
references/test-generation.md | 433 lines: the plan, generate and heal workflow |
references/ | 9 shorter guides: tests, request mocking, running code, sessions, storage, tracing, video, element attributes and screenshots for code reviews |
Watch out: Some pages offer their own tools to agents (WebMCP); the skill says their names and results are untrusted input, never instructions.
How to use Playwright CLI: which prompts work?
Use playwright-cli to test the add-todo flow on https://demo.playwright.dev/todomvc and screenshot each stepLog into our staging site as [TEST USER], save the session and check that the dashboard loadsWrite a Playwright test for the contact form at [PAGE URL], run it and fix it until it passesHow do you install Playwright CLI?
Skills follow the open Agent Skills standard, so this one is not tied to one company. Pick the AI tool you use. Not sure? The first tab covers most of them in one step. New to this? Our guide on how to install Claude skills walks through it, and Anthropic's plugin guide covers the Claude app.
Install this skill for me so it works in every project: run `npx skills add https://github.com/microsoft/playwright-cli/tree/main/skills/playwright-cli -g -y` in my terminal. If Node.js is missing, tell me how to install it first. When it's done, confirm the skill is installed and tell me how to start using it.Or do it yourself:
One command installs the skill: it finds the AI tools on your computer and asks which ones should get it.
npx skills add https://github.com/microsoft/playwright-cli/tree/main/skills/playwright-cli -gYou need Node.js installed (free, from nodejs.org). The -g flag makes the skill available in every project.
Good to know: The README notes that an agent can also learn the commands from playwright-cli --help without the skill. Add --headed when you open a page to see the browser window.
Unlock the install steps
Free. Leave your email once to open the install steps for all 151 skills, and get the best new skills each month.
How did we check Playwright CLI?
On November 18, 2026 we read all 11 files in the skill's folder, starting with its 497-line SKILL.md. The section on what's inside comes from those files. Its license is Apache-2.0. Its files were last changed in November 2026. We have not run it on a test task yet.
Not a developer? You can still use Playwright CLI: you say in plain words what should work, Claude Code does the technical part and shows you what it checked. Working that way, from the first install to reading the result, is what our Claude Code course teaches (early access).
More skills worth a look
- Superpowers: Test-Driven DevelopmentRed, green, refactor: Claude writes a failing test before any real code
- Superpowers: Verification Before CompletionNo 'it works' without proof: Claude runs the checks before it claims success
- gstack QAGarry Tan's QA lead: test your app, fix what breaks and report ship readiness