Index of every page on this site: llms.txt
All skills
brianlovin avatar

/playwriter

@1a9819e official
by Brian Lovinbrianlovin/agent-config377 stars
33
Run it yourself

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/agent-config/playwriter

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

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

Description uses 3.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈264 characters, or 3.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings1mo3 checks · Risk MEDIUM
  • Gen Agent Trust Hub1mo

    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.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

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

Last checked against GitHub last week.

Dormantupdated 8 months ago

README badge

README badge for brianlovin/agent-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.