Token导航 LogoToken导航

Agent Skill · 开发

openclaw-onebot(OpenClaw onebot 开发)

openclaw-onebot 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

openclaw-onebot 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 1,688。

总安装 25,186周安装 1,060GitHub Stars 公开资料未说明下载 8,819核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.2.12

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openclaw-onebot(OpenClaw onebot 开发)
来源仓库:https://github.com/xucheng/openclaw-onebot
安装命令:
openclaw skills install openclaw-onebot
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install openclaw-onebot

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

OpenClaw onebot 是 OneBot 11 QQ 消息通道插件,集成 NapCat/go-cqhttp。实现本机 OpenClaw 与私人/群组聊天、语音及反应消息互通。适用于机器人客服与社群互动类应用场景。通过 clawhub 安装后配置 QQ 账号与协议端点即可连接。

需遵守 QQ 平台安全规范并避免滥用消息接口。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install openclaw-onebot;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

openclaw-onebot 怎么安装?

在终端执行 openclaw skills install openclaw-onebot。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

openclaw-onebot 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

openclaw-onebot 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

openclaw-onebot 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

openclaw-onebot 用的人多吗?

公开数据是累计安装 25,186 次,近一周安装 1,060 次,下载 8,819 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

openclaw-onebot 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
openclaw-onebot

OpenClaw onebot 开发 · 本页

25,186—接触敏感数据MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
openclaw-onebot
description
OneBot 11 channel plugin for QQ messaging (NapCat/go-cqhttp). Native OpenClaw integration with private/group chat, group reactions, block streaming, voice pipeline, message batching, allowFrom filtering, shared-dir media staging, and full text-command passthrough. 119 tests.
metadata
openclaw
emoji
🐧
type
channel-plugin
requires
config
["channels.onebot.wsUrl", "channels.onebot.httpUrl"]
bins
["node", "npm"]

OpenClaw OneBot 11 Channel Plugin

中文 | English


中文

源码仓库可在 GitHub 查看。

OpenClaw 的 OneBot 11 协议通道插件,让 QQ 成为 OpenClaw 一等消息通道。

支持 NapCat、go-cqhttp 等所有兼容 OneBot 11 协议的 QQ 机器人框架。

说明:

  • npm 包名是 openclaw-onebot
  • ClawHub package payload 包名是 openclaw-onebot-plugin
  • 插件 id 是 openclaw-onebot
  • 通道 id 仍然是 onebot
  • 因此 plugins.allow / plugins.entries 使用 openclaw-onebot;安装记录由 openclaw plugins install 管理
  • channels.onebot 保持不变
  • 当前版本对齐 OpenClaw 2026.4.26 / plugin-sdk 2026.4.26,并声明 setupEntry 与 channelConfigs manifest metadata

功能

  • 🔌 原生通道插件 — QQ 与 Discord / Telegram / WhatsApp 同级
  • 📨 私聊和群聊收发消息
  • 😀 Reaction 支持(群聊) — 通过 NapCat set_msg_emoji_like 给群消息加表情回应;QQ 私聊目前不稳定/通常不生效
  • 👍 群聊自动 reaction — 对入站群消息自动点表情,可配置开关,默认开启
  • 🌊 Block streaming — 支持 OpenClaw 分块回复,QQ 端会连续收到多条流式消息
  • 🧭 OpenClaw 文本命令全支持 — /status、/help、/commands、/model、/new、/reset 等命令走统一文本命令链路
  • 🎤 语音完整链路 — QQ 语音 (SILK/AMR) → MP3 → STT → TTS → 发送 QQ 语音
  • 📦 消息聚合 — 连续多条消息 1.5s 内自动合并(类似 Telegram 风格)
  • 🖼️ 图片、语音、文件附件发送
  • 🔄 WebSocket 自动重连(指数退避)
  • 🔒 可选 access token 鉴权
  • 🎯 allowFrom 消息来源过滤(私聊/群聊/用户级别)
  • ✅ 119 个测试用例全部通过
  • 📈 覆盖率可通过 npm run coverage 复核

快速开始

1. 安装
# 自动安装
bash scripts/install.sh

# 或手动(先在仓库根目录准备发布包)
npm install && npm run prepare:clawhub:plugin
openclaw plugins install .clawhub-plugin/openclaw-onebot-plugin --force

