/browser-control:browser-setupfrom browser-control
Interactive wizard that wires up Playwright MCP Bridge end-to-end: detects browsers, installs extension, captures token, registers MCP server, and verifies connection.
Ships in browser-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Status: DRAFT — scaffolded from PoC. Implementation pending Inception outputs.
End-to-end interactive wizard that takes a user from "AIWG agent can't drive a browser" to "AIWG agent is connected to my real, logged-in browser via the Playwright MCP Bridge extension" without the user needing to know the underlying MCP plumbing, token semantics, or AIWG CLI surface.
browser-doctor reports the addon is installed but unwired| Field | Source | Notes |
|---|---|---|
| Provider | aiwg runtime-info | Auto-detect; user can override |
| Target browser | OS-specific detection | Recommend based on --extension support |
| Token | Interactive (AskUserQuestion) | Pasted by user after installing extension |
Confirm AIWG is initialized in the workspace and the active provider supports MCP servers with env blocks. Bail with explicit guidance if not.
Linux:
which google-chrome google-chrome-stable microsoft-edge microsoft-edge-stable chromium chromium-browser brave-browser vivaldi operaflatpak list --app 2>/dev/null | grep -iE 'chrome|chromium|edge|brave|vivaldi'macOS:
mdfind 'kMDItemContentType == "com.apple.application-bundle"' filtered by known bundle IDs (com.google.Chrome, com.microsoft.edgemac, org.chromium.Chromium, com.brave.Browser)Windows:
HKLM\SOFTWARE\Clients\StartMenuInternet\ and standard install pathsClassify each detected browser by extension-mode support:
Present detected browsers ranked by:
--extensionRecommend the dedicated-agent-browser pattern: keep your daily browser separate. Suggest the apt-installed Chrome (if present) or Edge as the agent's browser; leave Flatpak Chromium etc. for personal use.
Print:
xdg-open / open / start <url> (with permission)Use AskUserQuestion (or markdown prompt on providers without native UX):
"Click the Playwright MCP Bridge extension icon in your browser. Copy the token shown there and paste it below."
Validate: non-empty, alphanumeric-with-hyphens-and-underscores, length ≥ 16.
mkdir -p ~/.config/playwright-mcp
chmod 700 ~/.config/playwright-mcp
# Write token to ~/.config/playwright-mcp/token (mode 600)
chmod 600 ~/.config/playwright-mcp/token
Per token-security rule: never echo, never log, never include in error output.
TOKEN=$(cat ~/.config/playwright-mcp/token)
aiwg mcp add playwright \
--type stdio \
--command npx \
--args '-y,@playwright/mcp@latest,--extension' \
--env "PLAYWRIGHT_MCP_EXTENSION_TOKEN=${TOKEN}" \
--description 'Playwright MCP — browser automation via accessibility tree' \
|| aiwg mcp update playwright \
--command npx \
--args '-y,@playwright/mcp@latest,--extension' \
--env "PLAYWRIGHT_MCP_EXTENSION_TOKEN=${TOKEN}"
Known gap: the token lands in plaintext in ~/.aiwg/mcp-servers.json. Final addon release depends on AIWG core supporting ${file:...} substitution. Document this in the setup-complete report.
PROVIDER=$(aiwg runtime-info --json | jq -r '.provider')
aiwg mcp inject --provider "$PROVIDER" --servers playwright
Spawn a probe MCP process briefly with env var set, send JSON-RPC initialize + tools/list, check for browser_tabs in the response. Kill the probe.
If probe succeeds: setup-complete report.
If probe fails: collect diagnostics and hand off to browser-doctor.
| Field | Value |
|---|---|
| Browser | <binary path> |
| Token file | ~/.config/playwright-mcp/token |
| MCP registered | playwright |
| Provider injected | <provider name> |
| Next | Restart the provider; ask agent to "list browser tabs" |
Reset / rotate instructions: aiwg run skill browser-reset
Health check: aiwg run skill browser-doctor
human-authorization before:
.aiwg/browser-allowlist.yaml immediately, or defer to first agent use?node_modules/@playwright/mcp/lib/extension/ if Web Store access is blocked?.aiwg/architecture/adr-remote-browser-control.md — architectural context.aiwg/working/browser-control-feature-plan.md — full designrules/browser-control-safety.md — enforcement (this addon).claude/rules/token-security.md — token-handling discipline.claude/rules/human-authorization.md — authorization gatesWhat SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/browser-doctorRead-only health check on browser-control setup. Verifies browser binary, Playwright MCP Bridge extension presence, token file mode/contents, AIWG MCP registration, provider config injection, and optional workspace allow-list. Outputs pass/fail per check with remediation commands./browser-resetReconfigure the browser-control wiring. Rotate the Playwright MCP Bridge token, switch the target browser, or fully tear down the AIWG registration and provider injection. Walks the user through extension UI regeneration where needed; respects human-authorization gates for destructive operations.npx claudepluginhub jmagly/aiwg --plugin browser-controlOther plugins' skills for the same job