chrome-cdp-skill

> 让AI agent访问你已打开的Chrome标签页

3,891 stars

Best use case

chrome-cdp-skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> 让AI agent访问你已打开的Chrome标签页

Teams using chrome-cdp-skill should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/chrome-cdp/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/adminlove520/chrome-cdp/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/chrome-cdp/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How chrome-cdp-skill Compares

Feature / Agentchrome-cdp-skillStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> 让AI agent访问你已打开的Chrome标签页

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# chrome-cdp-skill

> 让AI agent访问你已打开的Chrome标签页

## 简介

chrome-cdp-skill 通过Chrome远程调试协议(CDP)连接你已经在用的Chrome会话,让AI可以:
- 读取已登录账户的页面(Gmail、GitHub等)
- 与你正在工作的标签页交互
- 查看真实页面状态(非重新加载的干净状态)

## 安装

### 前提条件
- Chrome浏览器
- Node.js 22+

### 启用Chrome远程调试

1. 在Chrome地址栏输入:`chrome://inspect/#remote-debugging`
2. 打开"启用远程调试"开关

### 安装Skill

```bash
# 克隆仓库
git clone https://github.com/pasky/chrome-cdp-skill.git
cd chrome-cdp-skill

# 或复制 skills/chrome-cdp/ 目录到你的agent skills目录
```

## 使用方法

### 基本命令

```bash
# 列出打开的标签页
node scripts/cdp.mjs list

# 截图
node scripts/cdp.mjs shot <targetId>

# 获取可访问性树
node scripts/cdp.mjs snap <targetId>

# 获取HTML
node scripts/cdp.mjs html <targetId> [".selector"]

# 点击元素
node scripts/cdp.mjs click <targetId> "selector"

# 输入文字
node scripts/cdp.mjs type <targetId> "text"

# 导航
node scripts/cdp.mjs nav <targetId> https://...

# 评估JavaScript
node scripts/cdp.mjs eval <targetId> "expression"

# 网络资源计时
node scripts/cdp.mjs net <targetId>

# 加载更多(点击"加载更多"直到消失)
node scripts/cdp.mjs loadall <targetId> "selector"
```

### 获取targetId

首先运行 `list` 命令获取标签页的targetId:
```bash
$ node scripts/cdp.mjs list
TargetID  Title                     URL
---------  -----                     ---
abc123def  Gmail - Google Account   https://mail.google.com/...
def456ghi  GitHub                   https://github.com/...
```

然后用targetId前缀操作:
```bash
node scripts/cdp.mjs snap abc
node scripts/cdp.mjs click abc "#compose"
node scripts/cdp.mjs type abc "Hello World"
```

## 与OpenClaw集成

### 方法1:直接调用脚本

在OpenClaw中通过exec调用:
```bash
node /path/to/chrome-cdp-skill/scripts/cdp.mjs list
```

### 方法2:创建MCP服务器

可以将其封装为MCP服务器供OpenClaw调用。

### 方法3:创建OpenClaw Skill

参考 `skills/chrome-cdp/index.js` 创建完整Skill。

## 优势对比

| 特性 | chrome-cdp | Puppeteer类工具 |
|------|------------|----------------|
| 浏览器 | 已有Chrome | 新启动浏览器 |
| 登录状态 | 保持 | 需重新登录 |
| 页面状态 | 真实状态 | 干净状态 |
| 标签页数量 | 100+不卡 | 容易超时 |
| 依赖 | 仅Node.js | Puppeteer+浏览器 |

## 注意事项

1. 首次访问标签页时,Chrome会弹出"允许调试"确认框
2. 守护进程20分钟无活动自动退出
3. 目标ID只需唯一前缀即可匹配

## 参考

- GitHub: https://github.com/pasky/chrome-cdp-skill
- 作者: pasky
- Stars: 1000+

Related Skills

enable-chrome-gemini

3891
from openclaw/skills

Set up or repair Gemini in Chrome (Glic) on Windows, macOS, or Linux when enabling it for the first time outside the US or when the sidebar, floating panel, Alt+G shortcut, or top-bar entry disappears. Back up and patch Chrome Local State, restore region/eligibility fields, and check the required Glic flags and Chrome language.

connect-chrome

3891
from openclaw/skills

Launch real Chrome controlled by the agent with a Side Panel extension. Watch every action in real time in a visible browser window. Use when: "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", "control my browser", "watch it work".

chromecast-with-google-tv

3891
from openclaw/skills

Cast YouTube videos, Tubi TV show episodes, and TV show episodes from other video streaming apps via ADB to Chromecast with Android TV (Chromecast 4K supported, Google TV Streamer support is unknown)

wsl-chrome-cdp - WSL2 访问 Windows Chrome 浏览器

3891
from openclaw/skills

**版本:** 1.0.0

chrome-devtools-mcp-manager

3891
from openclaw/skills

Manage chrome-devtools-mcp service and OpenClaw's built-in Chrome browser for MCP-based browser automation. Use when user needs to use chrome-devtools-mcp functionality, ensure the browser is ready for MCP operations, or manage the browser/MCP lifecycle.

chrome-devtools-mcp

3891
from openclaw/skills

Chrome DevTools MCP — Google's official browser automation and testing server. Control Chrome via Puppeteer through MCP protocol: click, fill forms, navigate, screenshot, performance traces, network inspection, console debugging. Use for browser testing, web automation, performance analysis, UI testing, form filling, and visual regression.

chrome-cdp-live-browser

3817
from openclaw/skills

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research