fclwtt

Wecom Channel Fix

IT Ops & Securityv0.1.0
By fclwttUpdated 2026-05-11skills-5@clawhub_fclwtt/skills-5
TroubleshootingConfig Generation#微信

According to AlphaMoat, as of 2026-09, Wecom Channel Fix has 1,244 downloads and 0 stars — ranked #4,914 of 5,078 AI skills overall, and #262 of 264 in IT Ops & Security.

Installs
306
Downloads
1.2K
Stars
-
Overall Rank
#4,914
Top 97% overall · Top 100% in IT Ops & Security
PlatformInstallsDownloadsStarsComments
ClawHub ↗26987--
SkillHub ↗3061.2K-—

Platforms count differently and update at different times.

What this skill does

It checks channel status, plugin identifiers, credentials and logs, then describes backed-up configuration repair and single-account fallback. Confirm compatibility before changes or gateway restart, redact secret-bearing output and restrict allowed groups.

Profile published 2026-10-27

What you can do with it

  • Diagnose a WeCom connection

When to use it

  • When the configured channel fails

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Review status and redacted errors, then propose a backed-up repair.

Monthly Trend

Downloads1.2K
4838921.3K2026-03 · Downloads 5392026-05 · Downloads 7902026-06 · Downloads 8382026-07 · Downloads 9632026-08 · Downloads 1.0K2026-09 · Downloads 1.2K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-091.2K—-
2026-081.0K+7.3%-
2026-07963+14.9%-
2026-06838+6.1%-
2026-05790—-
2026-03539—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

7.2 KB · ClawHub v0.1.0
---
name: wecom-channel-fix
description: 企业微信通道配置诊断与修复。当用户遇到企微通道无法连接、配置错误、插件 ID 不匹配、多账号模式不支持等问题时激活。支持配置检测、自动修复、单账号/多账号模式切换。
version: 1.0.0
license: MIT
author: OpenClaw Community
homepage: https://github.com/YOUR_USERNAME/openclaw-skill-wecom-channel-fix
metadata:
  {
    "openclaw":
Show all (338 lines)
      {
        "emoji": "🔧",
        "always": false,
        "requires":
          {
            "bins": [],
          },
      },
  }
---

# 企业微信通道配置诊断与修复技能

当用户遇到企业微信通道无法连接、消息无回复、配置错误等问题时,使用此技能进行诊断和修复。

## 触发场景

- "企微没反应"
- "企业微信通道配置错误"
- "wecom 连不上"
- "插件 ID 不匹配"
- "多账号模式不支持"
- "企微消息无回复"

## 诊断流程

### 步骤 1:检查通道状态

```bash
openclaw channels status 2>&1
```

**判断标准:**
- `enabled, configured, running` ✅ 正常
- `enabled, not configured, stopped` ❌ 配置缺失
- `error:*` ❌ 错误状态

### 步骤 2:检查配置文件

```bash
openclaw config get channels.wecom 2>&1
```

**检查项:**
1. `botId` 是否存在
2. `secret` 是否存在
3. 是否使用了不支持的 `accounts.*` 多账号结构

### 步骤 3:检查插件配置

```bash
grep -A 10 '"plugins"' ~/.openclaw/openclaw.json
```

**常见问题:**
- 插件 ID 不匹配(配置用 `wecom-openclaw-plugin`,实际导出 `wecom`)
- 插件未启用

### 步骤 4:查看日志

```bash
cat /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep -i wecom | tail -20
```

**关键错误:**
- `plugin id mismatch`
- `Invalid WebSocket frame`
- `Authentication failed`
- `not configured`

---

## 修复方案

### 问题 A:插件 ID 不匹配

**症状:**
```
[plugins] plugin id mismatch (config uses "wecom-openclaw-plugin", export uses "wecom")
plugins.entries.wecom: plugin not found: wecom
```

**修复:**

将 `openclaw.json` 中的插件配置从:
```json
{
  "plugins": {
    "allow": ["wecom-openclaw-plugin"],
    "entries": {
      "wecom-openclaw-plugin": {"enabled": true}
    }
  }
}
```

改为:
```json
{
  "plugins": {
    "allow": ["wecom"],
    "entries": {
      "wecom": {"enabled": true}
    }
  }
}
```

**原因:** 企微插件的 `openclaw.plugin.json` 中定义 `id: "wecom"`,但安装包名为 `@wecom/wecom-openclaw-plugin`,配置时应使用导出 ID 而非包名。

---

### 问题 B:多账号模式不支持

**症状:**
```
wecom default: 企业微信机器人 ID 或 Secret 未配置
config reload skipped (invalid config)
```

**当前配置(错误):**
```json
{
  "channels": {
    "wecom": {
      "enabled": true,
      "defaultAccount": "main",
      "accounts": {
        "main": {"botId": "...", "secret": "..."},
        "ai-engineer": {"botId": "...", "secret": "..."}
      }
    }
  }
}
```

