Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
appautomaton avatar

Playwright Cli

  • 6 installs
  • 18 repo stars
  • Updated May 17, 2026
  • appautomaton/webmaton

playwright-cli is a Claude skill exposing a token-efficient shell interface to Playwright for browser automation, inspection, test debugging and test-code generation.

About

playwright-cli is a shell interface to Playwright that keeps browser state across commands and exposes page snapshots with stable element refs. A developer uses it to open or attach to browser sessions, click, type and fill forms, inspect console, network and storage, run snippets, capture screenshots or traces, and debug Playwright tests. It prints the Playwright code it ran so interactions can be turned into test code. It is not meant for static HTTP fetches, JSON APIs or simple web search.

  • Token-efficient shell interface to Playwright that keeps browser state across commands
  • Snapshots expose stable element refs like e15 for reliable click/type/fill
  • Prints the Playwright code it ran so interactions convert into tests

Playwright Cli by the numbers

  • 6 all-time installs (skills.sh)
  • Ranked #1,591 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

playwright-cli capabilities & compatibility

Capabilities
nodriver browser · html to markdown
Works with
playwright · chrome
Use cases
testing · debugging · web scraping
Runs
Runs locally
Pricing
Free
From the docs

What playwright-cli says it does

`playwright-cli` is a token-efficient shell interface to Playwright.
SKILL.md
prints the Playwright code it ran so the interaction can be converted into tests.
SKILL.md
npx skills add https://github.com/appautomaton/webmaton --skill playwright-cli

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs6
repo stars18
Last updatedMay 17, 2026
Repositoryappautomaton/webmaton

What it does

Drive Playwright browser sessions from the shell to inspect, interact, debug tests and generate reliable Playwright test code.

Who is it for?

repeatable browser workflows and Playwright test work

Skip if: static HTTP fetches, JSON APIs, or simple web search

When should I use this skill?

a task needs Playwright browser sessions, form filling, test debugging, traces, screenshots or generated test code

What you get

Stateful browser sessions with stable element refs plus the Playwright code needed to turn interactions into tests.

  • browser session state
  • page snapshots with refs
  • screenshots and traces

By the numbers

  • ships 10 reference docs for CLI, tests, tracing and more

Files

SKILL.mdMarkdownGitHub ↗

playwright-cli

playwright-cli is a token-efficient shell interface to Playwright. It keeps browser state across commands, exposes page snapshots with stable element refs such as e15, and prints the Playwright code it ran so the interaction can be converted into tests.

Core Workflow

playwright-cli open https://example.com
playwright-cli snapshot
playwright-cli click e15
playwright-cli fill e5 "user@example.com"
playwright-cli press Enter
playwright-cli close

Use refs from the latest snapshot by default. Re-run snapshot after navigation, major DOM changes, or a failed ref action. Use CSS selectors or Playwright locators only when refs are unavailable or unstable.

Operating Rules

  • Discover exact syntax with playwright-cli --help and playwright-cli <command> --help; the CLI changes quickly.
  • Use --raw when piping values into other tools. Use --json only if the installed CLI advertises it.
  • Use named sessions with -s=<name> for concurrent or long-lived work.
  • Use open --persistent only when disk-persisted cookies/storage are needed.
  • Prefer attach --cdp=chrome, attach --cdp=msedge, or attach --cdp=http://127.0.0.1:9222 when the task needs an existing browser/session.
  • Close sessions when finished. Reserve close-all and kill-all for cleanup of stale sessions.

Common Tasks

playwright-cli open https://example.com --browser=chrome
playwright-cli snapshot --depth=4
playwright-cli screenshot --filename=page.png
playwright-cli console warning
playwright-cli network --filter="/api/.*" --request-headers
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli tracing-start
playwright-cli tracing-stop

For a broader command map, read references/cli-reference.md.

Playwright Test Debugging

When a Playwright test fails, prefer the CLI debug workflow:

PLAYWRIGHT_HTML_OPEN=never npx playwright test --debug=cli
# wait for "Debugging Instructions", then attach to the printed session
playwright-cli attach tw-abcdef

Keep the test process running while inspecting the paused page. Use snapshots, console/network inspection, and generated Playwright code to identify the fix.

References

Load only what the task needs:

  • references/cli-reference.md — command groups, output modes, and version-sensitive features
  • references/playwright-tests.md — running and debugging Playwright tests
  • references/request-mocking.md — route mocking and request interception
  • references/running-code.md — custom Playwright snippets with run-code
  • references/session-management.md — named sessions and cleanup
  • references/storage-state.md — cookies, localStorage, sessionStorage, auth state
  • references/test-generation.md — turning CLI output into tests
  • references/tracing.md — trace capture and inspection
  • references/video-recording.md — WebM recording and chapter markers
  • references/element-attributes.md — inspect IDs/classes/data attributes not shown in snapshots

Related skills

FAQ

Can it generate tests?

Yes, it prints the Playwright code it ran so interactions can be converted into tests, and has a test-generation reference.

Can it attach to an existing browser?

Yes, via attach --cdp=chrome, --cdp=msedge, or a CDP endpoint like http://127.0.0.1:9222.

Testing & QAtestingintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.