pattern-stack/claudecode-patterns/browser-driver
Claude Code and agent skill by pattern-stack/claudecode-patterns
- community
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-driverSKILL.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-loopinvokes this for evidence capture + interactive grading/design-auditinvokes this for one-shot audits- Ad-hoc: "is the cursor right on this button", "does the menu open"
Operations
capture — full-page screenshot
Returns JSON: { url, finalUrl, title, navStatus, usedStorage, screenshot, consoleSample }.
Env vars: VIEWPORT_W (default 1512), VIEWPORT_H (default 982).
inspect — structural + interactive probe
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
verify — single-shot pre-flight check
Runs inspect with no selectors and checks:
navStatusishttp 200authStaleisfalsepageTitleis 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: truein 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-devtoolsMCP 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 explicitoutPatharg - 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.jsonand the headed-once bootstrap (scripts/auth-capture.mjs) - `/auth-recover` — refreshes
.playwright/auth.jsonwhen 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
- SKILL.md in the repositoryCheckingplugin/skills/browser-driver/SKILL.md
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
[](https://verified-skill.com/skills/pattern-stack/claudecode-patterns/browser-driver)