**修复(回退单账号模式):**
```json
{
  "channels": {
    "wecom": {
      "enabled": true,
      "botId": "你的 botId",
      "secret": "你的 secret",
      "dmPolicy": "pairing"
    }
  },
  "bindings": [
    {
      "agentId": "main",
      "match": {"channel": "wecom", "accountId": "*"}
    }
  ]
}
```

**原因:** 企微插件(v1.0.8)不支持多账号模式,只接受扁平的 `botId`/`secret` 配置。

---

### 问题 C:通道未配置

**症状:**
```
企业微信 default: enabled, not configured, stopped
企业微信机器人 ID 或 Secret 未配置
```

**修复:**

1. 确认已安装企微插件:
```bash
openclaw plugins list | grep wecom
```

2. 配置 botId 和 secret:
```bash
openclaw config set channels.wecom.botId <YOUR_BOT_ID>
openclaw config set channels.wecom.secret <YOUR_SECRET>
openclaw config set channels.wecom.enabled true
```

3. 重启 gateway:
```bash
openclaw gateway restart
```

---

## 完整修复脚本

当用户确认需要修复时,可执行以下操作:

### 1. 备份当前配置
```bash
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup.$(date +%Y%m%d%H%M%S)
```

### 2. 修复插件 ID
使用 `edit` 工具将 `wecom-openclaw-plugin` 替换为 `wecom`

### 3. 修复通道配置
如使用多账号模式,回退到单账号扁平结构

### 4. 验证修复
```bash
openclaw channels status 2>&1
openclaw gateway status 2>&1
```

### 5. 测试消息
让用户在企微发送测试消息,确认回复正常

---

## 配置模板

### 单账号模式(推荐,当前插件支持)

```json
{
  "channels": {
    "wecom": {
      "enabled": true,
      "botId": "aibXXXXXXXXXXXXXXXXXX",
      "secret": "XXXXXXXXXXXXXXXXXXXXXXXX",
      "dmPolicy": "pairing",
      "allowFrom": [],
      "groupPolicy": "open"
    }
  },
  "bindings": [
    {
      "agentId": "main",
      "match": {
        "channel": "wecom",
        "accountId": "*"
      }
    }
  ]
}
```

### 多账号模式(需要插件支持,当前不可用)

```json
{
  "channels": {
    "wecom": {
      "enabled": true,
      "defaultAccount": "main",
      "accounts": {
        "main": {
          "botId": "aibXXXXXXXXXXXXXXXXXX",
          "secret": "XXXXXXXXXXXXXXXXXXXXXXXX",
          "dmPolicy": "pairing"
        },
        "agent-2": {
          "botId": "aibYYYYYYYYYYYYYYYYYY",
          "secret": "YYYYYYYYYYYYYYYYYYYYYYYY",
          "dmPolicy": "pairing"
        }
      }
    }
  },
  "bindings": [
    {
      "agentId": "main",
      "match": {"channel": "wecom", "accountId": "main"}
    },
    {
      "agentId": "agent-2",
      "match": {"channel": "wecom", "accountId": "agent-2"}
    }
  ]
}
```

> ⚠️ 注意:企微插件 v1.0.8 **不支持**多账号模式,使用上述配置会导致通道无法启动。

---

## 验证清单

修复完成后,确认以下项:

- [ ] `openclaw channels status` 显示 `enabled, configured, running`
- [ ] 日志中无 `plugin id mismatch` 警告
- [ ] 日志中 `Authentication successful`
- [ ] 企微发送测试消息能收到回复
- [ ] WebSocket 心跳正常(日志中每 30s 一次 heartbeat)

---

## 常见问题 FAQ

**Q: 为什么插件 ID 不匹配?**
A: 企微插件的包名是 `@wecom/wecom-openclaw-plugin`,但插件导出的 ID 是 `wecom`。配置时应使用导出 ID。

**Q: 多账号模式什么时候支持?**
A: 需要联系企微插件开发者添加此功能。目前只能使用单账号模式。

**Q: 如何在单账号模式下使用多个 agent?**
A: 可以通过 main 代理转发消息,或使用 Web Dashboard 直接访问不同 agent。

**Q: 配对码在哪里查看?**
A: `openclaw pairing list wecom`

**Q: 如何批准配对?**
A: `openclaw pairing approve wecom <CODE>`

---

## 参考资料

- [企微插件 GitHub](https://github.com/openclaw/wecom-openclaw-plugin)
- [企业微信 AI Bot 文档](https://open.work.weixin.qq.com/help?doc_id=21657)
- [OpenClaw 通道配置文档](https://docs.openclaw.ai/channels)

---

## 注意事项

1. **修改配置前务必备份** `openclaw.json`
2. 修改配置后需要 **重启 gateway** 才能生效
3. 多账号模式需要等待插件更新支持
4. 如修复后仍有问题,查看完整日志:`/tmp/openclaw/openclaw-YYYY-MM-DD.log`

Popular in IT Ops & Security

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.