Skip to content
Skills Library
Programming · Automation

playwright-cli

/playwright-cli

Browser automation via Playwright CLI — UI testing, form filling, screenshots, scraping. Token-efficient alternative to MCP. Use when user asks to test UI, automate browser, take screenshots, fill forms, or scrape web pages.

Repository
keiseikit ↗
Licence
Apache-2.0
Last repository change
19.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 19.07.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Browser automation via Playwright CLI — UI testing, form filling, screenshots, scraping. Token-efficient alternative to MCP. Use when user asks to test UI, automate browser, take screenshots, fill forms, or scrape web pages.

Original author description

Browser automation via Playwright CLI — UI testing, form filling, screenshots, scraping. Token-efficient alternative to MCP. Use when user asks to test UI, automate browser, take screenshots, fill forms, or scrape web pages.

How it works

  1. When to use
  2. Overview
  3. Key Workflow Pattern
  4. Essential Commands
  5. Parallel UI Testing Pattern
  6. Tips
Original SKILL.md headings · 110 lines, 641 words
SKILL.md preview
---
name: playwright-cli
description: Browser automation via Playwright CLI — UI testing, form filling, screenshots, scraping. Token-efficient alternative to MCP. Use when user asks to test UI, automate browser, take screenshots, fill forms, or scrape web pages.
---

# Browser Automation with playwright-cli

## When to use

- Automating browser tasks: UI testing, form filling, taking screenshots, or scraping web pages.
- Token-efficient alternative to the Playwright MCP — saves ~90K tokens per task by passing only an accessibility-tree summary.
- Any task asking to "test UI", "automate browser", "take a screenshot", "fill a form", or "scrape a page".

## Overview

`playwright-cli` is a token-efficient CLI tool for browser automation. It saves the accessibility tree to disk and only passes a summary to the agent — ~90K tokens cheaper than MCP per task.

**Run via:** `npx @playwright/cli <command>` (installed globally would be just `playwright-cli <command>`)

## Key Workflow Pattern

```
1. npx @playwright/cli open [url]     — launch browser (headless by default)
2. npx @playwright/cli snapshot       — get accessibility tree, identify element refs
3. npx @playwright/cli click <ref>    — interact using refs from snapshot
4. npx @playwright/cli screenshot     — capture result
5. npx @playwright/cli close          — cleanup
```

**For headed (visible) browser:** `npx @playwright/cli open --headed [url]`

## Essential Commands

### Opening & Navigation
- `open [url]` — launch browser (add `--headed` to see it)
- `goto <url>` — navigate to URL
- `go-back` / `go-forward` — browser history
- `close` — close browser session

### Page Interaction (use refs from `snapshot`)
- `click <ref>` — click element
- `dblclick <ref>` — double click
- `fill <ref> <text>` — fill input field
- `type <text>` — type text into focused element
- `select <ref> <value>` — select dropdown option
- `check <ref>` / `uncheck <ref>` — checkboxes
- `hover <ref>` — hover over element
- `drag <startRef> <endRef>` — drag and drop
- `upload <file>` — file upload

### Inspection
- `snapshot` — capture page accessibility tree, get element refs
- `screenshot` — take screenshot (saved to disk)
- `pdf` — export page as PDF

### Keyboard & Mouse
- `press <key>` — press key (Enter, Tab, etc.)
- `keydown <key>` / `keyup <key>` — key press/release
- `mousemove <x> <y>` / `mousedown` / `mouseup` / `mousewheel`

### Storage & Cookies
- `cookie-list` / `cookie-get <name>` / `cookie-set` / `cookie-delete`
- `localstorage-list` / `localstorage-get` / `localstorage-set` / `localstorage-delete`
- `sessionstorage-list` / `sessionstorage-get` / `sessionstorage-set`

### Network
- `route <pattern>` — mock network requests
- `route-list` — list active mocks
- `unroute [pattern]` — remove mocks
- `network` — list all network requests

### DevTools & Recording
- `console [min-level]` — list console messages
- `eval <func> [ref]` — evaluate JS on page or element
- `run-code <code>` — run Playwright code snippet
- `tracing-start` / `tracing-stop` — trace recording
- `video-start` / `video-stop` — video recording

### Session Management
- `list` — list browser sessions
- `close-all` — close all sessions
- `kill-all` — force kill stale sessions
- Use `-s=<session>` flag to work with named sessions (parallel testing)

### Browser Options
- Chrome (default), Firefox, WebKit, Edge
- `--browser=firefox` to use different browser
- Persistent profiles supported

## Parallel UI Testing Pattern

For parallel sub-agent testing (recommended for form/UI validation):

```
Prompt to Claude Code:
"Use playwright-cli to test [feature]. Run 3 parallel sub-agents:
1. Happy path — valid inputs, expected flow
2. Edge cases — empty fields, special characters, very long input
3. Validation — invalid email, missing required fields, XSS attempts

Use headed browsers so I can see. Take screenshots of results."
```

Each sub-agent gets its own session via `-s=<name>` flag.

## Tips

- **Default is headless** — add `--headed` to `open` command to see the browser
- **Always `snapshot` first** — to get element refs before interacting
- **Sessions for parallelism** — use `-s=agent1`, `-s=agent2` etc. for parallel agents
- **Screenshots for evidence** — always take screenshots of test results
- **Close sessions** — always `close` or `close-all` when done
- **Token efficiency** — CLI saves accessibility tree to disk, only passes summary to agent

Versions

RepositoryScoreLicence
This page · keiseilab/keiseikit100Apache-2.0
atc-net/atc-agentic-toolkit100MIT
thefrederiksen/devthrottle100MIT
zebbern/claude-code-guide100MIT
sanity-io/sanity100MIT
fugazi/test-automation-skills-agents100MIT
laurigates/claude-plugins100MIT
ulises-jeremias/agent-toolkit100MIT
testdino-hq/playwright-skill100MIT

Database snapshot: 13.11.2026 · package version 244b2add3edc (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100agent-browser
    Browser automation using Vercel's agent-browser CLI. Use when you need to interact with web pages, fill forms, take screenshots, or scrape data. Alternative to Playwright MCP - uses Bash commands with ref-based element selection. Triggers on "browse website", "fill form", "click…
  • 100ac-qa-playwright-cli
    Browser automation via playwright-cli. Token-efficient alternative to Playwright MCP - uses CLI commands through Bash instead of MCP tool schemas. Supports navigation, interaction, screenshots, video recording, and session management. Triggers on keywords: browser, e2e,…
  • 100playwright
    Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli`.
  • 100playwright-automation
    Browser automation via Playwright for web testing, screenshots, form filling, scraping, and verification. Use when tasks require navigating websites, interacting with web pages, or testing web applications.
  • 100playwright-testing
    UI/E2E test automation with Playwright MCP. Use when the user asks to "test the UI", "automate browser tests", "check the page", "take a screenshot", "run Playwright", "write E2E tests", or anything about browser-based testing.
  • 100playwright
    Provides Playwright-based browser automation and E2E testing. Supports screenshots, web scraping, and form automation. Use for "브라우저", "스크린샷", "E2E 테스트", "웹 스크래핑" requests.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.