Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/mateaix/mateclaw/browser_cdpnpx skills add mateaix/mateclaw --skill browser_cdpgit clone --depth 1 https://github.com/mateaix/mateclawWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00044 | $0.00762 |
| Opus 5 | $0.00022 | $0.00381 |
| Sonnet 5 | $0.00009 | $0.00152 |
| Haiku 4.5 | $0.00004 | $0.00076 |
Grade A, and why
browser_cdp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
浏览器 CDP 使用
仅在用户明确提出以下需求时使用本技能:
- 连接到已打开的 Chrome(附着现有实例)
- 扫描本机有哪些 CDP 端口可用
- 用固定调试端口启动浏览器
- 让多个工具 / Agent 共享同一浏览器
普通"打开浏览器"需求请用 browser_visible 技能。
场景一:扫描本机 CDP 端口
browser_use(action="list_cdp_targets")
扫描指定端口:
browser_use(action="list_cdp_targets", cdpPort=9222)
场景二:连接已有 Chrome
用户已手动用调试端口启动了 Chrome:
browser_use(action="connect_cdp", url="http://localhost:9222")
连接后可正常使用 open / snapshot / click / type 等操作。
注意:
stop只断开连接,不会关闭用户的 Chrome 进程。
场景三:启动时指定固定 CDP 端口
browser_use(action="start", cdpPort=9222)
可见窗口 + 固定端口:
browser_use(action="start", headed=true, cdpPort=9222)
仅在用户明确要求固定端口时才传
cdpPort,否则让系统自动选择空闲端口以避免冲突。
手动启动 Chrome(带调试端口)
若用户需要先手动打开 Chrome 再连接:
macOS:
execute_shell_command(
command="\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" --remote-debugging-port=9222 --no-first-run --no-default-browser-check"
)
Windows:
execute_shell_command(
command="\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --remote-debugging-port=9222 --no-first-run"
)
Linux:
execute_shell_command(
command="google-chrome --remote-debugging-port=9222 --no-first-run &"
)
stop 行为区别
| 启动方式 | stop 效果 |
|---|---|
browser_use(action="start") |
断开连接 + 关闭 Chrome 进程 |
browser_use(action="connect_cdp", ...) |
仅断开连接,不关闭外部 Chrome |
与 browser_visible 的分工
| 需求 | 用哪个技能 |
|---|---|
| 显示 / 隐藏浏览器窗口 | browser_visible |
| 连接 / 暴露 / 扫描 CDP 端口 | browser_cdp(本技能) |
安全提醒
- CDP 端口暴露后,本机任何进程都可以控制该浏览器(包括读取 Cookies)
- 不要在公共 / 多用户服务器上暴露 CDP 端口
- 用完后及时
stop断开连接
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 101 lines · 44 tokens per session scan A 9af168daa864
browser_cdp is a skill published in the GitHub repository mateaix/mateclaw (1,061 stars, last pushed 2d ago), licensed Apache-2.0. It adds 44 tokens to every session and 762 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
dingtalk_channel_connect
Use a headed browser to automatically complete DingTalk channel integration for QwenPaw. Applicable when the user mentions DingTalk, developer console, Client ID, Client Secret, bot, Stream mode, binding or configuring a channel. Supports pausing when a login page is detected and resuming after the user logs in.
dingtalk_channel_connect
使用可视浏览器自动完成 QwenPaw 的钉钉频道接入。适用于用户提到钉钉、DingTalk、开发者后台、Client ID、Client Secret、机器人、Stream 模式、绑定或配置 channel 的场景;支持遇到登录页时暂停,等待用户登录后继续。.
browser_cdp
Use this skill when the user explicitly wants to connect to a running Chrome browser, scan local CDP ports, specify a cdpport, or share a single browser across multiple agents/tools. By default browser opens no debugging port; pass an explicit cdpport only when the user wants another local tool to attach.
browser_cdp
当用户明确希望连接到已运行的 Chrome 浏览器、扫描本地 CDP 端口、显式指定 cdpport,或让多个 agent / 工具共享同一个浏览器时,使用本 skill。browser 默认不开放调试端口;仅当用户明确希望其他本地工具附加时才显式传入 cdpport。.
browser_visible
当用户需要控制 browser 的浏览器启动方式时,使用本 skill。browser 默认由 Playwright 直接管理、不开放调试端口(需让其他本地工具附加时显式传 cdpport);headed 控制是否显示窗口,privatemode 保留用于兼容、不再改变默认行为,browserargs 传入额外的 Chromium 启动参数,executablepath 指定自定义浏览器可执行文件路径。.
browser_visible
Use this skill when the user needs to control the browser launch mode for browser. By default browser is managed by Playwright and opens no debugging port (pass an explicit cdpport to let another local tool attach); headed controls whether the window is visible, and privatemode is kept for backward compatibility and…