Drive token-efficient browser testing from coding agents with Playwright CLI
Use Playwright CLI when a coding agent needs to open pages, inspect snapshots, click, type, capture screenshots, and manage browser sessions through concise shell commands instead of loading a full browser automation server or hand-writing Playwright scripts first.
What it does
Drive token-efficient browser testing from coding agents with Playwright CLI
Use Playwright CLI when a coding agent needs to open pages, inspect snapshots, click, type, capture screenshots, and manage browser sessions through concise shell commands instead of loading a full browser automation server or hand-writing Playwright scripts first.
Prerequisites
Node.js 18+, npm, @playwright/cli, Playwright browsers, shell access from a coding agent
Installation
Use the upstream install or setup path that matches your environment:
- npm install -g @playwright/cli@latest
- npx --no-install playwright-cli --version
- When local version is available, use npx playwright-cli in all commands. Otherwise, install playwright-cli as a global command:
Requirements and caveats from upstream:
- Node.js 18 or newer
- | PLAYWRIGHT_MCP_EXTENSION Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright MCP Bridge" browser extension to be installed. |
Basic usage or getting-started notes:
-
Claude Code, GitHub Copilot, or any other coding agent.
-
bash
-
playwright-cli --help
-
Extracted from upstream docs: https://raw.githubusercontent.com/microsoft/playwright-cli/HEAD/README.md
Documentation
Source
Capabilities
Install
Quality
deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,487 chars)