playwright-cli
Translate natural-language browser automation requests into exact `playwright-cli` commands for interactive web testing and debugging.
Skill by IvanCampos
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ivancampos-playwright-cli
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/playwright-cli
What's inside
- Skill name
playwright-cli- Description
- Translate natural-language browser automation requests into exact `playwright-cli` commands for interactive web testing and debugging. Use when requests involve opening/navigating pages, interacting with elements, capturing snapshots/screenshots/PDFs, using tabs, inspecting console/network, mocking routes, managing cookies/storage/state, configuring browser sessions, or controlling named Playwright CLI sessions.
- License
- MIT
- Instructions
- 107 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- openai.yaml · agents/
- command-map.md · references/
SKILL.md (first lines)
# Playwright CLI
Use `playwright-cli` directly (already installed) to execute browser automation from natural-language requests.
## Quick Start
1. Verify the CLI is available:
```bash
command -v playwright-cli >/dev/null 2>&1
```
2. Open a browser session:
```bash
playwright-cli open https://example.com
```
3. Capture refs before ref-based commands:
```bash
playwright-cli snapshot
```
## Natural-Language Execution Workflow
1. Parse the request into atomic actions.
2. Convert each action to command templates from `references/command-map.md`.
3. Run `playwright-cli snapshot` before commands that require element refs (`click`, `fill`, `check`, `select`, `hover`, `drag`, etc.) unless a fresh snapshot is already available.
4. Re-run `playwright-cli snapshot` after navigation or major DOM changes.
5. For assertions, prefer `playwright-cli eval` and parse the `### Result` value from stdout.
6. Treat `### Error` output as command failure, even when process exit code is `0`.
7. For screenshots, capture PNG first, then compress to JPEG with `ffmpeg` before final save/return.
8. Use explicit filenames when saving artifacts (screenshots, snapshots, PDFs, videos, storage state).
9. Return executed commands and key results (URLs, counts, file paths, errors).
## Command Mapping Rules
- Map intent verbs directly:
- open/launch -> `open`
- navigate -> `goto`
- click/tap -> `click`
- double click/double tap -> `dblclick`
- type/input -> `type`
- fill/set field -> `fill`
- back/forward/refresh -> `go-back`/`go-forward`/`reload`
- Preserve user-provided optional flags and values.
- Omit optional args when unspecified.
- Use `-s=<name>` when the user asks for a named/session-isolated browser.
- Prefer native commands over `eval` and `run-code`; use `eval` or `run-code` only if no first-class command exists.
- Keep session names short and filesystem-safe (lowercase letters + numbers, no punctuation, target <= 12 chars) to avoid local socket path errors on macOS.
## Reliability Guardrails (Must Follow)
- Do not classify pass/fail from shell exit codes for `eval` or `run-code`.
- Always inspect command output:
- If output contains `### Error`, treat as failure.
- If output contains `### Result`, use that value for assertions.
- Prefer `eval` for boolean checks and DOM assertions.
- Use `run-code` for imperative Playwright flows only.
- `run-code` expects a valid JS expression; statements like bare `return ...` or `throw ...` are invalid.
- For JS snippets passed to `eval`, prefer expression-safe patterns:
- Good: `Array.from(...).some(function(x){ ... })`
- Risky in this CLI context: snippets that are parsed as non-expression wrappers.
- When user requests pass and fail screenshots:
- Capture one screenshot per scenario after assertion.
- Capture to temporary PNG, then convert with `ffmpeg` to JPEG as the final artifact.
- Name final files with scenario status prefix, e.g. `pass-<name>.jpg`, `fail-<name>.jpg`.
- Save a machine-readable index file (`results.txt` or JSON) mapping scenario -> status -> final JPEG artifact path.
## Screenshot Compression Rule (Required)
- Always return compressed JPEG screenshots, not raw PNG screenshots.
- Required flow:
1. Capture screenshot to temporary PNG path.
2. Compress to JPEG with `ffmpeg`.
3. Return/report only the JPEG path.
- Default command pattern:
```bash
playwright-cli screenshot --full-page --filename "$TMP_PNG"
ffmpeg -y -i "$TMP_PNG" -q:v 4 "$FINAL_JPG"
```
- If `ffmpeg` is unavailable, stop and report the missing dependency instead of returning an uncompressed PNG.
## Session and Artifact Conventions
- Use default session unless the user requests named sessions.
- Keep multi-step flows in one session for continuity.
- Place generated artifacts in predictable paths when the user does not specify:
- `output/playwright/*.jpg`
- `output/playwright/*.pdf`
- `output/playwright/*.json`
- `output/playwright/*.zip`
## Full Command Coverage
Load `references/command-map.md` when mapping or validating command usage. It contains the complete command catalog for:
- Core
- Navigation
- Keyboard
- Mouse
- Save as
- Tabs
- Storage (state, cookies, localStorage, sessionStorage)
- Network
- DevTools
- Install
- Configuration
- SessionsFrom IvanCampos/agents, MIT.
More from IvanCampos/agents
- 0.469score
screen-recorder
IvanCampos
Record the macOS screen for a fixed duration and always save the .mov in ~/Downloads.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
apple-notes
IvanCampos
Read Apple Notes content and execute checklist-driven automations in order.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
applescript-open-app
IvanCampos
Open, launch, activate, or quit macOS apps by name using AppleScript or osascript.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
confetti
IvanCampos
Trigger a two-step confetti celebration by opening the Raycast confetti URL and speaking a phrase with the Alex voice.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
github
IvanCampos
Use the GitHub CLI (`gh`) to inspect and manage repositories, pull requests, issues, workflows, releases, and API calls from the terminal.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
launchd-non-apple-jobs
IvanCampos
List launchd jobs that are not from Apple and create user launchd jobs.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
opml-reader
IvanCampos
Store OPML files and fetch latest posts across RSS/Atom feeds.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
apple-music-player
IvanCampos
Play random songs or specific tracks in Music.app from the local Music library.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
git-search
IvanCampos
List recent git commits across all repos under ~/Code (excluding .build checkouts).
SkillDFreshness: D★ 5Claude Code +9 - 0.465score
mailapp-send-email
IvanCampos
Send emails through the macOS Mail app using AppleScript.
SkillDFreshness: D★ 5Claude Code +9 - 0.465score
open-meteo-weather
IvanCampos
Get current weather using the Open-Meteo API.
SkillDFreshness: D★ 5Claude Code +9 - 0.461score
ffmpeg-video-editor-h265
IvanCampos
Generate FFmpeg commands from natural language video editing requests - cut, trim, convert, compress, change aspect ratio, extract audio, and more.
SkillDFreshness: D★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 7, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/IvanCampos/agents
- Website
- ivancampos.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from IvanCampos
- 0.469score
apple-music-player
IvanCampos
Play random songs or specific tracks in Music.app from the local Music library.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
applescript-open-app
IvanCampos
Open, launch, activate, or quit macOS apps by name using AppleScript or osascript.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
confetti
IvanCampos
Trigger a two-step confetti celebration by opening the Raycast confetti URL and speaking a phrase with the Alex voice.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
apple-notes
IvanCampos
Read Apple Notes content and execute checklist-driven automations in order.
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
git-search
IvanCampos
List recent git commits across all repos under ~/Code (excluding .build checkouts).
SkillDFreshness: D★ 5Claude Code +9 - 0.469score
github
IvanCampos
Use the GitHub CLI (`gh`) to inspect and manage repositories, pull requests, issues, workflows, releases, and API calls from the terminal.
SkillDFreshness: D★ 5Claude Code +9
Cite this page
playwright-cli skill. Agent Mart. https://agentmart.dev/skills/ivancampos-playwright-cli (last updated 2026-10-24)