Skip to content

[STG-1692] refactor: rewrite cookie-sync skill to use bb sync CLI#58

Open
shrey150 wants to merge 1 commit intomainfrom
shrey/cookie-sync-bb-cli
Open

[STG-1692] refactor: rewrite cookie-sync skill to use bb sync CLI#58
shrey150 wants to merge 1 commit intomainfrom
shrey/cookie-sync-bb-cli

Conversation

@shrey150
Copy link
Contributor

@shrey150 shrey150 commented Mar 26, 2026

Summary

  • Replaces the standalone cookie-sync.mjs script (308 lines + Stagehand/SDK dependencies) with the new bb sync command from @browserbasehq/cli
  • Removes package.json, package-lock.json, and scripts/ directory — no more npm install needed
  • Updates SKILL.md, REFERENCE.md, and EXAMPLES.md to document bb sync flags and workflows

Why

The bb sync command was added to the CLI (@browserbasehq/cli) and does everything the standalone script did (local Chrome CDP discovery, cookie export, context creation, cookie injection) but as a first-class CLI command. This means:

  • Zero setup for users who already have bb installed
  • No skill-local node_modules or dependency management
  • JSON output on stdout (pipe-friendly) with progress on stderr
  • Consistent UX with other bb commands

Test plan

  • Ran bb sync --domains github.com — exported 6,153 cookies, filtered to 15, injected into context
  • Ran bb sync --domains google.com,github.com — filtered to 119 cookies, injected into context
  • Verified JSON output is parseable with jq
  • Spawned a subagent that read the new SKILL.md and successfully followed the instructions end-to-end

🤖 Generated with Claude Code


Note

Low Risk
Low risk because changes are limited to the cookie-sync skill docs and removal of bundled Node script/dependencies; main risk is users now depend on @browserbasehq/cli availability and its bb sync behavior/output.

Overview
Replaces the cookie-sync skill’s standalone Node/Stagehand implementation with the Browserbase CLI’s bb sync command, updating all examples/workflows to use bb sync JSON output and flags (e.g., --domains, --context-id, --stealth, --proxy).

Removes the skill-local implementation and npm artifacts (scripts/cookie-sync.mjs, package.json, package-lock.json), and refreshes SKILL.md/REFERENCE.md troubleshooting and setup guidance to assume a global bb install.

Written by Cursor Bugbot for commit 8adb29a. This will update automatically on new commits. Configure here.

Replaces the standalone Node.js script with the new `bb sync` command
from @browserbasehq/cli, eliminating the need for npm install and
direct Stagehand/SDK dependencies in the skill.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shrey150 shrey150 changed the title [STG-TBD] refactor: rewrite cookie-sync skill to use bb sync CLI [STG-1692] refactor: rewrite cookie-sync skill to use bb sync CLI Mar 26, 2026
@shrey150
Copy link
Contributor Author

Companion CLI PR with the bb sync command implementation: https://github.com/browserbase/cli/pull/32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant