remorses/playwriter
Overview
This skill lets you control your local Chrome browser through a Playwright-powered extension and a stateful JavaScript sandbox. It runs Playwright code snippets against a persistent session so you can automate interactions, capture screenshots, and inspect accessibility trees. It is optimized for debugging and repeatable browser automation workflows.
How this skill works
You start a session which keeps a persistent browser context and exposes context variables like page, context, and state. Then you execute Playwright code snippets against that session; the sandbox evaluates your code and returns results, files, or logs. Utilities are provided for screenshots, accessibility snapshots, CDP access, network interception, and other common automation tasks.
When to use it
- Rapidly prototype browser automation without full project setup
- Debug front-end behavior interactively in a real Chrome window
- Capture screenshots or accessibility snapshots for testing and reporting
- Automate navigation, form filling, and popup/download flows
- Intercept network requests for API scraping or mocking
Best practices
- Create and reuse a session for stateful workflows to preserve cookies and storage
- Prefer provided utilities (getCleanHTML, getCDPSession) for stable output and lower boilerplate
- Use explicit waits and selector strategies to avoid flaky interactions
- Store screenshots and dumps to disk via the sandbox so you can inspect artifacts locally
- Run playwriter skill to read the latest commands, examples, and rules before complex tasks
Example use cases
- Open a session and navigate to a page to interactively debug layout or JS errors
- Take consistent screenshots with scale:'css' for visual regression checks
- Generate accessibility snapshots to audit ARIA and semantics during development
- Intercept API calls to extract JSON responses for scraping or test data
- Automate multi-step flows including popups and downloads within one stateful session
FAQ
Run the session creation command to get an ID (e.g., playwriter session new) then reference that ID when executing code.
What if the playwriter command is not available?
Use npx playwriter@latest or bunx playwriter@latest to run it without a global install.