Use this skill when the user explicitly wants to connect to a running Chrome browser, scan local CDP ports, specify a `cdp_port`, or share a single browser acro
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-browser-cdp-en-883af7eb88ec ,按照其中的说明把「browser_cdp」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Deprecated: This reference supports the stable
browserimplementation. hatch. Prefer the unifiedbrowsertool when experimental mode is enabled.
By default, browser opens no debugging port: the browser is managed directly by Playwright. This skill covers the cases where a CDP port is wanted on purpose.
This skill focuses on more "explicit" CDP usage:
connect_cdp)cdp_port when launching the browserIn other words:
start opens no debugging port, so users typically do not need to understand or be aware of CDP detailsPrivacy Recommendation
The default
startexposes nothing — no debugging port is opened. Only passcdp_portwhen the user explicitly wants another local tool to attach, and warn about the exposure first.
Warning: One browser instance per workspace
Only one browser can be running or connected per workspace at a time. If a browser instance already exists, you must execute
stopfirst before switching to a new browser or a new CDP connection.
Use this skill only when the user explicitly expresses one of the following intentions:
In the following cases, you should typically not use this skill:
In these cases, use the standard start, adding headed=true if needed — refer to browser_visible.
Default scan range is 9000–10000:
{"action": "list_cdp_targets"}
Specify a single port:
{"action": "list_cdp_targets", "port": 9222}
Custom scan range:
{"action": "list_cdp_targets", "port_min": 8000, "port_max": 12000}
Use cases:
Connect to an existing CDP endpoint:
{"action": "connect_cdp", "cdp_url": "http://localhost:9222"}
Characteristics:
open, snapshot, click, type, etc.stop only disconnects — it will not close the external browserUse cases:
If the user explicitly requests a fixed port, or needs to provide the endpoint to other tools, specify cdp_port in start:
{"action": "start", "cdp_port": 9222}
To also open a visible window:
{"action": "start", "headed": true, "cdp_port": 9222}
Current behavior:
cdp_port is already in use, an error is raised immediately — it will not forcefully reuse the portcdp_port is not specified, no port is opened and none is chosen automaticallyTherefore:
cdp_port proactively when the user has not explicitly requested a portcdp_port explicitly when the user requests a fixed port or external sharingThe current port strategy for multiple workspaces:
127.0.0.1:cdp_port is already in use; if so, fails immediately and prompts the user to choose a different port or stop the old processThis means:
cdp_port, the later one will fail because the port is already in useCDP-related stop behavior differs depending on the type:
For example:
{"action": "start", "cdp_port": 9222}
These browsers are launched and owned by QwenPaw. stop will:
For example:
{"action": "connect_cdp", "cdp_url": "http://localhost:9222"}
These browsers are not launched by QwenPaw. stop will only:
In short:
start opens no debugging port; surface CDP concepts to the user only when they explicitly ask for themprivate_mode is an explicit parameter for each start call and is not persisted as workspace state