scripts/install.sh 会先在源码仓库生成 .clawhub-plugin/openclaw-onebot-plugin 精简发布包,并优先通过 openclaw plugins install 写入新版插件安装索引;旧版 OpenClaw 会回退到手动复制安装。脚本还会自动尝试执行 scripts/sync-openclaw-cli.mjs,把 --shared-dir / --container-shared-dir 接到本机 OpenClaw CLI。

2. 配置

在 openclaw.json 中添加:

{
  "plugins": {
    "allow": ["openclaw-onebot"],
    "entries": {
      "openclaw-onebot": {
        "enabled": true
      }
    }
  },
  "channels": {
    "onebot": {
      "enabled": true,
      "wsUrl": "ws://your-host:3001",
      "httpUrl": "http://your-host:3001",
      "accessToken": "your_token",
      "sharedDir": "/Users/you/napcat/shared",
      "containerSharedDir": "/shared",
      "groupAutoReact": true,
      "groupAutoReactEmojiId": 1
    }
  }
}

说明:

  • 插件配置键使用 openclaw-onebot
  • 通道配置键使用 channels.onebot
  • 不要手写 plugins.installs;新版 OpenClaw 会把插件安装记录保存在托管安装索引中,请使用 openclaw plugins install <path-or-package>

也支持环境变量:

ONEBOT_WS_URL=ws://your-host:3001
ONEBOT_HTTP_URL=http://your-host:3001
ONEBOT_ACCESS_TOKEN=your_token  # 可选

OneBot setup 也支持:

  • --token wsUrl,httpUrl[,accessToken[,sharedDir[,containerSharedDir]]]
  • 或 openclaw channels add --channel onebot --shared-dir <hostPath> --container-shared-dir /shared
  • 如果 OpenClaw 升级后覆盖了 CLI dist,可在插件目录执行 npm run sync:openclaw-cli 重新同步参数接线
3. 重启 Gateway
openclaw gateway restart

高级配置

{
  "channels": {
    "onebot": {
      "enabled": true,
      "wsUrl": "ws://your-host:3001",
      "httpUrl": "http://your-host:3001",
      "accessToken": "your_token",
      "sharedDir": "/Users/you/napcat/shared",
      "containerSharedDir": "/shared",
      "allowFrom": ["private:12345", "group:67890"],
      "groupAutoReact": true,
      "groupAutoReactEmojiId": 1
    }
  }
}
参数说明
allowFrom消息来源白名单 — private:<QQ号>、group:<群号>、或 *(允许所有)
accessTokenHTTP API 用 Bearer token,WebSocket 用 query 参数
sharedDir宿主机共享目录;默认 ~/napcat/shared,用于把语音/图片 stage 给 NapCat
containerSharedDir容器内共享目录;默认 /shared,与 sharedDir 对应
groupAutoReact是否对入站群消息自动添加 reaction,默认 true
groupAutoReactEmojiId群聊自动 reaction 使用的 QQ emoji id,默认 1

Reaction 与流式回复

  • Reaction

- 插件实现了 OpenClaw channel action react - 通过 NapCat set_msg_emoji_like 对群消息或指定群消息 message_id 添加表情 - QQ 私聊 reaction 目前不可靠,接口可能返回成功,但不会真正落到消息上 - 入站群消息还支持自动 reaction,受 groupAutoReact / groupAutoReactEmojiId 控制,默认开启

  • 流式回复

- 这里支持的是 OpenClaw block streaming - QQ 端表现为连续多条分块消息,不是“编辑同一条消息”的 draft stream - 开启方式:

{
  "agents": {
    "defaults": {
      "blockStreamingDefault": "on"
    }
  }
}
  • 可选调优:
{
  "channels": {
    "onebot": {
      "streaming": {
        "block": {
          "coalesce": {
            "minChars": 80,
            "idleMs": 600
          }
        }
      }
    }
  }
}

旧版 channels.onebot.blockStreamingCoalesce 仍兼容;新版 openclaw doctor --fix 会把它迁移到 channels.onebot.streaming.block.coalesce。

验证

  • Reaction

- 先让群里出现一条新消息 - 从 gateway 日志里拿到 msg=<message_id> - 再执行:

npm run build
npm run react-test -- --message-id <message_id> --emoji 76

