PL

playwright-cli

Automates browser-based tasks like form filling, site navigation, and visual testing through CLI commands.

Install

mkdir -p .claude/skills/playwright-cli-yusuftayman && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18121" && unzip -o skill.zip -d .claude/skills/playwright-cli-yusuftayman && rm skill.zip

Installs to .claude/skills/playwright-cli-yusuftayman

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
258 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Beginner

Key capabilities

  • Open a URL in a browser
  • Capture accessibility tree with element refs
  • Interact with elements using refs (click, fill, type)
  • Take screenshots of the viewport or elements
  • Save page as PDF
  • Execute JavaScript in the browser context

How it works

The skill uses the Playwright CLI to automate browser interactions, allowing navigation, element interaction, and content capture through command-line commands.

Inputs & outputs

You give it
A URL, element references, or JavaScript code
You get back
Browser actions, snapshots, screenshots, PDF files, or executed JavaScript results

When to use playwright-cli

  • Capture automated screenshots
  • Test form submissions
  • Extract data from web elements
  • Navigate through authenticated workflows

About this skill

Playwright CLI

A token-efficient CLI for browser automation. Use Bash tool to run these commands.

Installation

npm install -g @playwright/cli@latest

Core Workflow

# 1. Open a page
playwright-cli open https://example.com

# 2. Capture snapshot (accessibility tree with element refs)
playwright-cli snapshot

# 3. Interact using refs from snapshot
playwright-cli click e15
playwright-cli fill e20 "[email protected]"

# 4. Re-snapshot to verify state
playwright-cli snapshot

Command Reference

Navigation & Core

CommandDescription
playwright-cli open <url>Open URL in browser
playwright-cli open <url> --headedOpen in visible browser
playwright-cli closeClose browser
playwright-cli snapshotCapture accessibility tree with element refs
playwright-cli screenshot [ref]Take screenshot (viewport or element)
playwright-cli screenshot --full-pageFull-page screenshot
playwright-cli pdfSave page as PDF

Interactions

CommandDescription
playwright-cli click <ref>Click element
playwright-cli fill <ref> "<text>"Fill input field
playwright-cli type "<text>"Type text sequentially
playwright-cli hover <ref>Hover over element
playwright-cli select <ref> "<value>"Select dropdown option
playwright-cli check <ref>Check checkbox
playwright-cli uncheck <ref>Uncheck checkbox
playwright-cli upload <ref> <file>Upload file
playwright-cli drag <startRef> <endRef>Drag and drop

Keyboard & Mouse

CommandDescription
playwright-cli press <key>Press key (e.g., Enter, ArrowDown)
playwright-cli keydown <key>Key down
playwright-cli keyup <key>Key up
playwright-cli mousemove <x> <y>Move mouse
playwright-cli mousedownMouse button down
playwright-cli mouseupMouse button up

Navigation

CommandDescription
playwright-cli go-backGo back
playwright-cli go-forwardGo forward
playwright-cli reloadReload page

Tabs

CommandDescription
playwright-cli tab-listList tabs
playwright-cli tab-new [url]Open new tab
playwright-cli tab-close [index]Close tab
playwright-cli tab-select <index>Switch to tab

DevTools

CommandDescription
playwright-cli consoleView console messages
playwright-cli networkView network requests
playwright-cli eval "<js>"Execute JavaScript
playwright-cli run-code "<js>"Run Playwright code

Dialogs

CommandDescription
playwright-cli dialog-acceptAccept dialog
playwright-cli dialog-dismissDismiss dialog

Tracing & Video

CommandDescription
playwright-cli tracing-startStart trace recording
playwright-cli tracing-stopStop trace recording
playwright-cli video-startStart video recording
playwright-cli video-stopStop video recording

Sessions

CommandDescription
playwright-cli open <url> --session=<name>Use named session
playwright-cli session-listList sessions
playwright-cli session-stop <name>Stop session
playwright-cli session-delete <name>Delete session

Snapshot Output

When you run playwright-cli snapshot, you get an accessibility tree:

- button "Create Strategy" [ref: e12]
- textbox "Search" [ref: e13]
- grid [ref: e14]
- button "Filters" [ref: e15]

Use the ref values (e.g., e12) to interact with elements.

Configuration

Create playwright-cli.json for custom settings:

{
  "browser": "chromium",
  "headless": false,
  "timeout": 30000
}

When not to use it

  • When not needing to automate browser interactions
  • When not performing web testing, form filling, or data extraction
  • When not needing to capture screenshots or interact with web pages

Prerequisites

@playwright/cli@latest

Limitations

  • Requires `npm install -g @playwright/cli@latest`
  • Interactions are based on element references from snapshots
  • Configuration is done via `playwright-cli.json`

How it compares

This skill provides a command-line interface for browser automation, enabling scripting of web interactions without writing full Playwright code, which differs from manual browser usage or complex test frameworks.

Compared to similar skills

playwright-cli side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
playwright-cli (this skill)05moReviewBeginner
dev-browser534moReviewIntermediate
agent-browser302moReviewIntermediate
browser-tools68moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

dev-browser

SawyerHood

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

53176

agent-browser

vercel-labs

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

3075

browser-tools

Whamp

Lightweight Chrome automation toolkit with shared configuration, JSON-first output, and six focused scripts for starting, navigating, inspecting, capturing, evaluating, and cleaning up browser sessions.

694

browser

cexll

This skill should be used for browser automation tasks using Chrome DevTools Protocol (CDP). Triggers when users need to launch Chrome with remote debugging, navigate pages, execute JavaScript in browser context, capture screenshots, or interactively select DOM elements. No MCP server required.

346

agent-browser-skill

MGdaasLab

基于 agent-browser CLI 的浏览器自动化工具。提供快照获取、元素交互、截图等功能。推荐用于需要页面快照分析、通过 ref 引用交互元素的场景。

439

browserwing-executor

browserwing

Control browser automation through HTTP API. Supports page navigation, element interaction (click, type, select), data extraction, accessibility snapshot analysis, screenshot, JavaScript execution, and batch operations.

27

Search skills

Search the agent skills registry