setup-browser-cookies
Import cookies from your real Chromium browser into the headless browse session. Opens an interactive picker UI where you select which cookie domains to import. Use before QA testing authenticated pages. Use when asked to "import cookies", "login to the site", or "authenticate th
What it does
Preamble
eval "$(~/.vibestack/bin/vibe-slug 2>/dev/null)" 2>/dev/null || SLUG="unknown"
_LEARN_FILE="${VIBESTACK_HOME:-$HOME/.vibestack}/projects/${SLUG:-unknown}/learnings.jsonl"
if [ -f "$_LEARN_FILE" ]; then
_LEARN_COUNT=$(wc -l < "$_LEARN_FILE" 2>/dev/null | tr -d ' ')
echo "LEARNINGS: $_LEARN_COUNT entries loaded"
if [ "$_LEARN_COUNT" -gt 5 ] 2>/dev/null; then
~/.vibestack/bin/vibe-learnings-search --limit 5 2>/dev/null || true
fi
else
echo "LEARNINGS: none yet"
fi
Setup Browser Cookies
Import logged-in sessions from your real Chromium browser into the headless browse session.
CDP mode check
First, check if browse is already connected to the user's real browser:
$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false"
If CDP_MODE=true: tell the user "Not needed — you're connected to your real browser via CDP. Your cookies and sessions are already available." and stop. No cookie import needed.
How it works
- Find the browse binary
- Run
cookie-import-browserto detect installed browsers and open the picker UI - User selects which cookie domains to import in their browser
- Cookies are decrypted and loaded into the Playwright session
Steps
1. Find the browse binary
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
B=""
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/vibestack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/vibestack/browse/dist/browse"
[ -z "$B" ] && B="$HOME/.claude/skills/vibestack/browse/dist/browse"
if [ -x "$B" ]; then echo "READY: $B"; else echo "NEEDS_SETUP"; fi
If NEEDS_SETUP, stop and tell the user:
"The browse daemon is required for this skill but is not installed. vibestack does not bundle the browse daemon — it's a separate dependency. See docs/external-tools.md for current options."
2. Open the cookie picker
$B cookie-import-browser
This auto-detects installed Chromium browsers and opens an interactive picker UI in your default browser where you can:
- Switch between installed browsers
- Search domains
- Click "+" to import a domain's cookies
- Click trash to remove imported cookies
Tell the user: "Cookie picker opened — select the domains you want to import in your browser, then tell me when you're done."
3. Direct import (alternative)
If the user specifies a domain directly (e.g., /setup-browser-cookies github.com), skip the UI:
$B cookie-import-browser comet --domain github.com
Replace comet with the appropriate browser if specified.
4. Verify
After the user confirms they're done:
$B cookies
Show the user a summary of imported cookies (domain counts).
Notes
- On macOS, the first import per browser may trigger a Keychain dialog — click "Allow" / "Always Allow"
- On Linux,
v11cookies may requiresecret-tool/libsecret access;v10cookies use Chromium's standard fallback key - Cookie picker is served on the same port as the browse server (no extra process)
- Only domain names and cookie counts are shown in the UI — no cookie values are exposed
- The browse session persists cookies between commands, so imported cookies work immediately
Capabilities
Install
Quality
deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 15 github stars · SKILL.md body (3,279 chars)