- 当前建议只把这项验证用于群聊消息;私聊 reaction 在 QQ/NapCat 上通常不生效

  • Streaming

- 在 OpenClaw 配置里开启 agents.defaults.blockStreamingDefault = "on" - 然后在 QQ 里发一条明确要求“分段回复”的消息 - 成功时,QQ 会连续收到多条消息,日志里会出现 deliver(block),最后再有 deliver(final)

语音支持(可选)

支持 QQ 语音消息的完整自动处理链路:

  • 入站:QQ 语音 (SILK/AMR) → 下载 → 转 MP3 → OpenClaw STT 转文字 → Agent 生成回复
  • 出站:Agent 回复 → TTS 生成音频 → sendRecord 发送 QQ 语音

依赖:

  • ffmpeg — 音频格式转换
  • uv — 运行 pilk 解码 SILK 格式(AMR 仅需 ffmpeg)

不需要语音功能时可以跳过这些依赖。

消息目标格式

  • private:<QQ号> — 私聊消息
  • group:<群号> — 群聊消息
  • <QQ号> — 自动识别为私聊

开发

npm install
npm test          # 119 tests
npm run build     # 编译 TypeScript
npm run coverage  # 覆盖率报告
npm run sync:openclaw-cli  # 重新同步 OpenClaw CLI 的 shared-dir 参数

English

Source code is available on GitHub.

An OpenClaw native channel plugin that connects to NapCat, go-cqhttp, or any OneBot 11 compatible QQ bot framework.

Note:

  • npm package name: openclaw-onebot
  • ClawHub package payload name: openclaw-onebot-plugin
  • Plugin id: openclaw-onebot
  • Channel id: onebot
  • Use openclaw-onebot in plugins.allow / plugins.entries; install records are managed by openclaw plugins install
  • Keep channels.onebot unchanged
  • This release targets OpenClaw 2026.4.26 / plugin-sdk 2026.4.26 and declares setupEntry plus channelConfigs manifest metadata

Features

  • 🔌 Native channel plugin — QQ on par with Discord / Telegram / WhatsApp
  • 📨 Private & group chat (inbound + outbound)
  • 😀 Reaction support (groups) — react to a QQ group message via NapCat set_msg_emoji_like; QQ private-chat reactions are currently unreliable
  • 👍 Automatic group reactions — auto-react to inbound group messages with a configurable switch, enabled by default
  • 🌊 Block streaming — OpenClaw partial replies arrive as multiple QQ messages
  • 🧭 Full OpenClaw text-command passthrough — /status, /help, /commands, /model, /new, /reset, etc.
  • 🎤 Full voice pipeline — QQ voice (SILK/AMR) → MP3 → STT → TTS → send QQ voice
  • 📦 Message batching — auto-merge rapid messages within 1.5s (Telegram-style)
  • 🖼️ Image, audio, and file attachments
  • 🔄 WebSocket auto-reconnect with exponential backoff
  • 🔒 Optional access token authentication
  • 🎯 allowFrom filtering (private/group/user-level)
  • ✅ 119 tests passing
  • 📈 Coverage can be re-generated with npm run coverage

Quick Start

1. Install
# Auto install
bash scripts/install.sh

# Or manual
npm install && npm run prepare:clawhub:plugin
openclaw plugins install .clawhub-plugin/openclaw-onebot-plugin --force

scripts/install.sh prepares .clawhub-plugin/openclaw-onebot-plugin in the source repo first and prefers openclaw plugins install so current OpenClaw builds update the managed plugin install index. Older OpenClaw builds fall back to the legacy manual copy path. The script also runs scripts/sync-openclaw-cli.mjs so the local OpenClaw CLI keeps the OneBot --shared-dir / --container-shared-dir flags wired in.

2. Configure

Add to openclaw.json:

{
  "plugins": {
    "allow": ["openclaw-onebot"],
    "entries": {
      "openclaw-onebot": {
        "enabled": true
      }
    }
  },
  "channels": {
    "onebot": {
      "enabled": true,
      "wsUrl": "ws://your-host:3001",
      "httpUrl": "http://your-host:3001",
      "accessToken": "your_token",
      "sharedDir": "/Users/you/napcat/shared",
      "containerSharedDir": "/shared",
      "groupAutoReact": true,
      "groupAutoReactEmojiId": 1
    }
  }
}

