Agent skill

playwright-browser

Use when automating browsers, testing pages, taking screenshots, checking UI, verifying login flows, or testing responsive behavior

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/playwright-browser

SKILL.md

bash
node $SKILL_DIR/run.js /tmp/playwright-task.js

For inline code (variables are auto-injected, see below):

bash
node $SKILL_DIR/run.js "const b = await chromium.launch(); const p = await b.newPage(); await p.goto('http://localhost:3000'); console.log(await p.title()); await b.close();"

$SKILL_DIR is where you loaded this file from.

Use { headless: false } when user wants to see the browser. You know when that is.

  • BASE_URL - from PLAYWRIGHT_BASE_URL env var
  • CI_ARGS - browser args for CI (['--no-sandbox', '--disable-setuid-sandbox'])
  • EXTRA_HEADERS - from PW_HEADER_NAME/VALUE or PW_EXTRA_HEADERS
  • chromium, firefox, webkit, devices - from playwright

Example:

bash
node $SKILL_DIR/run.js "
const browser = await chromium.launch({ args: CI_ARGS });
const page = await browser.newPage();
await page.goto(BASE_URL || 'http://localhost:3000');
console.log(await page.title());
await browser.close();
"

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results