← 返回 Skills 市场
编辑
企业微信 AI Bot 对接
作者
chenyd002025
· GitHub ↗
· v1.0.2
· MIT-0
305
总下载
0
收藏
2
当前安装
3
版本数
在 OpenClaw 中安装
/install jvs-enterprise-wechat
功能描述
快速配置 OpenClaw 与企业微信 AI Bot 对接,实现无需公网和证书的智能助理接入和消息回复功能。
使用说明 (SKILL.md)
企业微信 AI Bot 配置技能
一键配置 OpenClaw 与企业微信 AI Bot 的对接
📋 功能说明
此技能帮助你快速将 OpenClaw 机器人接入企业微信,使用 AI Bot 模式(WebSocket 长连接)。
适用场景:
- ✅ 企业微信用户需要 AI 助手
- ✅ 团队内部部署智能客服
- ✅ 个人工作助手
无需:
- ❌ 公网域名
- ❌ HTTPS 证书
- ❌ 回调配置
🚀 快速开始
步骤 1:安装技能
npx clawhub@latest install wecom-ai-bot-setup
步骤 2:在企业微信手机端创建 AI Bot
- 打开 企业微信 App(手机)
- 点击底部「通讯录」
- 找到「智能机器人」
- 点击进入后,选择「手动创建」
- 选择「API 创建」方式
- 填写基本信息:
- 名称:如 "HarryBot 助手"
- 头像:上传 Logo
- 简介:如 "智能工作助手"
- 创建完成后,立即生成凭证
步骤 3:获取 Bot 凭证
创建成功后,页面上会显示:
| 字段 | 说明 |
|---|---|
| Bot ID | 机器人唯一标识 |
| Secret | 机器人密钥 |
⚠️ 重要:
- Secret 只显示一次,请立即复制保存!
- 如果丢失,需要重新生成
- 建议立即保存到安全的地方
步骤 4:开通 API 权限(如需要)
如果提示需要开通权限:
- 打开企业微信管理后台(电脑端)
- 进入「应用管理」→ 找到你的 AI Bot
- 开通相关 API 权限
- 保存后生效
⚠️ 注意:
- 基础功能手机端即可创建
- 部分高级权限需要在管理后台开通
- 具体权限要求以页面提示为准
步骤 4:运行配置脚本
python3 scripts/setup_wecom.py
按提示输入:
- Bot ID
- Secret
步骤 5:重启 Gateway
openclaw gateway restart
步骤 6:测试连接
- 打开企业微信 App(手机或电脑)
- 找到你的 AI Bot(在工作台或聊天列表)
- 发送消息:
你好 - 查看回复
如果机器人回复了,说明配置成功!🎉
🔧 手动配置(可选)
如果不想用脚本,可以手动编辑配置文件:
编辑 ~/.openclaw/openclaw.json
{
"channels": {
"wecom": {
"enabled": true,
"botId": "你的 Bot ID",
"secret": "你的 Secret",
"model": "保持现有模型配置",
"dmPolicy": "open"
}
}
}
然后重启 Gateway:
openclaw gateway restart
📝 配置参数说明
| 参数 | 必填 | 说明 | 默认值 |
|---|---|---|---|
enabled |
✅ | 是否启用通道 | false |
botId |
✅ | 企业微信 Bot ID | - |
secret |
✅ | 企业微信 Bot Secret | - |
model |
✅ | 使用的模型 | 当前模型 |
dmPolicy |
❌ | 直接消息策略 | open |
dmPolicy 选项
| 值 | 说明 |
|---|---|
open |
所有用户可以直接发消息(推荐) |
pairing |
需要配对码验证 |
allowlist |
只有白名单用户可以发消息 |
disabled |
禁用直接消息 |
🔍 故障排查
问题 1:发送消息没回复
检查日志:
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep -i wecom
可能原因:
- Gateway 没运行 →
openclaw gateway status - Bot ID/Secret 错误 → 检查企业微信后台
- 模型不可用 → 检查模型配置
问题 2:找不到 AI Bot
解决方法:
- 打开企业微信 App
- 「工作台」→「AI 助理」
- 检查是否已创建
- 重新打开企业微信 App
问题 3:提示"模型不可用"
解决方法:
- 检查配置文件中的
model是否正确 - 查看当前模型状态:
/session_status
问题 4:插件加载失败
重新安装插件:
openclaw plugins install @wecom/wecom-openclaw-plugin --force
openclaw gateway restart
📊 日志监控
实时查看企业微信日志
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep -i wecom
正常日志示例
[wecom] message received from: [用户 ID]
[wecom] processing message: 你好
[wecom] sending reply to: [用户 ID]
[wecom] Reply message sent via WebSocket, reqId: xxx
错误日志示例
[wecom] failed to connect: invalid botId
[wecom] authentication failed: wrong secret
🔐 安全建议
-
保护 Secret
- 不要提交到 Git
- 不要公开分享
- 定期更换
-
配置访问控制
- 生产环境使用
dmPolicy: "allowlist" - 配置
allowFrom白名单
- 生产环境使用
-
监控日志
- 定期检查异常日志
📚 相关文档
✅ 配置检查清单
完成配置后,逐项检查:
- 企业微信 AI Bot 已创建
- Bot ID 和 Secret 已获取
- 插件已安装:
openclaw plugins install @wecom/wecom-openclaw-plugin - 配置文件已更新
- Gateway 已重启
- 测试消息已发送并收到回复
- 日志无错误
🆘 需要帮助?
如果遇到无法解决的问题:
-
收集信息:
- 错误日志(最后 50 行)
- 配置文件(隐藏 Secret)
- OpenClaw 版本
-
提交问题:
- GitHub Issues
- Discord 社区
版本: 1.0.0
作者: harrybot
许可: MIT-0(免费使用,无需署名)
安全使用建议
This skill appears to be what it says: it updates your local OpenClaw configuration to add a 企业微信 AI Bot. Before running it: (1) inspect scripts/setup_wecom.py yourself (it's short and readable) to confirm behavior; (2) ensure your ~/.openclaw directory is the correct OpenClaw config and back it up; (3) protect the saved Secret — the script writes it into the config in plaintext, so restrict file permissions (e.g., chmod 600) and do not commit the config to version control; (4) prefer dmPolicy allowlist in production; (5) if you don't trust the package source, manually add the config entries instead of running the script. If you want lower risk, run the script with --bot-id and --secret only after review or apply the config changes by hand.
功能分析
Type: OpenClaw Skill
Name: jvs-enterprise-wechat
Version: 1.0.2
The skill bundle provides a legitimate utility for configuring Enterprise WeChat (WeCom) integration with OpenClaw. The Python script (scripts/setup_wecom.py) is designed to update local configuration files with user-provided credentials, and the documentation (SKILL.md) follows standard setup procedures without any evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
Name/description promise (configure OpenClaw ↔ 企业微信 AI Bot) matches the provided assets: SKILL.md describes the steps and the included script updates ~/.openclaw/openclaw.json. No unrelated binaries, env vars, or services are requested.
Instruction Scope
SKILL.md instructs the user to create an AI Bot in 企业微信, run the included Python script to insert Bot ID/Secret into the OpenClaw config, and restart the gateway. The instructions reference only local config files, OpenClaw commands, and vendor docs. The script prompts for credentials but does not transmit them elsewhere. Note: the skill stores the secret in the OpenClaw config file in plaintext (expected for local channel config), so protect that file.
Install Mechanism
No install spec or remote downloads are present; the skill is instruction-only plus a small included Python script. Nothing is fetched from external URLs during installation.
Credentials
The skill requests no environment variables or external credentials beyond what the user provides interactively (Bot ID and Secret). Those credentials are directly required for the integration and are justified by the purpose.
Persistence & Privilege
The skill does not request always-on inclusion and does not alter other skills or system-wide settings beyond writing to the user's OpenClaw config file (its stated purpose). Autonomous model invocation defaults are unchanged.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install jvs-enterprise-wechat - 安装完成后,直接呼叫该 Skill 的名称或使用
/jvs-enterprise-wechat触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- No code or functional changes in this version.
- Documentation formatting was slightly updated: example User IDs in log messages were generalized to `[用户 ID]`.
- No impact on skill behavior or configuration.
v1.0.1
- 优化文档说明,新增企业微信手机端手动创建 AI Bot 的详细步骤
- 增加开通 API 权限的说明及注意事项
- 更新“找不到 AI Bot”相关的故障排查方法,更贴合手机端使用场景
- 其他步骤及配置参数说明无变化,使用方法保持一致
v1.0.0
企业微信 AI Bot 配置技能 1.0.0
- 新增一键配置 OpenClaw 与企业微信 AI Bot 的完整指引和说明。
- 支持通过脚本或手动编辑配置文件完成接入。
- 提供常见问题排查方法及日志监控示例。
- 详细说明安全建议与访问控制参数配置。
- 包含操作步骤、参数说明及官方文档链接,助力快速部署上线。
元数据
常见问题
企业微信 AI Bot 对接 是什么?
快速配置 OpenClaw 与企业微信 AI Bot 对接,实现无需公网和证书的智能助理接入和消息回复功能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 305 次。
如何安装 企业微信 AI Bot 对接?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install jvs-enterprise-wechat」即可一键安装,无需额外配置。
企业微信 AI Bot 对接 是免费的吗?
是的,企业微信 AI Bot 对接 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
企业微信 AI Bot 对接 支持哪些平台?
企业微信 AI Bot 对接 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 企业微信 AI Bot 对接?
由 chenyd002025(@chenyd002025)开发并维护,当前版本 v1.0.2。
推荐 Skills