playwright-cli
CLI for common Playwright actions. Record and generate Playwright code, inspect selectors and take screenshots.
Playwright CLI is an agent skill that provides token-efficient command-line access to Playwright browser automation for coding agents. Rather than loading verbose tool schemas and accessibility trees into the model context, it exposes concise commands for navigation, interaction, screenshots, testing, and debugging. The skill integrates with Claude Code, GitHub Copilot, and other coding agents through locally installed skill definitions or direct CLI invocation. It supports persistent sessions, storage state management, network mocking, video recording, and a visual dashboard for monitoring multiple browser sessions.
Key Features
Use Cases
- 01Instructing coding agents to test web application workflows with automated browser interactions and screenshots
- 02Generating Playwright test scripts by recording user actions or converting natural language specifications
- 03Debugging failing tests by capturing traces, videos, and console logs during agent-driven browser sessions
- 04Managing multiple browser sessions for different projects with isolated or persistent storage states
- 05Mocking API responses during end-to-end testing to simulate backend conditions
- 06Visually monitoring agent-driven browser automation in real-time using the live dashboard
Related Skills
View moresuperpowers
An agentic skills framework & software development methodology that works.
skills
Skills for Real Engineers. Straight from my .agents directory.
skills
Public repository for Agent Skills
ponytail
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
playwright-cli — FAQ
What is Playwright CLI agent skill?+
Playwright CLI is a command-line agent skill that provides token-efficient access to Playwright browser automation for coding agents. It exposes browser control through concise CLI commands instead of verbose MCP tool schemas, making it ideal for agents working within limited context windows.
How do I install Playwright CLI for my coding agent?+
Install the package globally with npm install -g @playwright/cli@latest, then run playwright-cli install --skills to register the skill definitions. Claude Code, GitHub Copilot, and other agents will automatically discover and use the locally installed skills.
Which AI coding agents work with Playwright CLI?+
Playwright CLI works with Claude Code, GitHub Copilot, and any other coding agent that can invoke shell commands and read skill definitions. You can point agents at the CLI with or without pre-installed skills—they can read capabilities from playwright-cli --help.
Does Playwright CLI require API keys or credentials?+
No API keys are required for basic operation. You need Node.js 18 or newer and the npm package installed. Optional features like CDP attachment or browser extension integration may require additional configuration.
Is Playwright CLI free to use?+
Yes, Playwright CLI is free and open source, maintained by Microsoft. It is built on the Playwright browser automation framework and available under the same permissive license.
How do I manage multiple browser sessions with Playwright CLI?+
Use the -s=<name> flag to create named sessions, or set the PLAYWRIGHT_CLI_SESSION environment variable. Each session maintains its own browser profile, cookies, and state. Use playwright-cli list to see all active sessions and playwright-cli show to open a visual dashboard with live previews.
How do I install playwright-cli?+
Open the source repository on GitHub and follow its README. playwright-cli is a skill — MCP Agents Market links you directly to the official repo.
Is playwright-cli free?+
playwright-cli is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.