General-purpose browser automation with Playwright - auto-detects running dev servers, writes throwaway test scripts to /tmp, runs them via a universal executor, and captures screenshots and UX evidence.
---
name: playwright-skill
description: Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, and check links. Use when the user wants to test websites, automate browser interactions, or validate web functionality.
---
Write and run custom Playwright scripts on demand without cluttering the project.
## Workflow
1. For localhost work, ALWAYS detect dev servers first via the bundled helper (`detectDevServers()`); use the one found, ask which if several, or ask for a URL if none.
2. Write the test script to `/tmp/playwright-test-*.js` - never into the skill directory - with the target URL parameterized at the top.
3. Default to a visible browser (`headless: false`) so the user can watch, unless headless is requested.
4. Execute via the universal runner: `cd $SKILL_DIR && node run.js /tmp/playwright-test-*.js`.
5. First-time setup installs Playwright and Chromium with `npm run setup` in the skill directory.
6. Report results in real time; /tmp scripts are auto-cleaned by the OS.
Full skill & source: https://github.com/lackeyjb/playwright-skill/tree/bb7e920d376022958214e349ef25498a2644e189/skills/playwright-skill