zz-chat

爪爪/钳钳 — 手机直连 OpenClaw 聊天。触发词:钳钳、爪爪、钱钱、龙虾、聊天机器人、创建爪爪、安装钳钳、打开钳钳、zz-chat。

3,891 stars

Best use case

zz-chat is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

爪爪/钳钳 — 手机直连 OpenClaw 聊天。触发词:钳钳、爪爪、钱钱、龙虾、聊天机器人、创建爪爪、安装钳钳、打开钳钳、zz-chat。

Teams using zz-chat 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/zz-chat/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/badxtdss/zz-chat/SKILL.md"

Manual Installation

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

How zz-chat Compares

Feature / Agentzz-chatStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

爪爪/钳钳 — 手机直连 OpenClaw 聊天。触发词:钳钳、爪爪、钱钱、龙虾、聊天机器人、创建爪爪、安装钳钳、打开钳钳、zz-chat。

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

# 爪爪 🦞 — 手机直连 OpenClaw

## 架构

```
OC 聊天:  手机 ←WebSocket→ 用户的Worker ←→ bridge ←→ OpenClaw CLI
朋友互聊: 手机A ←WebSocket→ WorkerA ──HTTP──→ WorkerB ←WebSocket→ 手机B
注册发现:  Worker ──注册──→ 中心Worker(ai0000.cn)←──查询── Worker
```

每个用户独立部署 Worker,用自己 Cloudflare 额度,互不影响。

## 执行流程(按顺序执行,每一步都做)

用户说"部署爪爪"或类似指令时,按以下步骤自动执行:

### 第一步:部署 Worker(用用户自己的 Cloudflare 账号)

安装 wrangler(如果没装):

```bash
export PATH="/usr/local/bin:$PATH"
which wrangler 2>/dev/null || npm install -g wrangler 2>&1
```

检查登录状态,未登录则弹出浏览器让用户授权:

```bash
wrangler auth whoami 2>&1
```

如果显示"Not logged in",执行登录(会自动弹浏览器,用户点同意即可):

```bash
wrangler login 2>&1
# 等用户在浏览器中点 "Allow" 授权
```

准备用户版 Worker 文件:

```bash
cd ~/.openclaw/workspace/openchat/simple
# 用用户版文件覆盖中心版
cp worker-user.js worker-user-deploy.js
cp wrangler-user.toml wrangler-user-deploy.toml
```

修改 `wrangler-user-deploy.toml` 中的 `name`,改成用户喜欢的名字(如 zz-chat-xxx):

```bash
sed -i '' "s/name = \"zz-proxy\"/name = \"zz-chat-$(whoami)\"/" wrangler-user-deploy.toml
```

部署:

```bash
cd ~/.openclaw/workspace/openchat/simple
export PATH="/usr/local/bin:$PATH"
wrangler deploy -c wrangler-user-deploy.toml 2>&1
```

记录 Worker URL:

```bash
WORKER_URL=$(wrangler deploy -c wrangler-user-deploy.toml 2>&1 | grep -o 'https://[^ ]*workers.dev' | head -1)
mkdir -p ~/.zz
echo "$WORKER_URL" > ~/.zz/worker_url
echo "Worker URL: $WORKER_URL"
```

### 第二步:注册获取全局 UID

```bash
WORKER_URL=$(cat ~/.zz/worker_url)
ZZ_ID=$(curl -s "$WORKER_URL/register" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "$ZZ_ID" > ~/.zz/id
echo "编号: $ZZ_ID"
```

### 第三步:启动桥接 + 看门狗

先杀掉旧进程:

```bash
pkill -f "bridge.py" 2>/dev/null
pkill -f "watchdog.py" 2>/dev/null
sleep 1
```

复制桥接脚本:

```bash
BRIDGE_DIR=~/.openclaw/workspace/openchat/bridge
mkdir -p "$BRIDGE_DIR"
cp ~/.openclaw/skills/zz-chat/bridge.py "$BRIDGE_DIR/"
cp ~/.openclaw/skills/zz-chat/watchdog.py "$BRIDGE_DIR/"
```

启动看门狗(自动拉起 bridge):

```bash
WORKER_URL=$(cat ~/.zz/worker_url)
ZZ_ID=$(cat ~/.zz/id)
nohup python3 -u "$BRIDGE_DIR/watchdog.py" >> "$BRIDGE_DIR/watchdog.log" 2>&1 &
sleep 5
# 检查是否启动成功
ps aux | grep -E "(bridge|watchdog)" | grep -v grep
```

或配置 launchd 开机自启(macOS):

```bash
cat > ~/Library/LaunchAgents/com.zz-chat.bridge.plist << PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key><string>com.zz-chat.bridge</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/python3</string><string>-u</string>
        <string>/Users/$(whoami)/.openclaw/workspace/openchat/bridge/watchdog.py</string>
    </array>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key><string>/Users/$(whoami)/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
        <key>all_proxy</key><string></string><key>ALL_PROXY</key><string></string>
        <key>http_proxy</key><string></string><key>HTTP_PROXY</key><string></string>
        <key>https_proxy</key><string></string><key>HTTPS_PROXY</key><string></string>
    </dict>
    <key>RunAtLoad</key><true/><key>KeepAlive</key><true/>
    <key>StandardOutPath</key><string>/Users/$(whoami)/.openclaw/workspace/openchat/bridge/watchdog.log</string>
    <key>StandardErrorPath</key><string>/Users/$(whoami)/.openclaw/workspace/openchat/bridge/watchdog.log</string>
    <key>WorkingDirectory</key><string>/Users/$(whoami)/.openclaw/workspace/openchat/bridge</string>
</dict>
</plist>
PLIST
launchctl load ~/Library/LaunchAgents/com.zz-chat.bridge.plist
sleep 5
ps aux | grep -E "(bridge|watchdog)" | grep -v grep
```

### 第四步:生成链接 + 发送二维码

用 canvas 截图二维码发送给用户:

```
ZZ_ID=$(cat ~/.zz/id)
WORKER_URL=$(cat ~/.zz/worker_url)
PAGE_URL=https://badxtdss.github.io/zz-chat/?bridge=${ZZ_ID}&api=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$WORKER_URL', safe=''))")
```

保存 HTML 到 `/tmp/zz-qr.html`:

```html
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>爪爪</title>
<style>
body{font-family:-apple-system,sans-serif;background:#0a0a0a;color:#e0e0e0;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;margin:0}
h1{font-size:24px;margin-bottom:8px}
.id{font-size:48px;font-weight:bold;color:#4fc3f7;margin:12px 0}
.qr{background:#fff;padding:12px;border-radius:12px;margin:16px 0}
.hint{color:#8892b0;font-size:14px;text-align:center;max-width:300px;line-height:1.6}
</style></head>
<body>
<h1>🦞 爪爪</h1>
<div class="id">编号 {ZZ_ID}</div>
<div class="qr" id="qrBox"></div>
<div class="hint">手机扫码打开爪爪<br>消息通过你的 OpenClaw 处理</div>
<script>
const url = '{PAGE_URL}';
const img = new Image();
img.src = 'https://quickchart.io/qr?text=' + encodeURIComponent(url) + '&size=200';
img.style.borderRadius = '8px';
document.getElementById('qrBox').appendChild(img);
</script>
</body>
</html>
```

用 canvas 工具截图(`action="present"` → `action="snapshot"`),然后发图 + 文字消息:

```
✅ 爪爪已部署完成!

🦞 你的编号: {ZZ_ID}
🔗 链接: {PAGE_URL}

📱 添加到桌面(必做):
1. 打开后点浏览器菜单 → 「访问电脑版」
2. 再点菜单 → 「添加到桌面」
   微信/QQ: 右上角 ··· → 「添加到桌面」
   Safari: 分享按钮 → 「添加到主屏幕」
3. 以后从桌面图标打开,体验最佳
```

## 消息路由

| 聊天类型 | 路径 | Worker |
|---|---|---|
| OC(OpenClaw) | 手机→Worker→bridge→CLI | 用户自己的 Worker |
| 朋友互聊(在线) | 手机A→WorkerA→WorkerB→手机B | 两个用户的 Worker |
| 朋友互聊(离线文字) | WorkerB 存 DO 持久存储,上线补发 | 接收方的 Worker |
| 注册 | Worker→中心Worker(ai0000.cn) | 中心 Worker |

## 文件说明

| 文件 | 用途 |
|------|------|
| `worker.js` | 中心 Worker(ai0000.cn 用) |
| `worker-user.js` | 用户独立 Worker |
| `wrangler.toml` | 中心 Worker 配置 |
| `wrangler-user.toml` | 用户 Worker 配置模板 |
| `bridge.py` | 桥接脚本,支持 `--worker` 和 `--uid` |
| `watchdog.py` | 看门狗,监控 bridge |
| `index.html` | 手机端首页 |
| `chat.html` | 手机端 OC 聊天页(WebSocket) |
| `bridge.js` | Node.js 版桥接(Windows 兼容) |
| `start-bridge.bat` | Windows 启动脚本 |

## 桥接参数

```bash
bridge.py --worker <URL>    # 指定 Worker 地址
bridge.py --uid <ID>        # 直接指定编号
```

## 看门狗(watchdog.py)

```
launchd → watchdog.py → bridge.py
(系统级)  (进程级)    (实际桥接)
```

- 每 10 秒检查 bridge 进程是否存活
- 每 30 秒 bridge 写心跳日志
- 90 秒无活动 → 重启 bridge
- 零服务器压力(本地检测)

## 注意事项

- 只有扫码(带 `?bridge=` + `?api=` 参数)才能进入网页
- 桥接需要电脑保持运行(不休眠)
- 每用户独立 Worker,免费额度:100 WebSocket 并发 + 10 万请求/天
- 消息通过 `openclaw agent` CLI 处理
- 注册后 1 小时未发消息自动清理,发过消息后 24 小时不活跃自动清理
- watchdog 日志:`~/.openclaw/workspace/openchat/bridge/watchdog.log`
- bridge 日志:`~/.openclaw/workspace/openchat/bridge/bridge.log`

## 开发者

🦞 爪爪 by 秋风悠扬

- B站:[秋风悠扬的个人空间](https://b23.tv/rEEYnVF)
- 抖音:363594031

Related Skills

love-chat

3891
from openclaw/skills

恋爱话术助手。根据用户的性格、身份、关系阶段和聊天场景,生成合适的聊天话术和恋爱策略。 用于:搭讪开场、聊天技巧、约会安排、表白求婚、分手挽回等恋爱场景。 也用于:分析聊天记录给建议、解答恋爱困惑、提供追人策略。

Personal Relationships

name: welight-wechat-layout-publish

3891
from openclaw/skills

description: Welight standalone skill for turning an article into WeChat Official Accounts compatible Markdown/HTML, presenting built-in theme choices, and publishing to WeChat as a draft or formal post when publishing prerequisites are already configured.

Content & Documentation

wechat-publisher

3891
from openclaw/skills

一键发布 Markdown 到微信公众号草稿箱。基于 wenyan-cli,支持多主题、代码高亮、图片自动上传。

Content & Documentation

wechat-report

3891
from openclaw/skills

Generate a structured comparison report for multiple WeChat Official Account articles under one topic. Use this when the user wants several公众号文章 collected into one local report with article metadata, engagement status, content structure tables,爆款写法标签, and a later optional Feishu sync step.

wechat-collect

3891
from openclaw/skills

Fetch a public WeChat article URL, archive the raw HTML, and convert the article into a stage-1 compatible brief in `content-production/inbox/`. Use when Codex needs to collect公众号文章素材 or start the Stage 2 collect-to-create pipeline from a public `mp.weixin.qq.com` URL.

wechat-studio

3891
from openclaw/skills

Launch a local WeChat article workbench for Markdown import, WeChat HTML preview, theme tuning, image selection, and optional draft push. Use when Codex needs a browser-based preview and manual QA layer before publishing.

wechat-formatter

3891
from openclaw/skills

Render article markdown into WeChat-style HTML as an independent executor. Use when Codex needs公众号排版预览, WeChat HTML output, or a publishable HTML artifact generated from an article markdown draft.

wechat-article-extractor

3891
from openclaw/skills

Extract metadata and content from WeChat Official Account articles. Use when user needs to parse WeChat article URLs (mp.weixin.qq.com), extract article info (title, author, content, publish time, cover image), or convert WeChat articles to structured data. Supports various article types including posts, videos, images, voice messages, and reposts.

wechat-monitor

3891
from openclaw/skills

微信公众号调研 + 监控 + 报告推送。每个产品独立目录,互不影响。

wechat-auto-publishing-complete

3891
from openclaw/skills

Use this skill to fully reproduce and operate a local end-to-end WeChat Official Account publishing workflow: prepare the environment, validate dependencies, configure non-sensitive placeholders for credentials, gather source material, draft articles, prepare cover and body images, assemble a WeChat-ready Markdown package, publish to draft, optionally submit for formal publication, poll status, archive outputs, and attach scheduling or alerting. Use whenever the user wants a complete reproducible公众号自动发文 skill with environment setup, templates, runbooks, and execution scaffolding, while keeping all secrets and personal account details outside the skill package. Key real-world findings: freepublish does not always behave like manual platform publishing for homepage visibility, production mode should often default to draft-only, image files must be validated by real format rather than extension alone, and multi-account deployments should use isolated directories.

aws-wechat-article-review

3891
from openclaw/skills

审核公众号文章,检查敏感词、错别字、合规性和写作规范,输出修改清单。当用户提到「审稿」「审核」「检查一下」「校对」「合规」「敏感词」「错别字」「帮我看看」「写完了」「检查下有没有问题」「能不能发」时使用。

aws-wechat-article-publish

3891
from openclaw/skills

将文章发布到微信公众号(API 写入草稿箱或提交发布),含发布前检查。当用户提到「发布」「提交」「群发」「推送」「发出去」「上传到公众号」「发到公众号」「可以发了吗」「发布前检查」时使用。