Notes:

  • Use openclaw-onebot for plugin config keys
  • Keep runtime channel config under channels.onebot
  • Do not edit plugins.installs by hand; current OpenClaw stores install records in a managed plugin index, so use openclaw plugins install <path-or-package>

Or via environment variables:

ONEBOT_WS_URL=ws://your-host:3001
ONEBOT_HTTP_URL=http://your-host:3001
ONEBOT_ACCESS_TOKEN=your_token  # optional

OneBot setup also supports:

  • --token wsUrl,httpUrl[,accessToken[,sharedDir[,containerSharedDir]]]
  • or openclaw channels add --channel onebot --shared-dir <hostPath> --container-shared-dir /shared
  • if an OpenClaw upgrade overwrites the installed CLI dist, run npm run sync:openclaw-cli from the plugin directory to re-apply the flags
3. Restart Gateway
openclaw gateway restart

Advanced Configuration

{
  "channels": {
    "onebot": {
      "enabled": true,
      "wsUrl": "ws://your-host:3001",
      "httpUrl": "http://your-host:3001",
      "accessToken": "your_token",
      "sharedDir": "/Users/you/napcat/shared",
      "containerSharedDir": "/shared",
      "allowFrom": ["private:12345", "group:67890"],
      "groupAutoReact": true,
      "groupAutoReactEmojiId": 1
    }
  }
}
OptionDescription
allowFromWhitelist — private:<qq>, group:<id>, or * (allow all)
accessTokenBearer token for HTTP, query param for WebSocket
sharedDirHost-side shared directory; defaults to ~/napcat/shared for staging outbound media
containerSharedDirContainer-side mount path; defaults to /shared and should map to sharedDir
groupAutoReactWhether to auto-react to inbound group messages; defaults to true
groupAutoReactEmojiIdQQ emoji id used for automatic group reactions; defaults to 1

Reactions and Streaming Replies

  • Reactions

- The plugin implements the OpenClaw react channel action - It maps to NapCat set_msg_emoji_like - Group-message reactions are supported - QQ private-chat reactions are currently unreliable: the API may return success while no visible reaction is persisted - Inbound group messages can also be auto-reacted, controlled by groupAutoReact / groupAutoReactEmojiId, enabled by default

  • Streaming replies

- This plugin supports OpenClaw block streaming - QQ receives multiple incremental messages instead of a single edited draft message - Enable it with:

{
  "agents": {
    "defaults": {
      "blockStreamingDefault": "on"
    }
  }
}
  • Optional coalescing hint for OneBot:
{
  "channels": {
    "onebot": {
      "streaming": {
        "block": {
          "coalesce": {
            "minChars": 80,
            "idleMs": 600
          }
        }
      }
    }
  }
}

Legacy channels.onebot.blockStreamingCoalesce remains accepted; current openclaw doctor --fix migrates it to channels.onebot.streaming.block.coalesce.

Verification

  • Reaction

- Send a fresh QQ group message first - Read the inbound msg=<message_id> from the gateway log - Then run:

npm run build
npm run react-test -- --message-id <message_id> --emoji 76

- For now, treat this as a group-chat verification flow; private-chat reactions are not a reliable capability

  • Streaming

- Enable agents.defaults.blockStreamingDefault = "on" in OpenClaw config - Send a QQ prompt that explicitly asks for chunked or stepwise output - Success looks like multiple QQ messages plus deliver(block) entries in the gateway log, followed by deliver(final)

Voice Support (Optional)

End-to-end voice flow:

  • Inbound: QQ voice (SILK/AMR) → download → MP3 → OpenClaw STT → Agent reply
  • Outbound: Agent reply → TTS audio → sendRecord → QQ voice

Dependencies:

  • ffmpeg
  • uv (for SILK decoding via pilk; AMR only needs ffmpeg)

Skip these if you only need text and image delivery.

Target Format

  • private:<qq_number> — Private message
  • group:<group_id> — Group message
  • <qq_number> — Auto-detected as private

Development

npm install
npm test          # Run 119 tests
npm run build     # Compile TypeScript
npm run coverage  # Coverage report
npm run sync:openclaw-cli  # Re-apply shared-dir CLI wiring after OpenClaw upgrades

License

MIT

平台分布

OpenClaw

84.21%
按下载量换算7,426

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills