From doordarius-skills
Use when testing pages in a browser, checking UI, verifying visual output, debugging frontend issues, or running any browser automation task
How this skill is triggered — by the user, by Claude, or both
Slash command
/doordarius-skills:efficient-browser-automationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the Playwright CLI (`npx playwright`) for all browser automation.
Use the Playwright CLI (npx playwright) for all browser automation.
Use accessibility tree snapshots instead of screenshots to save tokens and get structured output.
| Task | Command |
|---|---|
| Open a URL in a browser | npx playwright open <url> |
| Generate test code interactively | npx playwright codegen <url> |
| Run test files | npx playwright test |
| Run a specific test | npx playwright test <file> |
| Show test report | npx playwright show-report |
| Install browsers | npx playwright install |
npx playwright commands for all browser automation. Never use claude-in-chrome or chrome-devtools MCP unless the user explicitly asks for thempage.accessibility.snapshot() in Playwright test scripts. This returns structured, parseable data and costs far fewer tokens than base64 images. Only take screenshots when a visual check is explicitly neededIn Playwright test scripts, use the accessibility tree to inspect page content:
const snapshot = await page.accessibility.snapshot();
console.log(JSON.stringify(snapshot, null, 2));
Or use npx playwright codegen <url> to interactively explore the page and generate selectors.
When verifying multiple pages (e.g., checking 5 URLs for correct rendering), dispatch sub-agents in parallel:
npx playwright test for url-1 + accessibility snapshotnpx playwright test for url-2 + accessibility snapshotnpx playwright test for url-3 + accessibility snapshotEach agent reports back its findings. This is faster than sequential testing and keeps context windows small.
| Mistake | Fix |
|---|---|
Using claude-in-chrome or chrome-devtools MCP | Use npx playwright CLI instead |
| Taking screenshots for page inspection | Use page.accessibility.snapshot() for structured output |
| Testing pages sequentially | Dispatch parallel sub-agents |
Using MCP tools like browser_navigate | Use Playwright CLI commands and test scripts |
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub dariusrosendahl/doordarius-skills --plugin doordarius-skills