Claude Code Plugins

Community-maintained marketplace

Feedback
1
0

Tool for controlling browser via Playwriter extension.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name playwriter
description Tool for controlling browser via Playwriter extension.

Setup

  1. Install Playwriter extension
  2. Click extension icon on target tab (icon turns green)

Usage

bun {base dir}/scripts/cmd.ts "<code>"

Examples

# Get page URL
bun {base dir}/scripts/cmd.ts "console.log(page.url())"

# Click button
bun {base dir}/scripts/cmd.ts "await page.getByRole('button', { name: 'Submit' }).click()"

# Get page title
bun {base dir}/scripts/cmd.ts "await page.title()"

# Fill form
bun {base dir}/scripts/cmd.ts "await page.getByLabel('Email').fill('test@example.com')"

# Stop daemon
bun {base dir}/scripts/cmd.ts "daemon.stop()"

Context

Variables available in code:

  • page - Current Playwright page
  • context - Browser context
  • state - Persistent object across calls
  • daemon - Daemon control object ({ stop: () => void })

Output

The script returns logs and the final result. If the result is an object, it's formatted as JSON.

bun {base dir}/scripts/cmd.ts "console.log('fetching...'); return { title: await page.title() }"

Output:

[log] fetching...
{
  "title": "Page Title"
}

Debugging

// Enable debugger
const cdp = await page.context().newCDPSession(page);
await cdp.send('Debugger.enable');
await cdp.send('Debugger.setPauseOnExceptions', { state: 'uncaught' });

// Set breakpoint
await cdp.send('Debugger.setBreakpointByUrl', { lineNumber: 42, urlRegex: '.*app\\.js$' });

Network

// Wait for API response
const res = await page.waitForResponse(r => r.url().includes('/api/data'));
console.log(await res.json());

// Monitor requests
page.on('request', r => console.log('REQ:', r.url()));
await page.reload();
page.removeAllListeners('request');