</>MCP Agents Market
Skill

playwright-cli

by microsoft12.8kJavaScriptUpdated 2026-08-19

CLI for common Playwright actions. Record and generate Playwright code, inspect selectors and take screenshots.

Claude CodeGitHub Copilot

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

Token-efficient CLI commands that avoid loading large schemas and accessibility trees into agent context
Comprehensive browser automation: navigation, clicks, form fills, keyboard/mouse events, drag-and-drop, and file uploads
Persistent and isolated browser sessions with cookie and localStorage state management across invocations
Page snapshots with element references for precise interaction targeting and searchable DOM inspection
Network request mocking, console logging, tracing, video recording with action annotations and chapter markers
Visual dashboard (playwright-cli show) for monitoring and controlling all running browser sessions with live screencasts
Playwright code generation and recording to capture user interactions as reproducible test scripts
Support for multiple browser engines (Chromium, Firefox, WebKit), device emulation, and CDP attachment to running browsers

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 more

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.

Related searches