playwright-cli
Installation
SKILL.md
STARTER_CHARACTER = ðŸŽ
playwright-cli
Driving a browser from the shell. Each command prints the executed Playwright code, the page state, and a fresh snapshot.
The loop
Snapshot to see the page, act on an element by its ref, snapshot again.
playwright-cli snapshot # accessibility tree with [ref=e8] handles
playwright-cli click e8 # act on a ref
playwright-cli snapshot # confirm the result
Refs are not stable. Any DOM change renumbers them — re-snapshot before acting on a page that just changed. Acting on a stale ref hits the wrong element or none.
For a large page, snapshot a region instead of the whole tree: snapshot e34 or snapshot --depth=4.