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 pwndoc

Automates browser interactions and web page tests through the playwright-cli command line tool. It is aimed at developers and testers who want an AI assistant to drive Playwright browser sessions.

  • Score 94
  • 2.9k 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/pwndoc/pwndoc /tmp/pwndoc && mkdir -p ~/.claude/skills && cp -r /tmp/pwndoc/.claude/skills/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 teaches an AI assistant to control a browser through the playwright-cli command line tool. It covers opening and navigating pages, clicking, typing, filling forms, managing tabs, handling cookies and storage, mocking network routes, and collecting console, network, tracing and video data. After each command it reports the page URL, title and a snapshot of the page state. Elements can be targeted by snapshot ref, CSS selector or Playwright locator.

The skill also supports named browser sessions, several browser types (chrome, firefox, webkit and msedge), persistent profiles and a connection through a browser extension. It links to reference guides for running and debugging Playwright tests, test generation and tracing. It suits developers and testers who want an assistant to automate or check web pages.

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

What it can do

  • Open and navigateOpens browsers and pages with open, goto, reload, go-back and go-forward.
  • Interact with elementsClicks, types, fills, hovers, drags, selects, uploads and checks page elements.
  • SnapshotsThe snapshot command saves the page state with element refs for later actions.
  • Storage managementLists, gets, sets and deletes cookies, localStorage and sessionStorage values.
  • Network mockingUses route and unroute to mock or block requests by URL pattern.
  • DevToolsReads console and network output and runs tracing and video recording.
  • TabsCreates, lists, selects and closes browser tabs.
  • Screenshots and PDFSaves screenshots of the page or an element, and exports the page as a PDF.
  • Browser sessionsRuns named sessions and lists, closes or force-kills browser processes.
  • Playwright test guidesLinks to reference guides for running, debugging and generating Playwright tests.

What you need

  • npm and npx, used to install or run @playwright/cli
  • Bash access, since the skill allows Bash(playwright-cli:*) commands

Try asking

  • Open example.com, fill in the login form and take a snapshot.
  • Mock all .jpg requests with a 404 status and reload the page.
  • Start a trace, click the submit button and stop the trace.

Good to know

  • The browser profile is in-memory by default unless --persistent or --profile is used.
  • Actions depend on snapshot refs or selectors that the assistant must read from the page state.

Security check

A

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

Checked automatically: .claude/skills/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:*) Bash(npx:*) Bash(npm:*)

  • SKILL.md8 KB
  • references/element-attributes.md665 B
  • references/playwright-tests.md2 KB
  • references/request-mocking.md2 KB
  • references/running-code.md5 KB
Show all 10 files
  • references/session-management.md4 KB
  • references/storage-state.md5 KB
  • references/test-generation.md2 KB
  • references/tracing.md3 KB
  • references/video-recording.md5 KB

Alternatives to playwright-cli

All alternatives →

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

playwright-cli: common questions

How does the skill find elements on a page?

By default it uses refs from the snapshot, such as e15. It also accepts CSS selectors and Playwright locators like getByRole or getByTestId.

Which browsers can it open?

The source lists chrome, firefox, webkit and msedge, selected with the --browser option. It can also connect to a browser through an extension with --extension.

Is browser data kept between sessions?

The profile is in-memory by default. Using --persistent or --profile keeps a persistent profile, and delete-data removes user data for the default session.

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 94 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.