Browser Cdp logo

Browser Cdp

CommunityPopular
mateaix
browser_cdp

通过 Chrome DevTools Protocol (CDP) 连接已运行的浏览器,或扫描本机 CDP 端口,用于远程调试与多工具共享浏览器实例。

Overview

Publishermateaix
Repositorymateclaw
Skill namebrowser_cdp
Stars
1.1K
Forks
337
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mateaix on GitHub. Read the source before you install it.

Installation

Install the Browser Cdp AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mateaix/mateclaw/tree/dev/mateclaw-server/src/main/resources/skills/browser_cdp
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mateaix/mateclaw.git /tmp/mateclaw
mkdir -p .claude/skills
cp -r /tmp/mateclaw/mateclaw-server/src/main/resources/skills/browser_cdp .claude/skills/browser_cdp
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Browser Cdp in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Browser Cdp on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Browser Cdp is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

浏览器 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 断开连接

Frequently asked questions

What does the Browser Cdp AI skill do?

通过 Chrome DevTools Protocol (CDP) 连接已运行的浏览器,或扫描本机 CDP 端口,用于远程调试与多工具共享浏览器实例。

Why use Browser Cdp on TypingMind?

Because you install it once and use it with any model. Browser Cdp is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Browser Cdp in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mateaix/mateclaw/tree/dev/mateclaw-server/src/main/resources/skills/browser_cdp. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Browser Cdp?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Browser Cdp?

As many as you like. As long as a model supports skills, you can use Browser Cdp with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Browser Cdp AI skill free?

Yes. It is published on GitHub by mateaix under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