Use playwright-cli for browser automation, snapshots, screenshots, and session-based testing from OpenCode.
Use this skill when the task needs browser automation, visual verification, screenshots, DOM snapshots, login/session reuse, or lightweight end-to-end checks.
Prefer playwright-cli over Playwright MCP unless the task specifically needs MCP behavior.
playwright-cli is installed and available on PATH.--headed when the user wants to watch the browser.playwright-cli open https://example.com
playwright-cli open https://example.com --headed
playwright-cli -s=myapp open https://example.com
playwright-cli snapshot
playwright-cli click e12
playwright-cli fill e15 "hello"
playwright-cli press Enter
playwright-cli screenshot
playwright-cli console
playwright-cli network
playwright-cli close
playwright-cli -s=<name> ... to isolate work by app or task.playwright-cli list to inspect active sessions.open, then snapshot.playwright-cli open does not support --snapshot.snapshot before using new refs.screenshot when the result should be preserved or shown.For a request like "test the login flow", use commands like:
playwright-cli -s=login open https://app.example.com/login --headed
playwright-cli -s=login snapshot
playwright-cli -s=login fill e12 "[email protected]"
playwright-cli -s=login fill e15 "password"
playwright-cli -s=login click e18
playwright-cli -s=login snapshot
playwright-cli -s=login screenshot