Cookie Sync
Sync cookies from local Chrome to a Browserbase persistent context so the browse CLI...
Install
npx skills add browserbase/skills --skill cookie-sync -g -a claude-code -y- Repository
- browserbase/skills3.7k
- Category
- Engineering
- Updated
- 8d ago
- License
- MIT
- Context cost
- Lightabout 1,135 tokens
- Runs scripts
- Yes, review before use
What it does
Sync cookies from local Chrome to a Browserbase persistent context so the browse CLI can access authenticated sites. Use when the user wants to browse as themselves, sync cookies, or log into sites via Browserbase.
Cookie Sync, Local Chrome → Browserbase Context
Exports cookies from your local Chrome and saves them into a Browserbase persistent context. After syncing, use the browse CLI to open authenticated sessions with that context.
Supports domain filtering (only sync cookies you need) and context reuse (refresh cookies without creating a new context).
Prerequisites
- Chrome (or Chromium, Brave, Edge) with remote debugging enabled
- If your browser build exposes
chrome://flags/#allow-remote-debugging, enable it and restart the browser - Otherwise, launch with
--remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debugand setCDP_URL=ws://127.0.0.1:9222 - At least one tab open in Chrome
- Node.js 22+
- Environment variable:
BROWSERBASE_API_KEY
Setup
Install dependencies before first use:
cd .claude/skills/cookie-sync && npm install
Usage
Basic, sync all cookies
node .claude/skills/cookie-sync/scripts/cookie-sync.mjs
Creates a persistent context with all your Chrome cookies. Outputs a context ID.
Filter by domain, only sync specific sites
node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --domains google.com,github.com
Matches the domain and all subdomains (e.g. google.com matches accounts.google.com, mail.google.com, etc.)
Refresh cookies in an existing context
node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --context ctx_abc123
Re-injects fresh cookies into a previously created context. Use this when cookies have expired.
Verified browser mode
node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --verified
Enables Browserbase Identity with a Verified browser to improve access on protected sites. Recommended for sites like Google that fingerprint browsers.
Residential proxy with geolocation
node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --proxy "San Francisco,CA,US"
