Xpersona
A

AI浏览器WebSocket控制

CLAWHUB · Unverified

通过 WebSocket 控制真实浏览器,实现导航、点击、输入、截图、DOM 获取等完整自动化操作。特点:真正的浏览器内核 (Chromium)、WebSocket 实时控制、支持无头/有头模式、自动重连机制。 Skill: AI浏览器WebSocket控制 Owner: linbo405 Summary: 通过 WebSocket 控制真实浏览器,实现导航、点击、输入、截图、DOM 获取等完整自动化操作。特点:真正的浏览器内核 (Chromium)、WebSocket 实时控制、支持无头/有头模式、自动重连机制。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-13T09:13:06.258Z | auto AI Browser 1.0.0 – Initial release - 支持通过 WebSocket 实时控制 Chromium 浏览器,实现导航、点击、输入、截图、DOM 获取等自动化操作 - 提供无头/有头模式切换及自动重连机制 - 简单的多标签页管理 - 首次启动自动下载 Chromium - 完善的消息格式与接口文档 Archive index: Archive

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17404ahym3v74cyh9f41zw9s183h5ga:ai-browser-ws
  1. Node.js workspace detected. Install dependencies securely: run `npm ci --ignore-scripts` to prevent post-install lifecycle triggers from running arbitrary code, then selectively audit the dependency tree.
  2. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  3. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-linbo405-ai-browser-ws/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

5,092 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: AI Browser
slug: ai-browser
version: 1.0.0
homepage: https://github.com/openclaw/ai-browser
description: "通过 WebSocket 控制真实浏览器,实现导航、点击、输入、截图、DOM 获取等完整自动化操作。特点:真正的浏览器内核 (Chromium)、WebSocket 实时控制、支持无头/有头模式、自动重连机制。"
changelog: "初始版本 - 完整浏览器控制功能"
metadata: {"clawdbot":{"emoji":"🌐","os":["linux","darwin","win32"]}}
---

# AI Browser Skill 🌐

通过 WebSocket 控制真实浏览器,实现导航、点击、输入、截图、DOM 获取等自动化操作。

## 特点

- ✅ 真正的浏览器内核 (Chromium)
- ✅ WebSocket 实时控制
- ✅ 支持无头/有头模式
- ✅ 简单的标签页管理
- ✅ 自动重连机制

## 启动方法

```bash
# 1. 安装依赖
npm install

# 2. 启动服务
npm start

# 服务将运行在 ws://localhost:18790
```

## WebSocket 协议

### 连接

连接到 `ws://localhost:18790`

### 消息格式

发送 JSON:

```json
{
  "id": "请求 ID (可选)",
  "action": "动作名称",
  "params": { ... }
}
```

### 支持的动作

| 动作 | 参数 | 说明 |
|------|------|------|
| `navigate` | `{ url: "https://..." }` | 导航到指定 URL |
| `snapshot` | `{}` | 获取当前页面简化 DOM 结构 |
| `screenshot` | `{ fullPage: false }` | 截图 (返回 base64) |
| `click` | `{ selector: "button" }` | 点击元素 |
| `type` | `{ selector: "input", text: "hello", delay: 50 }` | 输入文本 |
| `evaluate` | `{ script: "document.title" }` | 执行 JS 脚本 |
| `status` | `{}` | 获取浏览器状态 |

### 响应格式

```json
{
  "id": "请求 ID",
  "success": true,
  "result": { ... }
}
```

## 使用示例 (Python)

```python
import websocket
import json

ws = websocket.create_connection("ws://localhost:18790")

# 导航
ws.send(json.dumps({"action": "navigate", "params": {"url": "https://fanqie.baidu.com"}}))
print(ws.recv())

# 截图
ws.send(json.dumps({"action": "screenshot", "params": {}}))
resp = json.loads(ws.recv())
with open("screen.png", "wb") as f:
    f.write(base64.b64decode(resp["result"]["image"]))

ws.close()
```

## 注意事项

- 首次启动会自动下载 Chromium (约 100MB)
- 默认端口 18790,可通过 `AI_BROWSER_PORT` 环境变量修改
- 无头模式设为 `false`,可以看到浏览器界面(方便调试)

## 使用场景

- 网页自动化测试
- 数据抓取
- 截图采集
- 表单自动填写
- 网站监控

_meta.json

{
  "ownerId": "kn782p7w26632h3bkxgaww3xm980vnme",
  "slug": "ai-browser-ws",
  "version": "1.0.0",
  "publishedAt": 1776071586258
}

skill-card.md

## Description:

Provides WebSocket control of a Chromium browser for navigation, clicking, text entry, screenshots, DOM snapshots, status checks, and script evaluation.

This skill is ready for commercial/non-commercial use.

## Publisher:

[linbo405](https://clawhub.ai/user/linbo405)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and automation agents use this skill to control a local Chromium browser over WebSocket for web automation, data collection, screenshots, form entry, and website monitoring.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Unauthenticated browser control can allow unwanted navigation, clicking, typing, screenshots, DOM access, or script evaluation if the WebSocket endpoint is reachable by an untrusted client.

Mitigation: Run the server only in an isolated environment, bind or firewall it to localhost, and add access control before exposing it beyond a trusted local process.

Risk: Screenshots, DOM snapshots, typed text, and evaluated scripts can expose private data or perform real actions on logged-in websites.

Mitigation: Avoid using sensitive logged-in browser profiles and review requested browser actions before running them against important accounts or production websites.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/linbo405/skills/ai-browser-ws)
- [ClawHub publisher profile](https://clawhub.ai/user/linbo405)

## Skill Output:

**Output Type(s):** [text, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with JSON WebSocket message examples and shell commands]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Browser responses may include JSON status data, DOM snapshots, and base64-encoded screenshots.]

## Skill Version(s):

1.0.0 (source: server release metadata and skill frontmatter)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

package.json

{
  "name": "ai-browser-skill",
  "version": "2.0.0",
  "description": "AI 可控的 WebSocket 浏览器,基于 Puppeteer",
  "main": "server.js",
  "scripts": {
    "start": "node server.js",
    "install-deps": "npm install puppeteer ws"
  },
  "dependencies": {
    "puppeteer": "^21.0.0",
    "ws": "^8.14.0"
  }
}

Sponsored

Ads related to AI浏览器WebSocket控制 and adjacent AI workflows.