All skills
brianlovin avatar

/playwriter

@1f66d60 official

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: https://skilld.dev/gh/brianlovin/claude-config/playwriter

This session only. Nothing lands on disk.

SKILL.md

≈66 tokens always: the name and description. ≈521 when used: this file. ≈67 more on demand in 1 file.

Playwriter

Use this skill to drive the user's active Chrome tab via Playwriter.

Full documentation is available here: https://playwriter.dev/

Quick Start

  1. Ensure the Playwriter extension is enabled (green) on the target tab.
  2. Ensure CLI is available:
playwriter --version || npx -y playwriter --version
  1. Create/attach a session:
playwriter session new
  1. Run commands against that session:
playwriter -s 1 -e "console.log(await page.url())"

Core Workflow

  1. Confirm connection and correct tab:
playwriter -s <session> -e "console.log(await page.url()); console.log(await page.title());"
  1. Collect page structure when needed:
playwriter -s <session> -e "console.log(await accessibilitySnapshot({ page }))"
  1. Execute targeted actions (click/type/hover/fetch/evaluate).
  2. Pull logs and structured state via page.evaluate.
  3. Summarize findings with exact IDs, timestamps, and observed state transitions.

Useful Commands

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);"

Troubleshooting

  • If the session attaches to the wrong tab, click the extension icon on the intended tab and re-run playwriter session new.
  • If playwriter command is missing, use npx -y playwriter ... or install globally.
  • If execution errors suggest stale connection, create a fresh session.

Guardrails

  • Prefer read-only inspection unless the task requires mutation.
  • Announce destructive UI actions before running them.
  • When capturing logs, redact sensitive tokens/user data in summaries.

Source: SKILL.md on GitHub

2 warnings16d5 checks · Risk MEDIUM
  • Gen Agent Trust Hub16d

    This skill allows the agent to control your active Chrome tab using the Playwriter CLI. It can download the Playwriter package automatically, execute arbitrary JavaScript inside your browser tab, and read page content, which could lead to sensitive data exposure or indirect prompt injection from malicious websites.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    1/2 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1f66d60. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 7 months ago

README badge

README badge for brianlovin/claude-config/playwriter

Controls the user's active Chrome tab via Playwriter CLI to inspect UI state, run browser actions, capture console output, and debug frontend issues without launching a new browser. Targets live tab automation and developer troubleshooting workflows.

Generated from the current SKILL.md.

Does this skill launch a new browser, or does it control an existing tab?
It controls the user's currently open Chrome tab without launching a new browser. The Playwriter extension must be enabled on the target tab.
What can I do with this skill besides clicking and typing?
You can inspect page state with accessibility snapshots, read console output, evaluate arbitrary JavaScript in-page, capture popup/hover content, and retrieve structured UI data like role-based element lists.
Do I need to install Playwriter globally, or can the skill use it on-demand?
The skill checks for `playwriter` CLI availability and falls back to `npx -y playwriter` if needed, so global installation is optional.
What happens if the session attaches to the wrong tab?
Click the Playwriter extension icon on the intended tab and run `playwriter session new` again to create a fresh session.
Is this skill safe to use on pages with sensitive data?
The skill includes a guardrail to redact sensitive tokens and user data in summaries, and prefers read-only inspection unless mutation is required.

Generated from the current SKILL.md. These answers refresh after source changes.