← ClaudeAtlas

playwright-skilllisted

Support-only Playwright runtime/reference for browser-automation — dev-server detection, a Node.js script runner, and helpers for clicks, form fills, screenshots, multi-viewport, and custom HTTP headers. Use when browser-automation selects the bundled Playwright fallback; do not route user intent here directly.
alexei-led/cc-thingz · ★ 33 · AI & Automation · score 81
Install: claude install-skill alexei-led/cc-thingz
# Playwright Support Runtime Support-only helper for `browser-automation`. Provides Playwright primitives: dev-server detection, a script runner (`scripts/run.js`), and helper utilities (`scripts/lib/helpers.js`). Do not treat this as the user-facing browser skill. Load it only when `browser-automation` chooses the bundled Playwright helper as the runtime/reference. ## Critical workflow 1. **Detect dev servers first** for localhost testing: ```bash node scripts/run.js "console.log(JSON.stringify(await helpers.detectDevServers()))" ``` One server → use it. Multiple → ask which. None → ask for a URL. 2. **Write generated scripts and artifacts under `/tmp/playwright-*`** — never into `scripts/` or the user's project. 3. **Use visible browser mode** unless the user asks for headless. 4. **Parameterize the target URL** at the top of generated scripts as `TARGET_URL`. ## Running scripts ```bash node scripts/run.js /tmp/playwright-test-<name>.js node scripts/run.js "<code>" ``` `run.js` `cd`s to `scripts/`, auto-wraps non-`async` code, and auto-installs Playwright on first run. For code without `require()`, it injects `chromium`, `firefox`, `webkit`, `devices`, `helpers`, and `getContextOptionsWithHeaders(opts)`. ## Helpers Open `scripts/lib/helpers.js` when you need helper signatures. Key helpers: `launchBrowser`, `createContext`, `waitForPageReady`, `safeClick`, `safeType`, `takeScreenshot`, `authenticate`, `detectDevServers`. ## Custom HTTP headers Set