Control the user's currently open Chrome tab through the Playwriter CLI (no new browser launch). Use when you need to inspect live UI state, run scripted browser actions, capture console output, or reproduce frontend issues directly in the user's tab.
Use this skill to drive the user's active Chrome tab via Playwriter.
Full documentation is available here: https://playwriter.dev/
playwriter --version || npx -y playwriter --version
playwriter session new
playwriter -s 1 -e "console.log(await page.url())"
playwriter -s <session> -e "console.log(await page.url()); console.log(await page.title());"
playwriter -s <session> -e "console.log(await accessibilitySnapshot({ page }))"
page.evaluate.Get list rows/options from current app UI:
playwriter -s <session> -e "const rows = await page.getByRole('option').all(); console.log(rows.length);"
Read popup/hover content:
playwriter -s <session> -e "const row = page.getByRole('option').nth(0); await row.hover(); await page.waitForTimeout(700); console.log(await page.locator('[data-side]').first().innerText());"
Run arbitrary in-page debug code:
playwriter -s <session> -e "const out = await page.evaluate(() => ({ href: location.href })); console.log(out);"
playwriter session new.playwriter command is missing, use npx -y playwriter ... or install globally.