Install
npm install -g @playwright/cli@latestWho it's for
This guide is for developers who need Playwright CLI and want to install the matching SKILLS for a coding agent. Officially it is written as Playwright CLI with SKILLS.
Before you start, confirm this machine is Node.js 18 or newer. The page also says you need Claude Code, GitHub Copilot, or any other coding agent; that is a runtime note, not an exclusive list, and do not generalize the global npm install into a marketplace plugin that does not appear.
The CLI is headless by default. Only add --headed to open when you explicitly want the browser visible. On the first try, do not open or record an unconfirmed URL.
Complete a first try in 3 minutes
Use only the recommended install command given on the page:
npm install -g @playwright/cli@latest
Precondition: Node.js 18 or newer, and a usable coding agent in the current environment. The install location is the global npm package @playwright/cli; do not rewrite this as another installer that does not appear.
Side-effect confirmation point: this command writes the CLI into the global environment. If you do not intend to change this machine’s global packages, stop first. Confirm, then run it. After a successful install, if you still need local skill files, run the page’s playwright-cli install --skills; that is skill placement after install, not a second primary installer. It writes skill files, so confirm the current project/agent directory before running it as well.
Success signal: the global command is available, and (if you ran it) --skills finished normally. Then do only a check: in the agent, confirm it recognizes Playwright CLI skills, or in the terminal confirm the CLI is installed. Do not rush to open a site, record a script, or take a screenshot. If you are about to use open, remember the default is headless; add --headed only when you want to see the browser, and confirm the target address first.
Use cases
Case 1: Install the official CLI globally. After confirming Node.js 18+, run npm install -g @playwright/cli@latest. The evidence covers this install command and “Playwright CLI with SKILLS”. The completion criterion stops at a successful global package install. Do not add uninstall steps or a custom registry that do not appear.
Case 2: Install skills locally and understand the headless default. After the CLI is installed, run playwright-cli install --skills. The evidence states local skills are installed with this command; it also states the CLI is headless by default, and if you want to see the browser, pass --headed to open. The first-try success signal is that --skills finished and the agent can see the skills. The excerpt does not give a URL for open, so do not invent a URL, and do not treat --headed as the default.
Limits
The primary install path is only npm install -g @playwright/cli@latest. playwright-cli install --skills is skill placement, not a parallel marketplace install. Node.js 18+ is required. The listed agents are not the exclusive supported range. The default is headless; adding --headed to open will show a browser. Recording targets, selectors, and screenshot paths that are not written there cannot be treated as a safety conclusion.