browser_cdp

browser_cdp is a skill for Claude Code, Codex from hyqibot/token-free-openclaw. It costs 128 tokens per session (1,911 once invoked), scanned A, original, Apache-2.0.

A guide for connecting an agent to a running Chrome browser through Chrome DevTools Protocol, a way for software to control an existing browser. It also covers finding exposed local browser ports and starting a browser that other programs can connect to.

In plain words
What is it for?
Use it to scan for a local connectable Chrome, attach to an existing browser, or start a single shared browser with a debugging port.
Why use it?
It explains when browser sharing or remote control is appropriate and warns that such connections can expose browsing history, cookies, pages, and saved passwords.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan for a local connectable Chrome, attach to an existing browser, or start a single shared browser with a debugging port.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hyqibot/token-free-openclaw/browser_cdp
Install

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.

Any agent
npx skills add hyqibot/token-free-openclaw --skill browser_cdp
Clone the repo
git clone --depth 1 https://github.com/hyqibot/token-free-openclaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for browser_cdp

README.md
[![agentmods](https://agentmods.dev/badge/skills/hyqibot/token-free-openclaw/browser_cdp/github.svg)](https://agentmods.dev/skills/hyqibot/token-free-openclaw/browser_cdp)
Your own site
<a href="https://agentmods.dev/skills/hyqibot/token-free-openclaw/browser_cdp"><img src="https://agentmods.dev/badge/skills/hyqibot/token-free-openclaw/browser_cdp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser_cdp

Your own site · 80×15
<a href="https://agentmods.dev/skills/hyqibot/token-free-openclaw/browser_cdp"><img src="https://agentmods.dev/badge/skills/hyqibot/token-free-openclaw/browser_cdp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,911 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00128 $0.01911
Opus 5 $0.00064 $0.00955
Sonnet 5 $0.00026 $0.00382
Haiku 4.5 $0.00013 $0.00191

Measured 10d ago against content hash a181a995b3cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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 10d 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.

copaw/agents/skills/browser_cdp/SKILL.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

浏览器 CDP 连接参考

Chrome DevTools Protocol(CDP) 允许外部程序连接并控制一个已在运行的 Chrome 进程。本 skill 覆盖三类场景:

  1. 扫描本地 CDP 端口 — 发现正在运行的可连接 Chrome
  2. 连接已有 Chrome — 附加到外部 Chrome,不影响其运行
  3. 启动暴露 CDP 端口的浏览器 — 让 Playwright 启动的浏览器对外可见

⚠️ 隐私提示:使用 CDP 前请知晓

  • 默认模式start 不带 cdp_port):浏览器完全由 Playwright 私有管理,历史记录、Cookies、登录态不会暴露给任何外部程序。
  • CDP 模式start + cdp_portconnect_cdp):任何能访问该端口的程序都可以读取浏览器的完整历史记录、Cookies、当前页面内容、已保存密码等敏感信息。仅在信任的本地环境中使用,不要在公共网络或多用户服务器上暴露 CDP 端口。

⚠️ 单实例限制:一个 workspace 同时只能运行/连接一个浏览器

无论是 Playwright 启动的浏览器还是 CDP 连接,同一 workspace 内同一时间只允许存在一个。需要切换时,必须先执行 stop,再启动或连接新的浏览器。


何时使用

仅在用户明确表达以下意图时才使用本 skill:

  • 用户说:「连接到我已打开的 Chrome」「扫描一下本地有没有可连接的浏览器」
  • 用户明确希望多个 agent 或外部工具共享同一个浏览器实例
  • 用户明确要求浏览器对外可见/可调试
  • 用户主动提到 CDP、远程调试端口等概念

以下情况不要使用 CDP 模式,直接用普通 start 即可:

  • 用户只是说「打开浏览器」「帮我打开某网站」,没有提到共享或调试
  • 用户没有明确说明需要暴露浏览器给其他程序
  • 不确定用户是否了解 CDP 的隐私风险

使用前须告知用户 CDP 模式会暴露浏览器历史、Cookies 等敏感信息,确认用户知情后再操作。


场景一:扫描本地 CDP 端口

默认扫描端口范围 9000–10000,并发探测,速度很快。

{"action": "list_cdp_targets"}

指定单个端口:

{"action": "list_cdp_targets", "port": 9222}

自定义扫描范围(未找到时可扩大范围):

{"action": "list_cdp_targets", "port_min": 8000, "port_max": 12000}

成功返回示例:

{
  "ok": true,
  "found": {
    "9222": [{"title": "New Tab", "url": "chrome://newtab/", ...}]
  },
  "message": "Found CDP endpoints on port(s): 9222"
}

未找到时 返回 ok: false,并提示扩大范围或确认 Chrome 是否以 --remote-debugging-port=N 启动。


场景二:连接已有 Chrome(connect_cdp)

先扫描到端口后,再连接:

{"action": "connect_cdp", "cdp_url": "http://localhost:9222"}
  • 连接成功后可正常使用 opensnapshotclicktype 等所有操作
  • 不会影响 Chrome 进程:执行 stop 时只断开 Playwright 连接,Chrome 继续运行
  • 连接期间每次操作前会自动检查连接是否正常,断开时返回错误提示重新连接
  • 隐私风险:连接后 agent 可读取该 Chrome 的完整 Cookies、历史记录、当前页面内容,请确认用户知情
  • 单实例:如果当前已有浏览器在运行(无论是 Playwright 启动的还是另一个 CDP 连接),必须先 stop 再连接

场景三:启动带 CDP 端口的浏览器

让 Playwright 启动浏览器时暴露指定 CDP 端口,其他工具可同时连接:

{"action": "start", "cdp_port": 9222}

Read the full file on GitHub · 182 lines

Changes

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.

  1. 10d ago First seen · 182 lines · 128 tokens per session scan A a181a995b3cd

Subscribe to this mod's changes

browser_cdp is a skill published in the GitHub repository hyqibot/token-free-openclaw (122 stars, last pushed 18d ago), licensed Apache-2.0. It adds 128 tokens to every session and 1,911 once invoked, about $0.0006 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.

Related

Other skills, from other repositories