From craft
Interactive browser automation via playwright-cli for navigating sites, clicking elements, filling forms, taking snapshots, and triaging live apps.
How this skill is triggered — by the user, by Claude, or both
Slash command
/craft:browserWhen to use
Triggers: user says 'open browser', 'check this site', 'triage the app', 'test this flow', 'look at this page', or '/craft:browser'. Also when needing visual inspection of a running app, before/after screenshots of UI changes, or interactive site exploration.
This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Interactive browser automation powered by `playwright-cli`. Launches a persistent `playwright-browser` agent that owns a live browser session. You steer it via SendMessage - the agent remembers what it's seen and done across turns.
Interactive browser automation powered by playwright-cli. Launches a persistent playwright-browser agent that owns a live browser session. You steer it via SendMessage - the agent remembers what it's seen and done across turns.
Chrome DevTools MCP works but has limitations: no persistent agent session between tool calls, no interactive steering, and full accessibility trees streamed into context (~114k tokens per task). playwright-cli saves snapshots to disk as YAML (~27k tokens per task, ~4x cheaper) and supports named sessions that persist across agent turns.
This skill is purely additive. It does not replace or modify Chrome DevTools MCP, the walkthrough-analyzer, or any existing analyzer agent.
Requires playwright-cli installed globally:
npm install -g @playwright/cli && playwright-cli install-browser
The skill checks prerequisites at every invocation and fails with copy-pasteable instructions if missing.
command -v playwright-cli >/dev/null 2>&1 || { echo "PREREQ_MISSING: playwright-cli. Run: npm install -g @playwright/cli && playwright-cli install-browser"; exit 2; }
If the check fails, report the error with the install command. Do not proceed.
Arguments follow this pattern:
/craft:browser <url> [goal] [--headless] [--session=name]
CRITICAL: Session names must be <= 12 characters, lowercase alphanumeric only. macOS has a 104-char Unix socket path limit. Long names cause silent socket lookup failures, which spawn duplicate browsers instead of erroring.
Auto-derive a short session name:
# Simple counter-based naming
SESSION="craft$(date +%H%M)"
If --session=name was provided explicitly, use that (after validating length <= 12).
DO NOT derive session names from story/cycle slugs. Those are too long and contain dashes. Use short, opaque names.
Check for and kill any existing craft sessions before launching:
playwright-cli list 2>/dev/null
If sessions are listed that match a craft* pattern, close them:
playwright-cli kill-all 2>/dev/null
Only run kill-all if stale sessions are detected. For a clean state, this is a no-op.
Invoke the playwright-browser agent with full context. The agent handles browser open, navigation, and initial snapshot internally.
Agent({
subagent_type: "craft:playwright-browser",
description: "Browser session: {url}",
prompt: "SESSION: {session_name}
URL: {url}
GOAL: {goal or 'Interactive exploration - wait for instructions'}
HEADED: {true unless --headless}
Open the browser with the URL in a single command, check the console, and report what you see. Then wait for instructions unless a specific goal was provided."
})
IMPORTANT: Use subagent_type: "craft:playwright-browser" (with the craft: prefix).
The agent returns its agentId. Report this to the user so they know they can continue the session.
When the agent returns from its first pass:
playwright-cli -s=$SESSION open --headed $URLplaywright-cli -s=$SESSION close before exiting--headless only when explicitly requested.open called exactly once. The agent opens the browser once with the URL. Never re-opens on failure - checks list first.npx claudepluginhub drobins25/craft --plugin craftAutomates browser tasks via Playwright CLI for AI agents: navigate pages, take snapshots/screenshots, fill forms, click elements from command line. Use with shell access.
Automates browsers via Playwright CLI shell commands: navigate pages, interact with elements (click, fill, type), capture screenshots/snapshots/PDFs, manage tabs for web testing.
Automates browsers via playwright-cli CLI commands executed through Bash. Supports navigation, interaction (click, type, fill), screenshots, PDFs, session/tabs management for E2E testing.