Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

playwright-cli

verified

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.

View on GitHub

Marketplace

playwright-cli-agents

yusuftayman/playwright-cli-agents

Plugin

playwright-cli-agents

Repository

yusuftayman/playwright-cli-agents
5stars

plugins/playwright-cli-agents/skills/playwright-cli/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/yusuftayman/playwright-cli-agents/blob/main/plugins/playwright-cli-agents/skills/playwright-cli/SKILL.md -a claude-code --skill playwright-cli

Installation paths:

Claude
.claude/skills/playwright-cli/
Powered by add-skill CLI

Instructions

# Playwright CLI

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

## Installation

```bash
npm install -g @playwright/cli@latest
```

## Core Workflow

```bash
# 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 "hello@example.com"

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

## Command Reference

### Navigation & Core
| Command | Description |
|---------|-------------|
| `playwright-cli open <url>` | Open URL in browser |
| `playwright-cli open <url> --headed` | Open in visible browser |
| `playwright-cli close` | Close browser |
| `playwright-cli snapshot` | Capture accessibility tree with element refs |
| `playwright-cli screenshot [ref]` | Take screenshot (viewport or element) |
| `playwright-cli screenshot --full-page` | Full-page screenshot |
| `playwright-cli pdf` | Save page as PDF |

### Interactions
| Command | Description |
|---------|-------------|
| `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
| Command | Description |
|---------|-------------|
| `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 mousedown` | Mouse button down |
| `playwright-cli mouseup` | Mouse butt

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3918 chars