Agent skill
browserbase-cli
Use the Browserbase CLI (`bb`) for Browserbase Functions and platform API workflows. Use when the user asks to run `bb`, deploy or invoke functions, manage sessions, projects, contexts, or extensions, fetch a page through the Browserbase Fetch API, or search the web through the Browserbase Search API. Prefer the Browser skill for interactive browsing; use `bb browse` only when the user explicitly wants the Browserbase CLI path.
Install this agent skill to your Project
npx add-skill https://github.com/browserbase/skills/tree/main/skills/browserbase-cli
SKILL.md
Browserbase CLI
Use the official bb CLI for Browserbase platform operations, Functions workflows, and Fetch API calls.
Setup check
Before using the CLI, verify it is installed:
which bb || npm install -g @browserbasehq/cli
bb --help
For authenticated commands, set the API key:
export BROWSERBASE_API_KEY="your_api_key"
If using bb functions dev or bb functions publish, also set:
export BROWSERBASE_PROJECT_ID="your_project_id"
When to use this skill
Use this skill when the user wants to:
- run Browserbase commands through
bb - scaffold, develop, publish, or invoke Browserbase Functions
- inspect or manage Browserbase sessions, projects, contexts, or extensions
- fetch a page through Browserbase without opening a browser session
- search the web through Browserbase without opening a browser session
When not to use this skill
- For interactive browsing, page inspection, screenshots, clicking, typing, or login flows, prefer the
browserskill. - For simple HTTP content retrieval where the user does not care about using the CLI specifically, the dedicated
fetchskill is often a better fit. - Use
bb browse ...only when the user explicitly wants the CLI wrapper or is already working in abb-centric workflow.
Command selection
bb functionsfor local dev, packaging, publishing, and invocationbb sessions,bb projects,bb contexts,bb extensionsfor Browserbase platform resourcesbb fetch <url>for Fetch API requestsbb search "<query>"for Search API requestsbb browse ...to forward to the standalonebrowsebinary (requires@browserbasehq/browse-cli)bb skills installto install Browserbase agent skills for Claude Code
For bb browse, the standalone browse CLI behavior is the source of truth: bb browse env local uses a clean isolated local browser by default, and bb browse env local --auto-connect opts into reusing an existing local Chrome session.
Common workflows
Functions
bb functions init my-function
cd my-function
bb functions dev index.ts
bb functions publish index.ts
bb functions invoke <function_id> --params '{"url":"https://example.com"}'
Use bb functions invoke --check-status <invocation_id> to poll an existing invocation instead of creating a new one.
Platform APIs
bb projects list
bb sessions get <session_id>
bb sessions downloads get <session_id> --output session-artifacts.zip
bb contexts create --body '{"region":"us-west-2"}'
bb extensions upload ./my-extension.zip
Fetch API
bb fetch https://example.com
bb fetch https://example.com --allow-redirects --output page.html
Search API
bb search "browser automation"
bb search "web scraping" --num-results 5
bb search "AI agents" --output results.json
Best practices
- Prefer
bb --helpand subgroup--helpbefore guessing flags. - Use dash-case flags exactly as shown in CLI help.
- Use
--output <file>onbb fetchandbb searchto save results to a file. - Use environment variables for auth unless the user explicitly wants one-off overrides.
- Pass structured request bodies with JSON strings in
--bodyor--params. - Remember that
bb functions ...uses--api-url, while platform API commands use--base-url. - If
bb browsefails becausebrowseis missing, either install@browserbasehq/browse-clior switch to thebrowserskill.
Troubleshooting
- Missing API key: set
BROWSERBASE_API_KEYor pass--api-key - Missing project ID on
bb functions devorbb functions publish: setBROWSERBASE_PROJECT_IDor pass--project-id - Unknown flag: rerun the relevant command with
--helpand use the exact dash-case form bb browseinstall error: runnpm install -g @browserbasehq/browse-cli
For command-by-command reference and more examples, see REFERENCE.md.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
fetch
Use this skill when the user wants to retrieve a URL without a full browser session: fetch HTML or JSON from static pages, inspect status codes or headers, follow redirects, or get page source for simple scraping. Prefer it over a browser when JavaScript rendering and page interaction are not needed. Supports proxies and redirect control.
search
Use this skill when the user wants to search the web without a full browser session: find URLs, titles, and metadata for a query. Prefer it over a browser when you just need search results, not page content. Returns structured results with titles, URLs, authors, and dates.
browser
Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Supports remote Browserbase sessions with automatic CAPTCHA solving, anti-bot stealth mode, and residential proxies — ideal for scraping protected websites, bypassing bot detection, and interacting with JavaScript-heavy pages.
functions
Deploy serverless browser automation as cloud functions using Browserbase. Use when the user wants to deploy browser automation to run on a schedule or cron, create a webhook endpoint for browser tasks, run automation in the cloud instead of locally, or asks about Browserbase Functions.
ui-test
AI-powered adversarial UI testing via the browse CLI. Analyzes git diffs to test only what changed, or explores the full app to find bugs. Tests functional correctness, accessibility, responsive layout, and UX heuristics. Use when the user asks to test UI changes, QA a pull request, audit accessibility, or run exploratory testing. Supports local browser (localhost) and remote Browserbase (deployed sites).
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.
Didn't find tool you were looking for?