browser-use
它能做什么
这个技能让你的智能体操作真实的浏览器,完成需要点击、输入或已登录会话的任务。适合需要比简单读取页面更多功能的开发者和高级用户。
适用场景
- ✓当任务需要在网站中点击、输入或导航的时候。
- ✓当页面需要 JavaScript 才能加载,或者会阻止简单请求的时候。
- ✓当你希望智能体使用你已登录的浏览器会话的时候。
技能链接
https://github.com/browser-use/browser-use/blob/main/browser_use/skills/browser-use/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我打开我的网店后台页面,找出今天的订单,并告诉我有多少个。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体通过 Chrome DevTools Protocol 连接浏览器,打开标签页,读取页面,并执行点击和输入。对于简单的读取,会先尝试普通的网页抓取。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Browser Use
Direct browser control via CDP. For task-specific edits, use agent-workspace/agent_helpers.py. For setup, install, or connection problems, read https://github.com/browser-use/browser-harness/blob/main/install.md.
When Not to Use
A basic fetch of public information needs no browser. If a plain HTTP request can read it — a public page, an API, docs — use curl or your fetch tool, and leave the browser alone. Use browser-use when the task needs interaction (click, type, navigate), the user's logged-in session, JS rendering, or a bot-protected page. If a direct fetch fails or returns a shell page, then escalate to the browser.
Domain skills are off by default. Set BH_DOMAIN_SKILLS=1 to enable them; see the bottom section.
If BH_DOMAIN_SKILLS=1 and the task is site-specific, read every file in the matching $BH_AGENT_WORKSPACE/domain-skills/<site>/ directory before inventing an approach.
Usage
browser-use <<'PY'
print(page_info())
PY
- Invoke as
browser-use. Use heredocs for multi-line commands. - Helpers are pre-imported.
run.pycallsensure_daemon()beforeexec. - First navigation for a task is
new_tab(url), notgoto_url(url). The daemon preserves the attached tab across separate CLI invocations, so do not callnew_tab()again in every script. - Keep one working tab per task/site. Before opening another, inspect
current_tab()andlist_tabs()and useswitch_tab()to reuse a matching tab. Do not leave duplicate tabs on the same URL or close tabs you did not create. - At task completion, close tabs created for the task that are no longer needed. Keep a tab open if the user needs to see it, it is needed for a known follow-up, or closing it could discard unsaved work or other important state.
new_tab()andswitch_tab()attach and move the horse marker without changing Chrome's visible tab. Screenshots and normal CDP input work in the background. Never callactivate_tab(target)automatically: it brings Chrome to the foreground. Call it only when the user explicitly asks to see or visibly switch to that tab. Do not pairswitch_tab()withactivate_tab().- A local daemon is a connection to the whole Chrome instance, not to one site,
task, card, or agent. Omit
BU_NAMEand reuse the default daemon for normal sequential local work across websites, tabs, screenshots, and Codex turns. Do not invent per-job names such asgmail1375orslack1371: every new local daemon opens another browser-level CDP connection and Chrome may show another Allow prompt. - Set
BH_TAB_MARKER=0before starting the daemon to leave page titles unchanged. The horse marker remains enabled by default. - A timeout or page that pauses while hidden is not permission to foreground
Chrome. Keep using background CDP operations. For a focus-gated page,
temporarily call
cdp("Emulation.setFocusEmulationEnabled", enabled=True), perform and verify the operation, then disable it in afinallyblock. If background control still cannot work, report that limitation instead of activating the tab. Do not invent aRuntime.evaluatescroll replacement or a cross-frame JS walker. - The normal local flow attaches to the running Chrome/Chromium CDP endpoint. No browser ids or local profile selection.
Local Chrome
The default daemon can keep many tabs and visit many sites; browser-use has
no per-site, screenshot, or result-count limit that requires a new daemon.
Chrome memory and page complexity are the practical limits. Reuse matching tabs
with list_tabs() and switch_tab().
One daemon has one mutable attached/current tab. Many agents can share it when their browser operations are serialized: treat local Chrome as one shared browser lane while non-browser work continues in parallel. Sequential tab switching, input, and screenshot capture are safe. Do not create another local daemon merely because several agents exist.
Two agents that switch tabs and act simultaneously can race, causing one to act on or capture the other's tab. For truly simultaneous interactive work, use separate remote browsers when Browser Use Cloud authentication is already available. Otherwise serialize browser operations through the default local daemon. A named local daemon is a last resort when simultaneous isolation is required, remote auth is unavailable or unsuitable, and the extra Chrome approval prompt is acceptable. It creates another controller and dedi
常见问题
什么时候不应该使用它?
对于简单的公开页面,说明中提到普通抓取就足够了,不需要浏览器。
它可以使用我已登录的会话吗?
可以。说明中提到,用户已登录的会话是使用浏览器的理由之一。
它需要设置吗?
需要。该技能指向安装指南,以解决设置和连接问题。
详情
作者的原始描述
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers hosted cloud browsers for AI agents: the browser-use Python library (Browser(use_cloud=True)), Playwright, Puppeteer or any CDP client.
repo: browser-use/browser-use
热度
- GitHub 星标
- 120k
- 排名
- #733
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
cloud
120k帮你的智能体使用 Browser Use Cloud,这是一个托管服务,可通过其 API 和 SDK 运行浏览器自动化。
open-source
120k帮你的智能体使用开源的 browser-use 库编写 Python 代码,包括智能体、浏览器、自定义工具和 LLM 设置。
qa
120k帮你的智能体在真实浏览器中测试网站或网页应用,并给出 1 到 5 分的质量评分和依据。
remote-browser
120k帮你的智能体从没有可用本地 Chrome 的机器上,控制一个隔离的 Browser Use Cloud 浏览器。