playwright
A CLI-based browser automation tool for developers to navigate, interact with, and extract data from web pages.
Install
mkdir -p .claude/skills/playwright-plastikaweb && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13831" && unzip -o skill.zip -d .claude/skills/playwright-plastikaweb && rm skill.zipInstalls to .claude/skills/playwright-plastikaweb
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.
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` or the bundled wrapper script.Key capabilities
- →Open web pages with a real browser.
- →Capture snapshots of the DOM to get element references.
- →Interact with UI elements like clicking and typing.
- →Capture screenshots of web pages.
- →Start and stop tracing for UI flow debugging.
- →Manage multiple browser tabs.
How it works
The skill uses a wrapper script to execute `playwright-cli` commands, enabling browser automation from the terminal. It follows a core workflow of opening pages, taking snapshots, interacting with elements, and re-snapshotting after changes.
Inputs & outputs
When to use playwright
- →Extract data from dynamic websites
- →Debug UI flow issues
- →Automate form submission
- →Capture screenshots of specific page states
About this skill
Playwright CLI Skill
Drive a real browser from the terminal using playwright-cli. Prefer the bundled wrapper script so the CLI works even when it is not globally installed.
Treat this skill as CLI-first automation. Do not pivot to @playwright/test unless the user explicitly asks for test files.
Prerequisite check (required)
Before proposing commands, check whether npx is available (the wrapper depends on it):
command -v npx >/dev/null 2>&1
If it is not available, pause and ask the user to install Node.js/npm (which provides npx). Provide these steps verbatim:
# Verify Node/npm are installed
node --version
npm --version
# If missing, install Node.js/npm, then:
npm install -g @playwright/mcp@latest
playwright-cli --help
Once npx is present, proceed with the wrapper script. A global install of playwright-cli is optional.
Skill path (set once)
export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export PWCLI="$CODEX_HOME/skills/playwright/scripts/playwright_cli.sh"
User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).
Quick start
Use the wrapper script:
"$PWCLI" open https://playwright.dev --headed
"$PWCLI" snapshot
"$PWCLI" click e15
"$PWCLI" type "Playwright"
"$PWCLI" press Enter
"$PWCLI" screenshot
If the user prefers a global install, this is also valid:
npm install -g @playwright/mcp@latest
playwright-cli --help
Core workflow
- Open the page.
- Snapshot to get stable element refs.
- Interact using refs from the latest snapshot.
- Re-snapshot after navigation or significant DOM changes.
- Capture artifacts (screenshot, pdf, traces) when useful.
Minimal loop:
"$PWCLI" open https://example.com
"$PWCLI" snapshot
"$PWCLI" click e3
"$PWCLI" snapshot
When to snapshot again
Snapshot again after:
- navigation
- clicking elements that change the UI substantially
- opening/closing modals or menus
- tab switches
Refs can go stale. When a command fails due to a missing ref, snapshot again.
Recommended patterns
Form fill and submit
"$PWCLI" open https://example.com/form
"$PWCLI" snapshot
"$PWCLI" fill e1 "[email protected]"
"$PWCLI" fill e2 "password123"
"$PWCLI" click e3
"$PWCLI" snapshot
Debug a UI flow with traces
"$PWCLI" open https://example.com --headed
"$PWCLI" tracing-start
# ...interactions...
"$PWCLI" tracing-stop
Multi-tab work
"$PWCLI" tab-new https://example.com
"$PWCLI" tab-list
"$PWCLI" tab-select 0
"$PWCLI" snapshot
Wrapper script
The wrapper script uses npx --package @playwright/mcp playwright-cli so the CLI can run without a global install:
"$PWCLI" --help
Prefer the wrapper unless the repository already standardizes on a global install.
References
Open only what you need:
- CLI command reference:
references/cli.md - Practical workflows and troubleshooting:
references/workflows.md
Guardrails
- Always snapshot before referencing element ids like
e12. - Re-snapshot when refs seem stale.
- Prefer explicit commands over
evalandrun-codeunless needed. - When you do not have a fresh snapshot, use placeholder refs like
eXand say why; do not bypass refs withrun-code. - Use
--headedwhen a visual check will help. - When capturing artifacts in this repo, use
output/playwright/and avoid introducing new top-level artifact folders. - Default to CLI commands and workflows, not Playwright test specs.
When not to use it
- →When `npx` is not available on the system.
- →When the task requires writing Playwright test files instead of CLI automation.
- →When the task does not involve automating a real browser from the terminal.
Prerequisites
Limitations
- →The skill requires `npx` to be available.
- →The skill defaults to CLI commands and workflows, not Playwright test specs.
- →The skill requires re-snapshotting after significant DOM changes.
How it compares
This skill provides a CLI-first approach to browser automation using Playwright, allowing direct interaction from the terminal without writing full test scripts.
Compared to similar skills
playwright side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| playwright (this skill) | 0 | 6mo | Review | Intermediate |
| dev-browser | 53 | 4mo | Review | Intermediate |
| agent-browser | 30 | 3mo | Review | Intermediate |
| browser-tools | 6 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by plastikaweb
View all by plastikaweb →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.
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.
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.
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.
agent-browser-skill
MGdaasLab
基于 agent-browser CLI 的浏览器自动化工具。提供快照获取、元素交互、截图等功能。推荐用于需要页面快照分析、通过 ref 引用交互元素的场景。
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.