pattern-stack/claudecode-patterns/browser-driver

Claude Code and agent skill by pattern-stack/claudecode-patterns

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Drive a real browser against a URL — capture full-page screenshots, inspect computed styles / ARIA / cursor / overflow per selector, and exercise interactions (open menus, hover for tooltips). Wraps `${CLAUDE_PLUGIN_DIR}/scripts/capture-surface.mjs` and `${CLAUDE_PLUGIN_DIR}/scripts/inspect-surface.mjs`. Uses headless Playwright with saved auth state by default; supports the user's running Chrome via opt-in.

Install

npx vskill@latest install pattern-stack/claudecode-patterns/browser-driver

SKILL.md

The same SKILL.md was published earlier as pattern-stack/claudecode-patterns/browser-driver.

Browser Driver

Universal browser interaction layer. Default = headless Playwright with saved auth state. Replaces the historical browser-pilot subagent + Playwright MCP path because both had reliability gaps (cert handling, subagent registration, MCP knob exposure).

When to use

  • Capturing a screenshot of a live surface (any URL)
  • Inspecting cursor/ARIA/role/overflow/computed-style state of rendered elements
  • Driving an interaction (open a menu, hover for tooltip, click and see result)
  • /design-loop invokes this for evidence capture + interactive grading
  • /design-audit invokes this for one-shot audits
  • Ad-hoc: "is the cursor right on this button", "does the menu open"

Operations

capture — full-page screenshot
bun ${CLAUDE_PLUGIN_DIR}/scripts/design.ts capture <url> <outPath>

Returns JSON: { url, finalUrl, title, navStatus, usedStorage, screenshot, consoleSample }.

Env vars: VIEWPORT_W (default 1512), VIEWPORT_H (default 982).

inspect — structural + interactive probe
bun ${CLAUDE_PLUGIN_DIR}/scripts/design.ts inspect <url> [<selectors.json>] [<out.json>]

With no selectors JSON: minimal probe (nav status, title, auth-stale flag). With selectors JSON: per-probe { cursor, role, ariaLabel, ariaPressed, ariaExpanded, ariaDisabled, tabindex, disabled, display, box*, overflowing, textPreview }. Plus optional interactions (openMenu, hoverForTooltip).

Selectors JSON shape
json
{
"probes": {
"scopeChip": { "by": "text", "tag": "button", "selector": "All Opportunities", "ariaName": "Opportunity scope" },
"formatChip": { "by": "text", "tag": "button", "selector": "Plain Text", "ariaName": "Change output format" },
"cursorHint": { "by": "deepest-text", "selector": "Type \"/\" to write AI instructions", "maxLen": 200 }
},
"interactions": [
{ "kind": "openMenu", "trigger": "formatChip", "captureKey": "formatMenu" },
{ "kind": "hoverForTooltip", "trigger": "scopeChip", "captureKey": "scopeTooltip" }
]
}
verify — single-shot pre-flight check
bun ${CLAUDE_PLUGIN_DIR}/scripts/design.ts verify <url>

Runs inspect with no selectors and checks:

  • navStatus is http 200
  • authStale is false
  • pageTitle is non-empty and not "Loading..."

Exit code 0 on pass, 1 on fail. Stdout is { ok, reasons?, hint? } JSON.

Used by /design-loop at start.

Auth

  • Reads .playwright/auth.json (Playwright storageState) by default
  • If absent or stale → authStale: true in the inspect output → call /auth-recover

Cert handling

--ignore-certificate-errors is baked into the Chromium launch + ignoreHTTPSErrors: true on the context. Works against locally-issued Caddy certs without trust-store changes.

When NOT to use this skill

  • You need to see what the user is actively browsing (their cookies, their navigation state) — use chrome-devtools MCP via a subagent instead
  • You need to do something interactive that the script doesn't support (e.g., drag-and-drop) — write a one-off Node script

Mode: user-browser (chrome-devtools)

Owned by the `browser` skill — the plugin ships a chrome-devtools MCP server (top-level mcpServers in plugin.json) that connects to the user's own browser on CDP :9222. See that skill for launch recipes (incl. Arc's flag-loss quirks) and the connection-check protocol. This skill stays the scripted headless path.

Constraints

  • Always uses headless mode by default — never pops a window unprompted
  • Never writes anywhere outside screenshots/, .ai-docs/, or the explicit outPath arg
  • Auth helper (scripts/playwright-auth.mjs) is the ONLY thing that opens a headed browser; only invoked via /auth-recover

Related

  • `browser` — interactive sibling: user-browser CDP mode, headless MCP driving, audits; shares .playwright/auth.json and the headed-once bootstrap (scripts/auth-capture.mjs)
  • `/auth-recover` — refreshes .playwright/auth.json when stale
  • `/design-loop` — primary consumer
  • `/figma-snapshot` — sibling, snapshots the reference
  • ${CLAUDE_PLUGIN_DIR}/scripts/capture-surface.mjs — implementation
  • ${CLAUDE_PLUGIN_DIR}/scripts/inspect-surface.mjs — implementation

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/pattern-stack/claudecode-patterns/browser-driver/badge)](https://verified-skill.com/skills/pattern-stack/claudecode-patterns/browser-driver)

Something wrong with this skill or its page? Tell us.