Skip to content
Agent Orchestration
Skill

/browser-automation

Use the Browser Automation BB plugin to inspect and automate persistent browser pages in an explicit desktop or local headless session. Use for browser navigation, snapshots, clicking, forms, and verification screenshots.

From plugin
bb
5.7k32 skills

Claude Code

$ npx -y skills add get-bb/bb --skill browser-automation --agent claude-code

SKILL.md

browser-automation.SKILL.md
name: browser-automation
description: Use the Browser Automation BB plugin to inspect and automate persistent browser pages in an explicit desktop or local headless session. Use for browser navigation, snapshots, clicking, forms, and verification screenshots.

Use `bb browser-automation`. Open one session, retain its session ID, then inspect, act, and verify in short scripts.

`--machine` accepts an exact host ID or an unambiguous machine name. Exact IDs take precedence over names; unknown or ambiguous names fail before opening a session.

Choose `--backend local --headless --machine <host-id>` for headless Chrome on an enrolled host. Choose `--backend desktop --machine <host-id> --desktop <instance-id>` for a new desktop automation tab. Desktop tabs use the BB browser's profile, including the user's signed-in cookies. Starting desktop control opens the side panel and selects the browser tab only if its thread is already focused. New or activated controller pages follow the same rule; automation does not switch threads or bring the desktop window forward. While controlled, a desktop tab never takes keyboard focus from the composer or other apps; the user presses Take over to type into it. Headless sessions remain headless. Plugin-owned local/headless Chrome launches with `--no-sandbox`, disabling Chrome's sandbox. Desktop attachment does not change the browser's launch flags. Resolve the explicit instance with `bb browser instances --host <host-id> --json` first. Never silently choose a different host or mode. Adding `--tab <tab-id>` takes control of an existing tab; do so only when the user asked to use that tab. The CLI uses the current thread, or `--thread <id>` outside a thread. Each session belongs to that thread.

CLI opening:

bb browser-automation open --backend local --headless --machine <host-id> --json
bb browser-automation open --backend desktop --machine <host-id> --desktop <instance-id> --json

Run scripts:

bb browser-automation run <session-id> --script 'const p = await browser.getPage("main"); await p.goto("https://example.com"); await p.snapshot()' --json
bb browser-automation run <session-id> --script 'const p = await browser.getPage("main"); await p.click("ref/e6"); await p.snapshot()' --json
bb browser-automation screenshot <session-id> --page main --json

Take a fresh snapshot before using refs after navigation or document changes. Use refs from that session's DevBrowser snapshot. Do not mix agent-browser refs or invent selectors. Prefer a cheap URL/text/snapshot check after each action; request a screenshot when visual verification matters. Use `await p.shot({type:"jpeg",maxEdge:960,quality:70}); undefined` inside scripts to return a bounded JPEG file.

`run` and `screenshot` return JSON with `hostId` and `images`, where each image has `path`, `mimeType`, `width`, and `height`. The path is in the browser session's temporary directory on that host. Use your image-reading tool on the path when you are on the same machine. If the browser host differs, fetch the image to local temporary storage first (substitute the returned path and host ID):

bb file read '<image-path>' --host '<host-id>' --json | node -e '
const fs = require("node:fs"), os = require("node:os"), path = require("node:path");
const file = JSON.parse(fs.readFileSync(0, "utf8"));
if (file.contentEncoding !== "base64") throw new Error("Expected binary image");
const destination = path.join(fs.mkdtempSync(path.join(os.tmpdir(), "browser-image-")), "capture.jpg");
fs.writeFileSync(destination, Buffer.from(file.content, "base64"), {mode: 0o600});
console.log(destination);
'

Read the printed local path with your image-reading tool. Do not print base64 image bytes into the conversation. Read or copy captures before closing the session: cleanup removes its temporary directory. Remove local copies when finished.

A local headless `open` returns a `previewDirective`, for example `::browser-preview{session="<session-id>"}`. Copy it into your next message exactly once as a standalone line, before you continue working. Do not wrap it in backticks or a code fence, and do not invent or edit the session ID. BB renders it as a live view of that browser in the chat, which the user can expand, so they can watch while you work. Desktop sessions return no directive; that browser is already visible in the side panel. `bb browser-automation preview <session-id> --json` reports the live frame's `url`, `title`, size, and `sequence` without image bytes; it is not a substitute for `screenshot` when you need to see the page.

`pages` lists persistent pages. Runs serialize within a session. Scripts are trusted JavaScript with Puppeteer-style DevBrowser APIs, not a sandbox. `--script-file` requires `--script-host <host-id>` naming the source host explicitly. Browser file operations and `localhost` refer to the browser host. Transfer files explicitly.

Stop cancels running and queued work and releases desktop control. Cancellation and timeout stop the session too; open a new session to resume. A run whose output passes 512 KB fails with exit code 1 but keeps the session open; return or print less and run again. Close disposes owned Chrome and desktop tabs the session opened while preserving a `--tab` tab. Close sessions after use. When `close` or `stop` fails, the session still accepts no more commands, but its browser may still be running; run `close` again to retry cleanup. `run`, `pages`, and `screenshot` renew expiry at their start and completion to 30 minutes later, capped at eight hours from creation. Active scripts are not idle; the hard deadline still stops running work. `list` and live preview do not renew expiry. Desktop leases and connections cannot be renewed through the current API, so desktop sessions still end at their earlier deadline (at most 30 minutes from creation). Timeouts default to 30 seconds, maximum 120 seconds: pass either `--timeout-ms <1000-120000>` or `--timeout <du

Read more
@get-bb
Ships withbb

bb is an agentic IDE that builds itself. It can control, customize, and automate itself, laying the groundwork for your own software factory. Every surface — the desktop app, web app, CLI, and HTTP API — is a first-class way to drive bb.

Stars on GitHub

Momentum

stars in total
5.7k
Star history of get-bb/bb on GitHub, a chart by star-history.com

Other skills on bb.

account-pool

account-pool

Configure or diagnose Account Pooler accounts, authentication, quota routing, and failover through bb pool.

@get-bb@get-bbInstall Skill
agent-annotations

agent-annotations

Create or edit element annotations in desktop Browser tabs, or update saved annotation comments through the plugin RPC.

@get-bb@get-bbInstall Skill
automations

automations

Schedule or manage recurring and one-shot BB agent or script automations.

@get-bb@get-bbInstall Skill
bb-account

bb-account

Sign this bb in to or out of its getbb.app account with bb account, and check which account remote access and hosted services use.

@get-bb@get-bbInstall Skill
bb-cloud-ai

bb-cloud-ai

Check, turn off, or troubleshoot bb cloud, the hosted service that writes thread titles and commit messages and transcribes voice…

@get-bb@get-bbInstall Skill
bb-cli

bb-cli

Inspect or manage BB state with the bb CLI; use for BB commands and configuration.

@get-bb@get-bbInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca1d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip2d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about browser-automation.

Which coding agents can use browser-automation?
browser-automation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.