# Chrome Profile Bridge

> Enhanced browser automation with Chrome profile targeting. Use this skill BEFORE playwright-cli when the user needs to work with a specific Chrome profile (e.g., "open my tax site", "check my bank account", "use my work profile"). This skill handles profile selection, then hands off to playwright-cli for actual browser control.

- Skill: `motiful/chrome-profile-bridge` (Agent Skill)
- Install (CLI): `npx skillmds@latest add motiful/chrome-profile-bridge`
- Raw SKILL.md: https://api.skillmd.com/api/skills/motiful/chrome-profile-bridge/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: motiful (https://skillmd.com/u/motiful)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/motiful/chrome-profile-bridge

---


# Chrome Profile Bridge

Enhancement layer on top of `playwright-cli` that adds **Chrome profile targeting**.

## When to Use This Skill

Use this when the user mentions:
- A specific Chrome profile ("use my work profile", "open in Jack's browser")
- An authenticated site that requires existing login state (tax, banking, email)
- Any task where the correct Chrome profile matters

For tasks that don't need a specific profile, use `playwright-cli` directly.

## Architecture

```
This skill (profile targeting) → playwright-cli (browser control) → Chrome Extension → Real Chrome
```

## Why This Exists

| Approach | Problem |
|----------|---------|
| MCP | Loads ~25 tool definitions per session (~114K tokens). 4x heavier than Skill mode. |
| Claude in Chrome | Blocks financial/banking sites. Requires Anthropic login. Ecosystem lock-in. |
| Direct CDP | Chrome 136+ blocks remote debugging on default user data dir. |
| **This Skill** | Works inside Chrome (no restrictions), preserves all login state, zero site blocking. |

## Prerequisites

1. **@playwright/cli** — `npm install -g @playwright/cli@latest`
2. **Playwright MCP Bridge** Chrome extension — [Install from Chrome Web Store](https://chromewebstore.google.com/detail/playwright-mcp-bridge/mmlmfjhmonkocbjadbfplnigmagldckm)
3. **Token** — Copy from the extension's status page, set as `PLAYWRIGHT_MCP_EXTENSION_TOKEN` env var
4. **pw wrapper** — Copy `scripts/pw` to somewhere in your `$PATH` (e.g., `~/.local/bin/pw`)

## Usage

### List available Chrome profiles

```bash
pw list-profiles
```

### Open browser with a target profile

```bash
# Default profile
pw open --extension

# Specific profile
pw open --extension --pw-profile="Profile 1"
```

### Control the browser (all playwright-cli commands work)

```bash
playwright-cli goto https://example.com
playwright-cli snapshot
playwright-cli click e15
playwright-cli fill e7 "some text"
playwright-cli screenshot --filename=result.png
playwright-cli close
```

## Tool Selection Note

Browser automation involves multiple sub-problems (finding URLs, reading pages, filling forms, checking state). Each has a best-fit tool. See the **Tool Selection Strategy** section in the `playwright-cli` skill for detailed guidance. Key takeaway: don't path-depend on one approach — match each step to the right tool.

---

## Browser Hygiene

When using Chrome profiles, cleanup is especially important — leftover tabs persist across sessions since profiles are real user data.

- **Close all task-related tabs before finishing.** Profile tabs survive after `playwright-cli close`. Audit with `tab-list` and close each one.
- **Extension bridge sessions are isolated.** Each `pw open --extension` creates a new browser window. `tab-list` and `tab-close` only affect tabs in THAT window. Tabs from a previous session (killed or disconnected) become orphaned — only closable manually in Chrome. **Always close all opened tabs before `playwright-cli close`. There is no way to retroactively clean up another session's tabs.**
- **Clean temp files** after each task: `rm -rf .playwright-cli/*`
- See the **Browser Hygiene** section in `playwright-cli` skill for full details.

---

## Troubleshooting

- **ERR_BLOCKED_BY_CLIENT**: Extension not installed in target profile. Install from Chrome Web Store.
- **Extension timeout**: Chrome opened wrong profile. Use `--pw-profile="Default"` explicitly.
- **Token mismatch**: Verify env var matches the token shown in the extension's status page (`chrome-extension://mmlmfjhmonkocbjadbfplnigmagldckm/status.html`).
- **Extension ID confusion**: The Web Store version is `mmlmfjhmonkocbjadbfplnigmagldckm`. The dev/sideloaded version `jakfalbnbhgkpmoaakfflhflbfpkailf` is NOT compatible with `@playwright/cli`.

