browser-cdp-automation

browser-cdp-automation is a skill for Claude Code, Codex from SparkElf/deepseek-harness-plus. It costs 105 tokens per session (2,848 once invoked), scanned A, original, MIT.

A browser-automation guide for controlling an already logged-in Chrome session through Chrome DevTools Protocol or Playwright. Chrome DevTools Protocol is the browser’s debugging connection; Playwright is a tool for driving pages and checking their behaviour.

In plain words
What is it for?
Use it to attach to a logged-in browser, operate pages, inspect network or page state, handle CDP connection problems, and verify that an action actually changed the application.
Why use it?
It addresses cases where automation connects but does not change the application, or where a Windows browser cannot be reached from WSL. It emphasises checking the application’s real state instead of trusting a click or a stale page element.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; installed under .agents/ (shared by several agents).

Good fit Use it to attach to a logged-in browser, operate pages, inspect network or page state, handle CDP connection problems, and verify that an action actually changed the application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sparkelf/deepseek-harness-plus/browser-cdp-automation
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 SparkElf/deepseek-harness-plus --skill browser-cdp-automation
Clone the repo
git clone --depth 1 https://github.com/SparkElf/deepseek-harness-plus

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-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/sparkelf/deepseek-harness-plus/browser-cdp-automation/github.svg)](https://agentmods.dev/skills/sparkelf/deepseek-harness-plus/browser-cdp-automation)
Your own site
<a href="https://agentmods.dev/skills/sparkelf/deepseek-harness-plus/browser-cdp-automation"><img src="https://agentmods.dev/badge/skills/sparkelf/deepseek-harness-plus/browser-cdp-automation/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-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/sparkelf/deepseek-harness-plus/browser-cdp-automation"><img src="https://agentmods.dev/badge/skills/sparkelf/deepseek-harness-plus/browser-cdp-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,848 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00105 $0.02848
Opus 5.5 $0.00042 $0.01139
Sonnet 5.5 $0.00021 $0.00570
Haiku 4.5 $0.00011 $0.00285

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

Security

Grade A, and why

browser-cdp-automation scanned grade A with 1 finding 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 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/cdp-lite.mjs, scripts/playwright-doctor.mjs, scripts/win-relay.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://127.0.0.1:9333/json/version
.agents/skills/browser-cdp-automation/SKILL.md · 194 lines

How it starts

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

浏览器自动化(CDP / Playwright)

这份技能解决的不是"怎么写选择器",而是怎么让自动化真的生效。

一句话贯穿全文:动作成功 ≠ 状态改变。 判断标准永远是应用自己的状态(计数器、列表、接口返回),不是你点完之后自己读回来的那个 DOM 属性。

0. 先选路线

场景 路线
需要复用已登录的浏览器(登录要扫码/短信,无法自动) 接管(attach)
需要页面级细粒度操作(真实鼠标、截图、网络拦截) Playwright
Playwright 连不上,但端口是通的 裸 CDP(Runtime.evaluate + Input)

接管真实浏览器是这里最常见的需求,因为登录态通常拿不到。

1. 接管已登录的 Chrome

浏览器必须带调试端口启动。两个硬限制:

  • Chrome 136+ 拒绝对默认 user-data-dir 开放 --remote-debugging-port。 日常在用的 Chrome 基本都因此不可用,无论启动参数怎么加。
  • --remote-debugging-address=0.0.0.0 在现代 Chrome 上已被忽略,它仍然只绑 127.0.0.1。别指望靠这个参数跨机器访问。

所以正确做法是独立 profile:

chrome.exe --user-data-dir='C:\Users\<user>\auto-profile' \
           --remote-debugging-port=9333 --no-first-run --no-default-browser-check

在这个 profile 里登录一次,之后长期复用。验证端口:

curl -s http://127.0.0.1:9333/json/version

从 WSL 启动 Windows Chrome 时,不要用 cmd.exe /c start ...(会阻塞在工具调用里);直接执行 .exe 并 detach:

setsid nohup "/mnt/c/.../chrome.exe" --user-data-dir='C:\...' --remote-debugging-port=9333 \
  > /tmp/chrome.log 2>&1 < /dev/null &
disown

2. WSL 连不上 Windows 的调试端口

典型现象:Windows 侧 IWR http://127.0.0.1:9333/json/version 正常,WSL 侧 curl 127.0.0.1:9333 和 curl <WindowsIP>:9333 都空。WSL 日志可能伴随:

WSL (pid - ) ERROR: UtilAcceptVsock:273: accept4 failed 110

这说明 WSL2 的 localhost 转发坏了,而不是 Chrome 的问题。先确认基础连通性(ping <网关>、连一个 Windows 上监听 0.0.0.0 的端口如 445),能通就说明是端口绑定问题:Chrome 只绑 loopback,WSL 从另一个地址来,连不上。

三条路,按可行性排:

  1. netsh interface portproxy:最干净,但需要管理员。受限环境里通常做不到。
    netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=9334 \
           connectaddress=127.0.0.1 connectport=9333
    
  2. PowerShell TCP 中继(无需管理员,推荐)。在 Windows 侧跑一个监听 0.0.0.0:9334、转发到 127.0.0.1:9333 的 TCP 中继,见 scripts/win-relay.ps1。
  3. 把自动化脚本放到 Windows 侧跑(多数环境没有 node,通常不可行)。

中继起来后,WSL 侧用主机 IP + 中继端口访问:

WINIP=$(ip route | awk '/^default/ {print $3; exit}')
export CDP_BASE="http://$WINIP:9334"

Read the full file on GitHub · 194 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 194 lines · 105 tokens per session scan A 0a0f0d46957b

Subscribe to this mod's changes

browser-cdp-automation is a skill published in the GitHub repository SparkElf/deepseek-harness-plus (1 stars, last pushed yesterday), licensed MIT. It adds 105 tokens to every session and 2,848 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-29.

Related

browser-cdp-automation compared with skills from other repositories

browser-cdp-automation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
browser-cdp-automationSparkElf/deepseek-harness-plusSkill1yesterdayMITA105Claude Code, Codex
browser-use-cliamplifthq/oh-my-dshSkill201mo agoMITC32Claude Code, Codex
dsh-tui-guideccch1mneyyy/dsh-TUISkill8.7ktodayMITA41Claude Code, Codex
modsearchliustack/modsearchSkill1.1k8d agoMITA99Claude Code
game-devsandbaseai/sandbase-skillsSkill21211d agoApache-2.0A50Claude Code
screenshot-capturesandbaseai/sandbase-skillsSkill21211d agoApache-2.0A45Claude Code
review-changesamplifthq/oh-my-dshSkill201mo agoMITA22Claude Code, Codex