Skip to content
Security
Skill

/openai-playwright

Use when the task requires automating a real browser from the terminal (navigation, form

From plugin
skills-curated
54231 skills1 agent4 commands

Claude Code

$ npx -y skills add trailofbits/skills-curated --skill openai-playwright --agent claude-code

SKILL.md

openai-playwright.SKILL.md
name: openai-playwright
description: 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. Originally from OpenAI's curated skills catalog.
allowed-tools:
- Bash
- Read
- Grep
- Glob
- Write
- Edit

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/cli@latest
playwright-cli --help

Once `npx` is present, proceed with the wrapper script. A global install of `playwright-cli` is optional.

Scripts and references are located under `{baseDir}/`.

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/cli@latest
playwright-cli --help

Core workflow

1. Open the page. 2. Snapshot to get stable element refs. 3. Interact using refs from the latest snapshot. 4. Re-snapshot after navigation or significant DOM changes. 5. 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 "user@example.com"
"$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/cli 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 `eval` and `run-code` unless needed.
  • When you do not have a fresh snapshot, use placeholder refs like `eX` and say why; do not bypass refs with `run-code`.
  • Use `--headed` when 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 to Use

<!-- TODO: review -->

When NOT to Use

<!-- TODO: review -->

Read more
@trailofbits
Ships withskills-curated

Trail of Bits' reviewed and approved Claude Code plugins. Every skill and marketplace here has been vetted for quality and safety.

54231 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
542
Star history of trailofbits/skills-curated on GitHub, a chart by star-history.com

Other skills on skills-curated.

humanizer

humanizer

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and…

last30days

last30days

Researches a topic from the last 30 days on Reddit, X, and the web. Surfaces real community discussions with engagement metrics…

More skills from other plugins.

api-security

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…

@zhaoxuya520@zhaoxuya520Install Skill
nemoclaw-user-guide

nemoclaw-user-guide

Find official NemoClaw documentation for installation, configuration, operation, or troubleshooting. Also handles requested docs…

@nvidia@nvidiaInstall Skill

Questions about openai-playwright.

Which coding agents can use openai-playwright?
openai-playwright installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.