playwright-cli
Installation
SKILL.md
Browser Automation with playwright-cli
How playwright-cli works
playwright-cli gives you a headless Chromium browser controlled through bash commands.
Every command that changes the page returns a snapshot — a YAML accessibility tree
where each interactive element has a ref like e5, e12. You use these refs to
click, fill, and interact. Refs are ephemeral: they die on any page change and must
be refreshed via snapshot.
Bootstrap (run once before any browser work)
which playwright-cli || npm install -g @anthropic-ai/playwright-cli@latest
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true npx playwright install chromium
playwright-cli session-stop 2>/dev/null # kill stale sessions
playwright-cli config --browser=chromium