Agent skill

Browser Automation with bb-browser

by epiral in epiral/bb-browser

Drives your real, logged-in Chrome browser from the command line to read pages, fill forms, fetch authenticated URLs and run ready-made site commands.

MITAuto-check passedProductivity & Automation

SKILL.md written in Chinese; this summary is our English description.

Install Browser Automation with bb-browser

skills CLI
$ npx skills add epiral/bb-browser --skill bb-browser -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install epiral/bb-browser bb-browser --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/epiral/bb-browser.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bb-browser .claude/skills/bb-browser && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bb-browser
GitHub stars
6.2k
Used in
1 other repo
Token cost
~2.2k tokens
SKILL.md length
181 words
Files
5 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Drives your real, logged-in Chrome browser from the command line to read pages, fill forms, fetch authenticated URLs and run ready-made site commands.

  • Works in 5 steps: open 打开页面 → snapshot -i 查看可操作元素(返回 @ref) → 用 @ref 执行操作(click, fill, etc.) → …
  • Reading a page that only works behind your login
  • SKILL.md covers 核心价值, 快速开始, Site 系统 — 把任何网站变成命令行 API and fetch — 带登录态的 curl, plus 9 more sections
  • Reaches site-a.com and site-b.com

What it does

The tool runs in your own browser and reuses accounts you are already signed in to, so it can read public pages, search results and news as well as internal systems, post-login pages and account data. It can also act for you: filling forms, clicking buttons, extracting data, saving screenshots and doing batch operations. The core loop is to `open` a page, take an interactive `snapshot -i` that returns element references, act on those references, snapshot again after the page changes and `close` any tab the agent opened.

A site system turns websites into command-line APIs through adapters that cover more than 36 platforms, with commands to list and search adapters, tab handling and login-error detection built in, and a guide for writing custom adapters. A `fetch` command runs requests inside the browser context so cookies and login state are carried along, and the description also mentions network interception and mocking and operation recording. Reference files cover the site system, adapter development, fetch and network, and snapshot refs.

When your agent uses it

  • Reading a page that only works behind your login
  • Filling and submitting a web form through your own browser
  • Calling a website's own endpoints with your session cookies
  • Running a ready-made site command instead of scraping by hand

Example prompts

  • “Open my company's internal dashboard in the browser and extract the table of open tickets.”
  • “Fetch this JSON endpoint with my logged-in session and show me the response.”
  • “List the bb-browser site adapters available and run one that searches for a product.”
  • “Take a screenshot of the billing page and save it to ./billing.png.”

Requirements

  • The `bb-browser` CLI
  • A Chrome browser where you are already logged in
  • Pre-approved tools (allowed-tools): Bash(bb-browser:*)

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. open 打开页面
  2. snapshot -i 查看可操作元素(返回 @ref)
  3. 用 @ref 执行操作(click, fill, etc.)
  4. 页面变化后重新 snapshot -i
  5. 任务完成后 close 关闭 tab

What it can do on your machine

