playwright-cli

Automate browser interactions, testing, and network mocking via the Playwright CLI.

96|11|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/thefrederiksen/devthrottle --skill playwright-cli-thefrederiksen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/thefrederiksen/devthrottle/tree/main/.claude/skills/playwright-cli
Command: npx skills add https://github.com/thefrederiksen/devthrottle --skill playwright-cli-thefrederiksen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright-cli, and includes references (resource) components.

What problem does it solve? Manually driving a browser for testing, scraping, or form submission is slow and token-expensive when done through screenshot-heavy tools. This Skill automates browser tasks through the Playwright CLI, saving accessibility-tree snapshots to disk and sending only compact summaries to the LLM, which cuts token usage by over 90,000 tokens compared to Playwright MCP. ## Core Features & Use Cases - Full browser automation: Open pages, click, fill forms, navigate, manage tabs, and take snapshots or screenshots using element refs from snapshots. - Session and state management: Run multiple isolated named browser sessions in parallel, persist profiles, and save or restore cookies, localStorage, and sessionStorage. - Network mocking and debugging: Intercept and mock requests, capture console and network logs, record traces and videos, and generate Playwright test code from your interactions. - Use Case: Test a login flow on your staging site by opening the page, filling the email and password fields via snapshot refs, clicking submit, saving the authenticated state to a file, and reusing it in later runs. ## Quick Start Use the playwright-cli skill to open https://example.com, fill in the login form, and take a snapshot of the result.

Frequently Asked Questions about playwright-cli

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

FAQPage Schema
How do I automate browser tasks with Playwright CLI?▼

Run playwright-cli open with a URL, then use snapshot to get element refs and commands like click, fill, and type to interact with the page. If the binary is not on PATH, prefix commands with npx playwright-cli.

When should I use Playwright CLI vs cc-browser?▼

Use Playwright CLI for sites without bot detection such as dev servers, staging, and public docs, since it is faster and far cheaper in tokens. Use cc-browser for bot-protected sites like LinkedIn, Reddit, or Cloudflare-gated pages that detect automation.

Can Playwright CLI run multiple browser sessions in parallel?▼

Yes, use the -s flag to create named sessions with isolated cookies, storage, cache, and tabs. Commands like playwright-cli -s=mysession open let you run concurrent scraping or A/B testing sessions.

How do I mock network requests in Playwright CLI?▼

Use playwright-cli route with a URL pattern and options like --status, --body, or --header to mock responses. For conditional logic or response modification, use run-code with page.route in custom Playwright code.

Does Playwright CLI work on sites with CAPTCHA or bot detection?▼

No, its bundled Chromium is easily detected by anti-bot systems through browser fingerprints and WebDriver flags. For protected sites, switch to cc-browser, which uses real browser profiles with human-like delays.

How do I save and reuse login state with Playwright CLI?▼

After logging in, run playwright-cli state-save auth.json to capture cookies and localStorage. Later, restore it with playwright-cli state-load auth.json before navigating, skipping the login flow entirely.