Playwright Browser Automation
Drive browsers from the command line to test pages and debug Playwright workflows.
The skill restricts declared tools to Bash(playwright-cli:*), Bash(npx:*), and Bash(npm:*), providing some tool scoping. However, it can access arbitrary websites, execute arbitrary run-code, read and write cookies/storage, upload files, attach to external browsers, and invoke high-impact delete-data/kill-all operations without per-action confirmation, complete data-flow disclosure, sensitive-data isolation, or rollback guidance. No malicious or covert exfiltration behavior is evident.
Command groupings, references, and examples provide a coherent workflow with some error handling, cleanup, and test-failure guidance. However, installation and CLI-version compatibility, background debug control, and cross-platform behavior contain unverified assumptions; failure feedback and edge-case coverage are incomplete. Static calibration caps this at 10, with deductions for lack of executed reproduction.
The target scenarios are clear and cover browser automation, testing, debugging, sessions, storage, network mocking, and test generation. Trigger conditions, non-fit boundaries, permission-sensitive cases, and confirmation requirements are not sufficiently explicit. There is no Chinese-language guidance or evidence of mainland-China reachability, so points are deducted.
The documentation is organized into quick start, command groups, linked references, and end-to-end workflows, and includes storage-security cautions. The skill itself lacks pinned version requirements, a changelog, explicit maintenance ownership, and a clear update path; installation and command compatibility also rely on version assumptions. Repository context supplies Apache-2.0 licensing, Microsoft attribution, and version information, so no license or provenance deduction is applied.
The skill covers the main tasks from interaction through test generation, debugging, and healing, and its commands and generated-code examples are generally usable starting points. Results depend on the live page, browser, environment, and project configuration, often requiring user review; static reading cannot verify key paths. The score therefore stays within the static cap of 7 and is reduced for absent execution evidence.
Command examples, reference documents, README material, package test scripts, and the license provide auditable source evidence. No commands were executed, no key-path test results or third-party reproduction are supplied, and the evidence is mainly from one repository, so the score remains within the static cap of 5.
- Confirm the target and sensitive-data scope before using arbitrary URLs, run-code, uploads, persistent profiles, or state-save.
- Examples may handle passwords, cookies, authorization headers, and network responses; do not write real credentials or auth state to the project, logs, or traces.
- delete-data, close-all, kill-all, and trace cleanup can remove data or runtime state; confirm scope and preserve needed backups first.
- Installation commands and CLI versions may not align; verify the available commands and dependency versions in the target project.
What does this skill do, and when should you use it?
This skill uses playwright-cli to automate browser interactions, test web pages, and work with Playwright tests. It supports Chromium, Firefox, WebKit, and attachment to Chrome or Edge sessions, with commands for navigation, forms, tabs, storage, and network routing. It also exposes screenshots, PDFs, console output, requests, tracing, video, and code execution. It fits developers and coding agents that need to validate web flows or investigate browser behavior directly from the command line.
Runs playwright-cli or npx playwright cli commands; opens, closes, navigates, and switches browser pages; clicks, types, fills, drags, uploads, selects, checks, and unchecks elements using snapshot refs or locators; captures snapshots, searches text, and evaluates page JavaScript; manages dialogs, tabs, cookies, LocalStorage, SessionStorage, and browser sessions; configures network routes; retrieves console messages and requests; creates screenshots, PDFs, traces, and videos; saves or loads state; and attaches to existing browsers.
- A frontend developer validates one end-to-end flow across Chromium, Firefox, and WebKit.
- A coding agent opens a site, fills a form, and interacts with elements identified from a page snapshot.
- A tester captures screenshots, PDFs, traces, or videos for successful and failing scenarios.
- A developer inspects console output, network requests, or element attributes while debugging a web test.
- An automation workflow needs to reuse authentication state, cookies, or browser storage.
What are this skill's strengths and limitations?
- Provides one command-line interface for Chromium, Firefox, and WebKit automation.
- Covers page interaction, tabs, storage, networking, debugging, screenshots, and video.
- Snapshot, `--raw`, and `--json` options support compact or structured workflows.
- Supports named sessions, persistent profiles, mobile emulation, and connections to running browsers.
- The SKILL.md uses `allowed-tools` with `Bash(...)` permission syntax, so other clients may require adaptation.
- The document lists specialized reference files, but their contents are not included in the source provided here.
- The source provides no independent test results, performance data, or platform-specific validation for this skill.
- Browser actions, uploads, screenshots, and network access depend on the local CLI, filesystem, and accessibility of the target page.
How do you install this skill?
The skill is located at packages/playwright-core/src/tools/skills/playwright-cli/SKILL.md in the repository. The README provides npm install -g @playwright/cli@latest for installing the CLI; after installation, playwright-cli install --skills can install the skill collection. If the global command is unavailable, check for a local version with npx --no-install playwright --version and use npx playwright cli. The source does not document client-specific skill-directory installation rules.
How do you use this skill?
Give the coding agent a concrete browser task, for example: Test the "add todo" flow on https://demo.playwright.dev/todomvc using playwright-cli. Take screenshots for all successful and failing scenarios. A typical sequence is playwright-cli open https://example.com, playwright-cli snapshot, playwright-cli click e3, playwright-cli fill e5 "[email protected]", and playwright-cli close. Workflows generally capture a snapshot first, then use its element refs or Playwright locators.
How does this skill compare with similar options?
The README distinguishes Playwright CLI from Playwright Test, Playwright MCP, Playwright Library, and the VS Code Extension: CLI targets coding-agent browser automation from the command line; Playwright Test is an end-to-end test runner; MCP targets AI-agent and LLM-driven automation; Library targets scripts; and the VS Code Extension targets test authoring and debugging in the editor.