/nanlabs-tooling:playwright-clifrom nanlabs-tooling
Drive a real browser from the terminal with the Playwright CLI (snapshot, click, fill, screenshots, traces) for CLI-first automation — data extraction, UI debugging, form fills, multi-tab work. For Playwright **test specs**, use `nanlabs-e2e-runner` instead.
Ships in nanlabs-tooling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Drive a real browser from the terminal using playwright-cli. The bundled
wrapper script runs the CLI through npx, so a global install is not required.
Treat this skill as CLI-first automation. Do NOT pivot to
@playwright/testtest files unless the user explicitly asks for them — for Playwright test specs are covered by thenanlabs-e2e-runneragent (not bundled as a skill in this repo yet).
npx on PATH (provided by Node.js / volta from nan-bootstrap).npm install -g @playwright/cli@latest.nan-skills check playwright-cli validates npx is present.
export PWCLI="<skill-root>/scripts/playwright_cli.sh"
alias pwcli="$PWCLI"
pwcli --help
The wrapper uses npx --yes --package @playwright/cli playwright-cli, so even
without a global install the first call will fetch the package and cache it.
If PLAYWRIGHT_CLI_SESSION is set, the wrapper passes it as --session
automatically — handy to keep separate browser contexts per project.
pwcli open https://playwright.dev --headed
pwcli snapshot
pwcli click e15
pwcli type "Playwright"
pwcli press Enter
pwcli screenshot
open the page.snapshot to get stable element refs (e.g. e3).screenshot, pdf, tracing-start/tracing-stop)
when useful.Minimal loop:
pwcli open https://example.com
pwcli snapshot
pwcli click e3
pwcli snapshot
After:
Refs go stale silently. When a command fails due to a missing ref, snapshot
again — do not bypass with run-code/eval unless explicitly justified.
pwcli open https://example.com/form
pwcli snapshot
pwcli fill e1 "[email protected]"
pwcli fill e2 "password123"
pwcli click e3
pwcli snapshot
pwcli open https://example.com --headed
pwcli tracing-start
# ...interactions...
pwcli tracing-stop
pwcli tab-new https://example.com
pwcli tab-list
pwcli tab-select 0
pwcli snapshot
Full command reference: references/commands.md
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nanlabs/agent-toolkit --plugin nanlabs-tooling2 skills in this plugin