Read from SKILL.md and the folder at commit 7975dc7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(bb-browser:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • site-a.com
    • site-b.com
    • site-c.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Browser Automation with bb-browser loads about 2.2k tokens when it runs, and up to ~9.1k if it reads all its reference files. Until then it costs about 38 tokens; SKILL.md has 181 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from epiral/bb-browser at commit 7975dc7, republished under its MIT licence (© epiral). 181 words, ~2,169 tokens.

Download SKILL.mdSave it as .claude/skills/bb-browser/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
bb-browser
description
强大的信息获取与浏览器自动化工具。通过浏览器 + 用户登录态,获取公域和私域信息。可访问任意网页、内部系统、登录后页面,执行表单填写、信息提取、页面操作。支持 site 系统(36 平台 103 命令一键调用)、带登录态的 fetch、网络请求拦截与 mock、操作录制等高级功能。
allowed-tools
Bash(bb-browser:*)

bb-browser - 信息获取与浏览器自动化

核心价值

通过浏览器 + 用户登录态,可以获取:

  • 公域信息:任意公开网页、搜索结果、新闻资讯
  • 私域信息:内部系统、企业应用、登录后页面、个人账户数据

还可以代替用户执行浏览器操作:表单填写、按钮点击、数据提取、截图保存、批量操作。

运行在用户真实浏览器中,复用已登录的账号,不触发反爬检测。

快速开始

bash
bb-browser open <url>        # 打开页面(新 tab)
bb-browser snapshot -i       # 获取可交互元素
bb-browser click @5          # 点击元素
bb-browser fill @3 "text"    # 填写输入框
bb-browser close             # 完成后关闭 tab

Site 系统 — 把任何网站变成命令行 API

site 系统是 bb-browser 的核心特性,通过 adapter 将网站功能 CLI 化,覆盖 36+ 平台。

bash
# 常用命令
bb-browser site list                          # 列出所有 adapter
bb-browser site search <query>                # 搜索 adapter
bb-browser site <name> [args...]              # 运行 adapter
bb-browser site update                        # 更新社区 adapter 库

# 使用示例
bb-browser site twitter/search "Claude Code"  # 搜索推文
bb-browser site zhihu/hot                     # 知乎热榜
bb-browser site github/repo owner/repo        # 仓库信息
bb-browser site youtube/transcript <video_id> # 获取字幕
bb-browser site reddit/thread <url>           # 帖子详情
bb-browser site eastmoney/stock "茅台"         # 股票查询
bb-browser site weibo/hot                     # 微博热搜
bb-browser site arxiv/search "transformer"    # 论文搜索

adapter 自动处理 tab 管理(查找匹配域名的 tab 或新建),自动检测登录错误并提示。

详细用法和 36 平台完整列表:参见 references/site-system.md 创建自定义 adapter:参见 references/adapter-development.md

fetch — 带登录态的 curl

在浏览器上下文中执行 fetch,自动携带 Cookie 和登录态。

bash
bb-browser fetch <url>                                    # GET 请求
bb-browser fetch <url> --method POST --body '{"k":"v"}'   # POST 请求
bb-browser fetch <url> --headers '{"Auth":"Bearer xxx"}'  # 自定义请求头
bb-browser fetch <url> --output data.json                 # 保存到文件
bb-browser fetch /api/me.json                             # 相对路径(用当前 tab 的 origin)

自动域名路由:绝对路径自动查找匹配 tab 或新建;相对路径使用当前 tab。

详细用法:参见 references/fetch-and-network.md

Tab 管理规范

操作完成后必须关闭自己打开的 tab。

bash
# 单 tab 场景
bb-browser open https://example.com    # 打开新 tab
bb-browser snapshot -i
bb-browser click @5
bb-browser close                        # 完成后关闭

# 多 tab 场景
bb-browser open https://site-a.com     # tabId: 123
bb-browser open https://site-b.com     # tabId: 456
# ... 操作 ...
bb-browser tab close                    # 关闭当前 tab
bb-browser tab close                    # 关闭剩余 tab

# 指定 tab 操作
bb-browser open https://example.com --tab current  # 在当前 tab 打开(不新建)
bb-browser open https://example.com --tab 123      # 在指定 tabId 打开

核心工作流

  1. open 打开页面
  2. snapshot -i 查看可操作元素(返回 @ref)
  3. 用 @ref 执行操作(click, fill, etc.)
  4. 页面变化后重新 snapshot -i
  5. 任务完成后 close 关闭 tab

命令速查

导航
bash
bb-browser open <url>                # 打开 URL(新 tab)
bb-browser open <url> --tab current  # 在当前 tab 打开
bb-browser back                      # 后退
bb-browser forward                   # 前进
bb-browser refresh                   # 刷新
bb-browser close                     # 关闭当前 tab
快照
bash
bb-browser snapshot             # 完整页面结构
bb-browser snapshot -i          # 只显示可交互元素(推荐)
bb-browser snapshot -c          # 移除空结构节点
bb-browser snapshot -d 3        # 限制树深度为 3 层
bb-browser snapshot -s ".main"  # 限定 CSS 选择器范围
bb-browser snapshot --json      # JSON 格式输出
# 选项可组合:bb-browser snapshot -i -c -d 5
元素交互
bash
bb-browser click @5             # 点击
bb-browser hover @5             # 悬停
bb-browser fill @3 "text"       # 清空并填写
bb-browser type @3 "text"       # 追加输入(不清空)
bb-browser check @7             # 勾选复选框
bb-browser uncheck @7           # 取消勾选
bb-browser select @4 "option"   # 下拉选择
bb-browser press Enter          # 按键
bb-browser press Control+a      # 组合键
bb-browser scroll down          # 向下滚动(默认 300px)
bb-browser scroll up 500        # 向上滚动 500px
获取信息
bash
bb-browser get text @5          # 获取元素文本
bb-browser get url              # 获取当前 URL
bb-browser get title            # 获取页面标题
Tab 管理
bash
bb-browser tab                  # 列出所有 tab
bb-browser tab new [url]        # 新建 tab
bb-browser tab 2                # 切换到第 2 个 tab(按 index)
bb-browser tab select --id 123  # 切换到指定 tabId 的 tab
bb-browser tab close            # 关闭当前 tab
bb-browser tab close 3          # 关闭第 3 个 tab(按 index)
bb-browser tab close --id 123   # 关闭指定 tabId 的 tab
截图
bash
bb-browser screenshot           # 截图(自动保存)
bb-browser screenshot path.png  # 截图到指定路径
等待
bash
bb-browser wait 2000            # 等待 2 秒
bb-browser wait @5              # 等待元素出现
JavaScript
bash
bb-browser eval "document.title"              # 执行 JS
bb-browser eval "window.scrollTo(0, 1000)"    # 滚动到指定位置
Frame 切换
bash
bb-browser frame "#iframe-id"   # 切换到 iframe
bb-browser frame main           # 返回主 frame
对话框处理
bash
bb-browser dialog accept        # 确认对话框
bb-browser dialog dismiss       # 取消对话框
bb-browser dialog accept "text" # 确认并输入(prompt)
网络与调试
bash
bb-browser network requests                        # 查看网络请求
bb-browser network requests "api" --with-body       # 过滤 + 完整请求/响应体
bb-browser network route "*analytics*" --abort      # 拦截并阻止请求
bb-browser network route "*/api/user" --body '{}'   # 拦截并 mock 响应
bb-browser network unroute                          # 移除所有拦截规则
bb-browser network clear                            # 清空请求记录
bb-browser console                                  # 查看控制台消息
bb-browser console --clear                          # 清空控制台
bb-browser errors                                   # 查看 JS 错误
bb-browser errors --clear                           # 清空错误记录
bb-browser trace start                              # 开始录制用户操作
bb-browser trace stop                               # 停止录制,输出事件列表
bb-browser trace status                             # 查看录制状态

详细的 network 高级用法:参见 references/fetch-and-network.md

全局选项

bash
--json               # 以 JSON 格式输出(所有命令通用)
--tab <tabId>        # 指定操作的标签页 ID(几乎所有命令通用)
--mcp                # 启动 MCP server(用于 Claude Code / Cursor 等 AI 工具)

Ref 使用说明

snapshot 返回的 @ref 是元素的临时标识:

@1 [button] "提交"
@2 [input type="text"] placeholder="请输入姓名"
@3 [a] "查看详情"

注意:

  • 页面导航后 ref 失效,需重新 snapshot
  • 动态内容加载后需重新 snapshot
  • ref 格式:@1, @2, @3...

详细说明:参见 references/snapshot-refs.md

并发操作

bash
# 并发打开多个页面(各自独立 tab)
bb-browser open https://site-a.com &
bb-browser open https://site-b.com &
bb-browser open https://site-c.com &
wait
# 每个返回独立的 tabId,互不干扰

信息提取 vs 页面操作

根据目的选择不同的方法:

提取页面内容(用 eval)

当需要提取文章、正文等长文本时,用 eval 直接获取:

bash
# 微信公众号文章
bb-browser eval "document.querySelector('#js_content').innerText"

# 知乎回答
bb-browser eval "document.querySelector('.RichContent-inner').innerText"

# 通用:获取页面主体文本
bb-browser eval "document.body.innerText.substring(0, 5000)"

# 获取所有链接
bb-browser eval "[...document.querySelectorAll('a')].map(a => a.href).join('\n')"

有些网站 DOM 嵌套很深,snapshot 输出冗长,eval 直接提取文本更高效。

操作页面元素(用 snapshot -i)

当需要点击、填写、选择时,用 snapshot -i 获取可交互元素:

bash
bb-browser snapshot -i
# @1 [button] "登录"
# @2 [input] placeholder="用户名"
# @3 [input type="password"]

bb-browser fill @2 "username"
bb-browser fill @3 "password"
bb-browser click @1

-i 只显示可交互元素,过滤掉大量无关内容。

MCP 集成

bb-browser 提供 MCP server,可与 Claude Code / Cursor 等 AI 工具集成:

bash
# 启动 MCP server
bb-browser --mcp

配置示例(Claude Code / Cursor):

json
{
  "mcpServers": {
    "bb-browser": {
      "command": "npx",
      "args": ["-y", "bb-browser", "--mcp"]
    }
  }
}

常见任务示例

表单填写
bash
bb-browser open https://example.com/form
bb-browser snapshot -i
bb-browser fill @1 "张三"
bb-browser fill @2 "zhangsan@example.com"
bb-browser click @3
bb-browser wait 2000
bb-browser close
信息提取
bash
bb-browser open https://example.com/dashboard
bb-browser snapshot -i
bb-browser get text @5
bb-browser screenshot report.png
bb-browser close
批量操作
bash
for url in "url1" "url2" "url3"; do
  bb-browser open "$url"
  bb-browser snapshot -i --json
  bb-browser close
done

深入文档

文档说明
references/site-system.mdSite 系统完整指南:35 平台列表、命令用法、自动 tab 管理
references/adapter-development.mdAdapter 开发指南:API 逆向、三层复杂度、元数据格式
references/fetch-and-network.mdFetch 与 Network 高级功能:带登录态请求、请求拦截与 mock
references/snapshot-refs.mdRef 生命周期、最佳实践、常见问题

© epiral, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/bb-browser of epiral/bb-browser.

  • SKILL.md
  • references/adapter-development.md
  • references/fetch-and-network.md
  • references/site-system.md
  • references/snapshot-refs.md

Open the folder on GitHubat commit 7975dc7

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in epiral/bb-browser, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Browser Automation with bb-browser next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Browser Automation with bb-browser compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Browser Automation with bb-browser this skillepiral/bb-browser6.2k1 repos~2.2kAutomated safety check: PassMIT
Web Access via Browser CDPeze-is/web-access9.1k4 repos~2.2kAutomated safety check: PassMIT
Skyvern Browser AutomationSkyvern-AI/skyvern23k1 repos~2.9kAutomated safety check: PassAGPL-3.0
Browser Harnessbrowser-use/browser-harness18k—~3.6kAutomated safety check: PassMIT
Skyvern Browser AutomationSkyvern-AI/skyvern23k—~1.9kAutomated safety check: PassAGPL-3.0
Reddit JSON Fetcherykdojo/claude-code-tips10k—~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Routes every web task, from searching to logged-in browsing, through a tiered choice of search, fetch, curl or a real Chrome or Edge session driven over CDP.

    9.1k GitHub starsUsed in 4 repos~2.2k tokens
    Productivity & AutomationAuto-check passed
  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Picks the right Skyvern CLI command for a web task, from quick yes/no checks to reusable multi-page workflows, instead of falling back to plain page fetching.

    23k GitHub starsUsed in 1 repo~2.9k tokens
    Productivity & AutomationAuto-check passed
  • Browser Harness

    browser-use/browser-harness

    Controls a real Chrome browser over CDP for clicking, typing, navigation, logged-in sessions and JavaScript-heavy or bot-protected pages.

    18k GitHub stars~3.6k tokensUpdated 11 days ago
    Productivity & AutomationAuto-check passed
  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Automates websites with Skyvern's AI browser agent to fill forms, extract data, download files, log in and run multi-step workflows through SDKs, REST, MCP or a CLI.

    23k GitHub stars~1.9k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Reddit JSON Fetcher

    ykdojo/claude-code-tips

    Fetches Reddit posts, threads and search results as JSON through a browser session, using a DuckDuckGo redirect to get past Reddit's automated-access block.

    10k GitHub stars~1.4k tokensUpdated 13 days ago
    Productivity & AutomationAuto-check passed
  • Browser Harness

    davidondrej/skills

    Direct browser control via CDP. An agent skill from davidondrej/skills.

    4.1k GitHub starsUsed in 2 repos~3k tokens
    Productivity & AutomationAuto-check passed

More from epiral/bb-browser

  • Runs structured data commands against sites such as Twitter, Reddit, GitHub, YouTube and Zhihu through OpenClaw's browser, reusing your existing login state.

    6.2k GitHub stars~1k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Browser Automation with bb-browser

What does Browser Automation with bb-browser do?

Drives your real, logged-in Chrome browser from the command line to read pages, fill forms, fetch authenticated URLs and run ready-made site commands. The tool runs in your own browser and reuses accounts you are already signed in to, so it can read public pages, search results and news as well as internal systems, post-login pages and account data. It can also act for you: filling forms, clicking buttons, extracting data, saving screenshots and doing batch operations.

When should I use Browser Automation with bb-browser?

Browser Automation with bb-browser fits situations like: reading a page that only works behind your login; filling and submitting a web form through your own browser; calling a website's own endpoints with your session cookies; running a ready-made site command instead of scraping by hand.

How do I install Browser Automation with bb-browser in Claude Code?

Run `npx skills add epiral/bb-browser --skill bb-browser -a claude-code`. Or copy the skill folder (skills/bb-browser in epiral/bb-browser) into .claude/skills/bb-browser in your project. Claude Code loads it when a task matches its description.

How do I install Browser Automation with bb-browser in Codex?

Run `npx skills add epiral/bb-browser --skill bb-browser -a codex`. Or copy the skill folder (skills/bb-browser in epiral/bb-browser) into .agents/skills/bb-browser in your project. Codex loads it when a task matches its description.

Can I use Browser Automation with bb-browser in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add epiral/bb-browser --skill bb-browser -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bb-browser, .gemini/skills/bb-browser, .github/skills/bb-browser and .opencode/skills/bb-browser in your project.

What does Browser Automation with bb-browser need to run?

SKILL.md names no scripts, command-line tools or credentials: Browser Automation with bb-browser is instructions for the agent only. Our summary lists: The `bb-browser` CLI; A Chrome browser where you are already logged in. Its frontmatter pre-approves these tools: Bash(bb-browser:*).

Does Browser Automation with bb-browser access the network?

SKILL.md names 3 domains. In commands or code: site-a.com, site-b.com and site-c.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Browser Automation with bb-browser safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Browser Automation with bb-browser use?

Browser Automation with bb-browser is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Browser Automation with bb-browser use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7k tokens, read only when the agent opens those files.

What are the alternatives to Browser Automation with bb-browser?

Skills that share tags, products or a category with Browser Automation with bb-browser: Web Access via Browser CDP (eze-is/web-access, 9.1k stars), Skyvern Browser Automation (Skyvern-AI/skyvern, 23k stars), Browser Harness (browser-use/browser-harness, 18k stars) and Skyvern Browser Automation (Skyvern-AI/skyvern, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Browser Automation with bb-browser?

epiral (a GitHub organization) maintains it in epiral/bb-browser, which has 6,237 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on May 29, 2026.

Source: epiral/bb-browser on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.