Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

playwright-cli

Skill by zebbern

Automates browser interactions for web testing, form filling, screenshots and data extraction through playwright-cli. Built for AI assistants and users who need browser automation without writing a script file.

  • Score 88
  • 4.7k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install playwright-cli

Built from the published package, never by AI.

git clone --depth 1 https://github.com/zebbern/claude-code-guide /tmp/claude-code-guide && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-guide/skills/playwright/playwright-cli ~/.claude/skills/playwright-cli

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install playwright-cli in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

playwright-cli is an agent skill that lets an AI assistant drive a browser from the command line. It covers navigation, clicking and form filling, screenshots and PDFs, cookie and storage handling, network mocking, tracing, and generating test code. The skill works through snapshots: the assistant runs snapshot to list page elements with refs such as e1 or e5, then acts on those refs.

The SKILL.md file sets golden rules, such as taking a snapshot before interacting, using fill for inputs, saving auth state after login, and mocking only third-party APIs. It also includes a command reference and a guide index covering multi-session management, device emulation and running custom Playwright code. It suits testers and developers who want browser automation driven step by step from the command line.

Written from the project's SKILL.md and checked against it.

What it can do

  • snapshotShows page elements with refs so the assistant can target them.
  • click, fill, selectClicks elements and fills or selects form inputs by ref.
  • screenshot, pdf, video-startCaptures screenshots, saves pages as PDF and records video.
  • routeIntercepts matching network requests for mocking.
  • state-save, state-loadSaves and restores cookies and localStorage, such as after login.
  • tracing-start, tracing-stopRecords a trace to help debug a failing step.
  • run-codeExecutes Playwright API code when CLI commands are not enough.
  • Named sessions (-s=name)Isolates cookies, storage and tabs for parallel work.
  • tab-new, tab-selectOpens, switches and closes browser tabs.

What you need

  • playwright-cli installed
  • Browser installed with playwright-cli install-browser

Try asking

  • Open example.com, take a snapshot and fill in the contact form
  • Take a screenshot of the checkout page as checkout-step3.png
  • Trace the login flow and save the auth state to auth.json

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/playwright/playwright-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: Bash(playwright-cli:*)

  • SKILL.md9 KB
  • advanced-workflows.md18 KB
  • core-commands.md11 KB
  • device-emulation.md13 KB
  • request-mocking.md10 KB
Show all 11 files
  • running-custom-code.md15 KB
  • screenshots-and-media.md10 KB
  • session-management.md10 KB
  • storage-and-auth.md11 KB
  • test-generation.md11 KB
  • tracing-and-debugging.md12 KB

Alternatives to playwright-cli

All alternatives →

Compare with antigravity-workflows, e2e-testing-patterns or upgrade-browser

playwright-cli: common questions

What does playwright-cli do?

It lets an AI assistant automate a browser through CLI commands for navigation, form filling, screenshots, network mocking and test code generation.

How does the assistant find elements on a page?

The assistant runs snapshot to list interactive elements with refs such as e1 or e2, then uses those refs in commands like click and fill.

Can it keep a logged-in session between runs?

Yes. The source says to run state-save after login and state-load later to skip login, and --persistent keeps cookies and storage across restarts.

How do I install playwright-cli?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is playwright-cli free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is playwright-cli safe to use?

It scores 88 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to playwright-cli?

Similar skills: antigravity-workflows, e2e-testing-patterns, upgrade-browser, browser-automation.

playwright-cli Install

Add to stack

Loading.