playwright-cli Claude skills

Microsoft's command-line interface for driving a browser through Playwright, plus a skill that teaches coding agents the commands.

Our verdict Recommended

A first-party, Apache-2.0, actively maintained browser CLI with a well-referenced skill; it needs a global npm install and the agent gets real control of a browser.

What playwright-cli does

playwright-cli is a Node.js command-line tool from the Playwright team, and the skill in this repo teaches an agent how to use it. Instead of loading a browser-automation server's tool schemas into context, the agent runs short shell commands: open a page, take a snapshot of the page as a list of element references (e15, e21), then click, fill, type, hover, drag, select, upload files, or run JavaScript with eval. The same CLI handles tabs, cookies and local storage, network request mocking with route, console and network logs, screenshots, PDF output, tracing and video recording. Browser sessions are named, so several projects can run side by side, and a headless session closes itself after an hour of inactivity.

The SKILL.md is about 15 KB and links ten reference files (about 69 KB in total) for storage state, session management, request mocking, running arbitrary Playwright code, test generation, tracing, video recording and attaching screenshots to pull requests. The README also describes a show dashboard for watching running sessions and an option to attach to a running Chrome or Edge instance. A second skill under .claude/skills/dev only covers maintaining the repo (rolling Playwright versions, releases). Install the CLI globally with npm, then run playwright-cli install --skills to put the skill where your agent finds it.

Good for

  • Coding agents that need to click through and test a web app without a heavy MCP server
  • Recording a Playwright test or screenshots while an agent explores a page
  • Running several isolated browser sessions from one agent

Not for

  • Long exploratory loops where persistent page introspection matters more than token cost (the README points those to Playwright MCP)
  • Machines without Node.js 18 or newer

What's inside depth 3/5

One main skill of about 15 KB with ten reference files (about 69 KB), no helper scripts or evals in the skill, and a second skill that only covers repo maintenance.

Skills
2
Reference docs
12
Scripts
0
Tests / evals
0
Templates
0
Avg SKILL.md
7.7 KB

Counted from the repository file tree. How we score depth.

Dependencies and costs

  • Node.js 18 or newer
  • npm global install of @playwright/cli
  • Playwright browser binaries (downloaded by Playwright)

Security review

Review before installing

Microsoft's Playwright CLI skill lets the agent drive a browser from the shell and pre-approves wildcard shell access to playwright-cli and npx playwright. By default the browser profile lives in memory, but the skill also documents attaching to your running Chrome or Edge and reading cookies and storage state. The launcher checks npm once a day for updates (opt-out with NO_UPDATE_NOTIFIER) and the real CLI code is in the playwright-core package, which was not in the files we reviewed.

Worth knowing

  • browser_session_optionalDocuments 'attach --extension=chrome' and 'attach --cdp=chrome' to drive your running, signed-in Chrome or Edge, plus cookie-list/cookie-get and state-save commands that read and write cookies and storage state; the default profile is in memory and this is opt-in.skills/playwright-cli/SKILL.md:285
  • Makes network requestsRuns 'npm view @playwright/cli version' at most once a day on open, attach, list and install commands to show an update notice; disabled by NO_UPDATE_NOTIFIER or CI.playwright-cli.js:68
  • Runs remote code at an unpinned versionInstall instructions use 'npm install -g @playwright/cli@latest' (also line 407).README.md:26
  • Installs packages or toolsGlobal npm install of the CLI; Playwright also downloads browser binaries through its install commands.README.md:26
  • Relies on a CLI or package we could not reviewplaywright-cli.js is a thin launcher; the CLI program itself lives in the playwright-core npm package (pinned 1.64.0-alpha), which is not in this repository.package.json:21

What we checked

The repository (32 files) on Oct 29, 2026. Not a full review: it relies on code outside the repository: npm packages playwright and playwright-core 1.64.0-alpha (contain the actual CLI, installed by npm); Playwright browser binaries downloaded by the install commands; Playwright MCP Bridge browser extension used by 'attach --extension'.

NVIDIA SkillSpector static scan: 26 pattern hits (MCP Rug Pull 15, Privilege Escalation 5, Agent Snooping 2, Memory Poisoning 1, Data Exfiltration 1, Rogue Agent 1). The 26 SkillSpector hits are documentation: an .npmrc mention in the maintainers' publish pipeline, a note about deleting saved state files, 'npx playwright' without a pin, and the example URL api.example.com in a request-mocking guide. The tests only spawn the local launcher against a local fake npm registry.

A review, not a certification. Skills change after we check them — read the files before installing.

License

Apache-2.0 — commercial use allowed.

Can it run unattended?

Not really. It is a command toolbox for an interactive agent; the skill has no loop, stop conditions or verification routine, though headless sessions and named sessions would let a larger harness script it.

Alternatives to playwright-cli

agent-browser

vercel-labs/agent-browser

A native browser-automation CLI for agents, plus 11 skills that teach the snapshot-and-ref workflow for navigating, filling forms, scraping and testing.

Recommended Check first Depth 4/5

Playwright Skill

lackeyjb/playwright-skill

A skill that lets an agent write and run its own Playwright scripts for testing, screenshots, login flows and arbitrary browser automation.

Recommended Broad access Depth 3/5

Playwright Best Practices

currents-dev/playwright-best-practices-skill

A Playwright testing skill with a 26 KB router and about 57 references on locators, fixtures, flaky tests, CI and accessibility.

Recommended No issues Depth 3/5

Chrome DevTools MCP

ChromeDevTools/chrome-devtools-mcp

Google's Chrome DevTools MCP server and CLI, plus seven skills for debugging performance, memory leaks, cookies and accessibility in a live Chrome.

With caveats Check first Depth 3/5

FAQ

What is playwright-cli?

playwright-cli is a command-line tool from the Playwright team that lets a coding agent control a browser with short shell commands. The repo ships a skill that documents those commands so Claude Code, Copilot or another agent can use them.

How do I install playwright-cli and its skill?

Install the CLI with npm install -g @playwright/cli@latest (Node.js 18 or newer). Then run playwright-cli install --skills so Claude Code, GitHub Copilot and similar agents pick up the skill. The README also says you can skip the skill and let the agent read playwright-cli --help.

playwright-cli vs Playwright MCP: which should I use?

The README recommends the CLI for coding agents because commands are more token-efficient than loading MCP tool schemas and accessibility trees. It keeps MCP for long-running or exploratory loops that need persistent page state.

Is playwright-cli safe to use?

We found no hidden network calls or telemetry in the skill files. The tool can run JavaScript in pages, manage cookies and saved login state, and attach to a running browser, so use a throwaway profile for sensitive accounts and delete saved state files after use.

Sources: GitHub repository (stars, license, file tree, last push Oct 19, 2026); install counts from skills.sh via Best Skills (CC BY 4.0). Review based on the README and SKILL.md files as published.