cookie-sync
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.
What this skill does
# 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-debug` and set `CDP_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: ```bash cd .claude/skills/cookie-sync && npm install ``` ## Usage ### Basic — sync all cookies ```bash 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 ```bash 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 ```bash 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 ```bash 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 ```bash node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --proxy "San Francisco,CA,US" ``` Routes through a residential proxy in the specified location. Format: `"City,ST,Country"` (state is 2-letter code). Helps match your local IP's geolocation so auth cookies aren't rejected. ### Combine flags ```bash node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --domains github.com,google.com --verified --proxy "San Francisco,CA,US" ``` ## Browsing Authenticated Sites After syncing, use the `browse` CLI with the context ID: ```bash SESSION_JSON="$(browse cloud sessions create --context-id <ctx-id> --persist --keep-alive)" SESSION_ID="$(echo "$SESSION_JSON" | jq -r .id)" CONNECT_URL="$(echo "$SESSION_JSON" | jq -r .connectUrl)" browse open https://mail.google.com --cdp "$CONNECT_URL" ``` The `--persist` flag on `browse cloud sessions create` saves any new cookies or state changes back to the context when the cloud session is released, keeping the session fresh for next time. **Full workflow example:** ```bash # Step 1: Sync cookies for Twitter node .claude/skills/cookie-sync/scripts/cookie-sync.mjs --domains x.com,twitter.com # Output: Context ID: ctx_abc123 # Step 2: Browse authenticated Twitter SESSION_JSON="$(browse cloud sessions create --context-id ctx_abc123 --persist --keep-alive)" SESSION_ID="$(echo "$SESSION_JSON" | jq -r .id)" CONNECT_URL="$(echo "$SESSION_JSON" | jq -r .connectUrl)" browse open https://x.com/messages --cdp "$CONNECT_URL" browse snapshot browse screenshot browse stop browse cloud sessions update "$SESSION_ID" --status REQUEST_RELEASE ``` ## Reusing Contexts for Scheduled Jobs Contexts persist across sessions, making them ideal for scheduled/recurring tasks: 1. **Once (laptop open):** Run cookie-sync → get a context ID 2. **Scheduled jobs:** Create a Browserbase session with `browse cloud sessions create --context-id <ctx-id> --persist --keep-alive`, then attach with `browse open <url> --cdp <connectUrl>` — no local Chrome needed 3. **Re-sync as needed:** When cookies expire, run cookie-sync again with `--context <ctx-id>` to refresh ## Troubleshooting - **"No DevToolsActivePort found"** → Enable `chrome://flags/#allow-remote-debugging` if your browser build exposes it, or launch with `--remote-debugging-port=9222` and set `CDP_URL=ws://127.0.0.1:9222` - **"No open page targets found"** → Open at least one tab in Chrome - **"WebSocket error"** → Chrome may be hung; force quit and reopen it - **Cookies expired in context** → Re-run cookie-sync with `--context <id>` to refresh - **Auth rejected by site** → Try adding `--verified` and/or `--proxy` with a location near you
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.