TopRank Skills

Home / Claw Skills / Git / GitHub / cdp-browser
Official OpenClaw rules 54%

cdp-browser

CDP browser control at localhost:9222. Use when you need to inspect tabs, take screenshots, navigate, scroll, post to X, or run JS in a persistent browser session (e.g. logged into X, Gmail).

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 cdp-browser 技能。 若已安装,则直接安装 cdp-browser 技能。

Overview

Skill Key
gostlightai/cdp-browser
Author
gostlightai
Source Repo
openclaw/skills
Version
-
Source Path
skills/gostlightai/cdp-browser
Latest Commit SHA
c20bf2e5dfb3c018696bad643e2431a722cad37c

Extracted Content

SKILL.md excerpt

# cdp-browser

CLI for Chrome/Chromium at localhost:9222. Inspect tabs, take screenshots, navigate, scroll, post to X, or run JS in a persistent browser session.

**Repo:** https://github.com/gostlightai/cdp-browser

**Prerequisites:** Chromium running with `--remote-debugging-port=9222`. Docker Compose or a local Chrome with remote debugging enabled.

## Commands

Run from the skill dir (`bin/` scripts):

| Command | Description |
|---------|-------------|
| `status` | List all tabs (JSON from CDP) |
| `tabs` | Same as status |
| `new <url>` | Open new tab |
| `goto <tabId> <url>` | Navigate tab to URL |
| `snapshot <tabId>` | Full-page screenshot (PNG) |
| `close-popup <tabId>` | Dismiss dialogs/modals |
| `scroll <tabId> <px\|sel> [down\|up]` | Scroll by pixels or selector |
| `query <tabId> getUrl` | Return current page URL |
| `query <tabId> getText [selector]` | Return element text (or body) |
| `query <tabId> getHtml [selector]` | Return element HTML (or body) |
| `tweet-draft <tabId> "text"` | Fill compose box only; does NOT post |
| `tweet-post <tabId> --confirm "text"` | Post tweet (requires `--confirm` as second arg) |
| `tweet <tabId> "text"` | Alias for tweet-draft (fills compose only) |

## Tweet flow

- **tweet-draft** (default): Fills the compose box; user reviews in browser and posts manually.
- **tweet-post**: Requires `--confirm` as second arg (strict). Use when user explicitly approves ("go ahead", "post it", or Telegram confirm button).
- **Optional Telegram confirm:** When `tweet.confirmButton` is enabled in config, the agent can run `tweet-draft --save-pending` to write pending state, then send a message with an inline "Confirm Post" button. On confirm, the agent runs `tweet-post --confirm`.

### Config (required for Telegram confirm button)

The Telegram "Confirm Post" button **only works if config exists**. Copy the example and place it in your workspace:

```bash
# From the skill dir (e.g. ~/.openclaw/workspace/skills/cdp-browser):
cp .cdp-...

README excerpt

# cdp-browser

CDP browser control skill for OpenClaw. CLI for Chrome/Chromium at localhost:9222.

**Repo:** https://github.com/gostlightai/cdp-browser

## Install

```bash
cd skills/cdp-browser
npm install
```

## Prerequisites

Chromium running with `--remote-debugging-port=9222` (Docker Compose or local Chrome).

## Usage

See [SKILL.md](SKILL.md) for commands and usage. Run `bin/` scripts from the skill dir.

## Config (Telegram confirm button)

To enable the "Confirm Post" inline button in Telegram, copy the example config:

```bash
cp ~/.openclaw/workspace/skills/cdp-browser/.cdp-browser.json.example ~/.openclaw/workspace/.cdp-browser.json
```

Without it, tweet-draft works but the agent sends plain text only; user confirms via "go ahead" in chat.

## Tweet flow

- **tweet-draft** — fills compose only (safe default)
- **tweet-post** — requires `--confirm` as second arg; posts only when user approves

## Security

See [SECURITY.md](SECURITY.md) for security considerations and mitigations.

Related Claw Skills