Skip to content
Development
Skill

/playwright-cli

Automates browser interactions. Use when navigating websites, interacting with web pages, filling forms, taking screenshots, testing web applications, or extracting data from web pages.

From plugin
rageatc-oss
1045 skills11 agents
Install
$ npx -y skills add isvlasov/rageatc-oss --skill playwright-cli --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/playwright-cli

Context preview

The summary Claude sees to decide when to auto-load this skill.

Automates browser interactions. Use when navigating websites, interacting with web pages, filling forms, taking screenshots, testing web applications, or extracting data from web pages.

SKILL.md

playwright-cli.SKILL.md
name: playwright-cli
description: Automates browser interactions. Use when navigating websites, interacting with web pages, filling forms, taking screenshots, testing web applications, or extracting data from web pages.
allowed-tools: Bash(playwright-cli:*)

Browser Automation with playwright-cli

Workflow: `open` a browser, `goto` a page, read the snapshot the CLI returns, then interact with elements via their refs (`e15`) from that snapshot.

Commands

Core

playwright-cli open
# open and navigate right away
playwright-cli open https://example.com/
playwright-cli goto https://playwright.dev
playwright-cli type "search query"
playwright-cli click e3
playwright-cli dblclick e7
playwright-cli fill e5 "user@example.com"
playwright-cli drag e2 e8
playwright-cli drop e5 --path=./file.png   # drop files onto an element from outside the page
playwright-cli drop e5 --data="k=v"        # drop data onto an element
playwright-cli hover e4
playwright-cli select e9 "option-value"
playwright-cli upload ./document.pdf
playwright-cli check e12
playwright-cli uncheck e12
playwright-cli snapshot
playwright-cli snapshot --filename=after-click.yaml
playwright-cli eval "document.title"
playwright-cli eval "el => el.textContent" e5
playwright-cli dialog-accept
playwright-cli dialog-accept "confirmation text"
playwright-cli dialog-dismiss
playwright-cli resize 1920 1080
playwright-cli close

Navigation

playwright-cli go-back
playwright-cli go-forward
playwright-cli reload

Keyboard

playwright-cli press Enter
playwright-cli press ArrowDown
playwright-cli keydown Shift
playwright-cli keyup Shift

Mouse

playwright-cli mousemove 150 300
playwright-cli mousedown
playwright-cli mousedown right
playwright-cli mouseup
playwright-cli mouseup right
playwright-cli mousewheel 0 100

Save as

playwright-cli screenshot
playwright-cli screenshot e5
playwright-cli screenshot --filename=page.png
playwright-cli screenshot --hires        # full device pixel ratio
playwright-cli pdf --filename=page.pdf

Tabs

playwright-cli tab-list
playwright-cli tab-new
playwright-cli tab-new https://example.com/page
playwright-cli tab-close
playwright-cli tab-close 2
playwright-cli tab-select 0

Storage

playwright-cli state-save
playwright-cli state-save auth.json
playwright-cli state-load auth.json

# Cookies
playwright-cli cookie-list
playwright-cli cookie-list --domain=example.com
playwright-cli cookie-get session_id
playwright-cli cookie-set session_id abc123
playwright-cli cookie-set session_id abc123 --domain=example.com --httpOnly --secure
playwright-cli cookie-delete session_id
playwright-cli cookie-clear

# LocalStorage — same verbs exist for sessionstorage-*
playwright-cli localstorage-list
playwright-cli localstorage-get theme
playwright-cli localstorage-set theme dark
playwright-cli localstorage-delete theme
playwright-cli localstorage-clear

Network

playwright-cli route "**/*.jpg" --status=404
playwright-cli route "https://api.example.com/**" --body='{"mock": true}'
playwright-cli route-list
playwright-cli unroute "**/*.jpg"
playwright-cli unroute

DevTools

playwright-cli console
playwright-cli console warning
playwright-cli network
playwright-cli show              # open browser devtools
playwright-cli devtools-start    # alias for show
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli tracing-start
playwright-cli tracing-stop
playwright-cli video-start
playwright-cli video-stop video.webm

Open parameters

# Browser runs headless by default. Pass --headed to open a visible browser window.
# This is a session-creation flag — it cannot be toggled after open.
playwright-cli open --headed
playwright-cli open --headed https://example.com/
playwright-cli open --headed --browser=firefox https://example.com/

# Use --no-sandbox when running in restricted environments (containers, CI)
playwright-cli open --no-sandbox

# Use specific browser when creating session
playwright-cli open --browser=chrome
playwright-cli open --browser=firefox
playwright-cli open --browser=webkit
playwright-cli open --browser=msedge

# Use persistent profile (by default profile is in-memory)
playwright-cli open --persistent
# Use persistent profile with custom directory
playwright-cli open --profile=/path/to/profile

# Start with config file (default: .playwright/cli.config.json)
playwright-cli open --config=my-config.json

# Close the browser
playwright-cli close
# Delete user data for the default session
playwright-cli delete-data

Attach to an existing browser

playwright-cli attach --extension=chrome   # connect via Playwright Extension
playwright-cli attach --cdp=chrome         # attach to running Chrome/Edge by channel
playwright-cli attach --cdp=<url>          # attach via CDP endpoint
playwright-cli detach                      # detach, leaving the external browser running

Install browsers

Install browsers that are not already available. Required when using Firefox or WebKit on a fresh system.

playwright-cli install-browser
playwright-cli install-browser --browser=firefox
playwright-cli install-browser --browser=webkit

Snapshots

After each command, playwright-cli provides a snapshot of the current browser state.

> playwright-cli goto https://example.com
### Page
- Page URL: https://example.com/
- Page Title: Example Domain
### Snapshot
[Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml)

You can also take a snapshot on demand with `playwright-cli snapshot`. If `--filename` is not provided, a new snapshot file is created with a timestamp. Default to automatic naming; use `--filename=` when the artifact is part of the workflow result.

Browser Sessions

# create new browser session named "mysession" with persistent profile
playwright-cli -s=mysession
Read more
Ships withrageatc-oss

Rage Against The C - pick your own C to rage against. Two plugins for Claude Code / Cowork, built on the idea that we're using AI wrong: the speed of its output tricks us into rushing the input.

Get the whole plugin

Other skills on rageatc-oss.