playwright-cli

Controls headless Chromium browsers via the Playwright CLI daemon for page interaction and observation.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/peachest/skills --skill playwright-cli-peachest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/peachest/skills/tree/main/in-progress/playwright-cli
Command: npx skills add https://github.com/peachest/skills --skill playwright-cli-peachest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/cli, playwright, and includes scripts (resource) components.

What problem does it solve? Coding agents on proxied, sandboxed cluster nodes cannot reliably open, click, read, or watch real web pages; this Skill provides a daemon-based Playwright CLI workflow with verified workarounds for proxy hijacks, sandbox flags, and self-signed certificates. ## Core Features & Use Cases - Daemon-driven browser control: Launch a persistent headless Chromium session, snapshot the accessibility tree, and operate on element refs (fill, click, goto) deterministically. - Live observation: Attach to the daemon over CDP and stream the rendered page as an MJPEG feed, or capture Playwright traces for post-hoc debugging. - Node-specific pitfall fixes: Documented, experiment-verified solutions for corporate proxy tunneling failures, --config scoping rules, and one-shot open behavior. - Use Case: You need to log into an internal self-signed web portal from a cluster node, fill a form, and watch the page render live in your local browser while the agent works. ## Quick Start Ask the agent to open an internal web app in a headless browser with the playwright-cli skill, log in, and stream the page so you can watch it live.

Frequently Asked Questions about playwright-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I control a headless browser from a coding agent?▼

Use the @playwright/cli daemon: the first open command launches a persistent browser, and each command prints an accessibility-tree snapshot with element refs like f1e10. Follow-up commands such as fill and click operate on those refs deterministically.

How to watch a headless Playwright browser live?▼

Attach to the daemon browser over CDP using chromium.connectOverCDP and start a screencast. The screencast-mjpeg.js script serves an MJPEG feed over HTTP that you can open in a local browser after forwarding the port.

Why does Chromium fail behind a corporate proxy when curl works?▼

Chromium picks up http_proxy and CONNECT-tunnels internal IPs, and some proxies cut tunnels mid-TLS causing ERR_CONNECTION_CLOSED. Fix it by adding target IPs to no_proxy or clearing proxy environment variables when spawning the browser.

Does playwright-cli --config apply to every command?▼

No, --config only applies to commands that launch or relaunch the browser, such as open or state-load followed by open. Plain snapshot, goto, and tab-list commands reject it because config is baked into the daemon at open time.

When should I use a raw Playwright script instead of the CLI?▼

Use a raw node script against the playwright library when the CLI cannot express the task, such as bulk capture, response-body harvesting, WebSocket frames, or performance metrics. The same proxy sanitization and --no-sandbox rules apply.