# Send Matrix Channel Fix to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "matrix-fix",
    "name": "Matrix Channel Fix",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Boms/matrix-fix",
    "canonicalUrl": "https://clawhub.ai/Boms/matrix-fix",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/matrix-fix",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=matrix-fix",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "matrix-fix",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T08:59:31.365Z",
      "expiresAt": "2026-05-12T08:59:31.365Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=matrix-fix",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=matrix-fix",
        "contentDisposition": "attachment; filename=\"matrix-fix-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "matrix-fix"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/matrix-fix"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/matrix-fix",
    "downloadUrl": "https://openagent3.xyz/downloads/matrix-fix",
    "agentUrl": "https://openagent3.xyz/skills/matrix-fix/agent",
    "manifestUrl": "https://openagent3.xyz/skills/matrix-fix/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/matrix-fix/agent.md"
  }
}
```
## Documentation

### 1. 加密模块缺失

症状：

MatrixClientLite Failed to initialize crypto storage, E2EE disabled
Cannot find module '@matrix-org/matrix-sdk-crypto-nodejs'

修复：

cd /usr/local/lib/node_modules/openclaw
pnpm add @matrix-org/matrix-sdk-crypto-nodejs
pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs
openclaw gateway restart

### 2. Token 失效 (M_UNKNOWN_TOKEN)

症状：

errcode: 'M_UNKNOWN_TOKEN', error: 'Invalid access token passed.'

修复：
清除旧 token 并重启：

rm -rf ~/.openclaw/matrix/accounts/*
openclaw gateway restart

### 3. DNS 解析失败 (ENOTFOUND)

症状：

Error: getaddrinfo ENOTFOUND YOUR_HOMESERVER

检查：

host YOUR_HOMESERVER
ping YOUR_HOMESERVER

### 4. 重新配置 Matrix Channel

完整重置步骤：

移除旧配置：

openclaw config unset channels.matrix

重新设置配置：

openclaw config set channels.matrix.homeserver "https://YOUR_HOMESERVER:PORT"
openclaw config set channels.matrix.userId "@YOUR_BOT_USER_ID"
openclaw config set channels.matrix.password "YOUR_PASSWORD"
openclaw config set channels.matrix.deviceName "YOUR_DEVICE_NAME"
openclaw config set channels.matrix.encryption true
openclaw config set channels.matrix.enabled true

重启 Gateway：

openclaw gateway restart

### 5. 退出所有房间

如果需要让 bot 退出所有房间：

# 获取 access_token
TOKEN=$(curl -s -X POST "https://YOUR_HOMESERVER:PORT/_matrix/client/r0/login" \\
  -H "Content-Type: application/json" \\
  -d '{"type":"m.login.password","user":"YOUR_BOT_USER","password":"YOUR_PASSWORD"}' | \\
  jq -r '.access_token')

# 获取房间列表
curl -s -X GET "https://YOUR_HOMESERVER:PORT/_matrix/client/r0/joined_rooms" \\
  -H "Authorization: Bearer $TOKEN" | jq '.'

# 逐一退出
for room in "ROOM_ID_1" "ROOM_ID_2"; do
  curl -s -X POST "https://YOUR_HOMESERVER:PORT/_matrix/client/r0/rooms/$room/leave" \\
    -H "Authorization: Bearer $TOKEN"
done

### 6. 检查状态

openclaw channels status --probe
openclaw logs | grep -i matrix

### 诊断命令

命令用途openclaw status查看整体状态openclaw channels status查看渠道状态openclaw channels status --probe探测渠道连通性openclaw logs 2>&1 | grep -i matrix查看 Matrix 日志

### 配置示例

{
  "channels": {
    "matrix": {
      "enabled": true,
      "homeserver": "https://YOUR_HOMESERVER:PORT",
      "userId": "@YOUR_BOT_USER_ID",
      "password": "YOUR_PASSWORD",
      "deviceName": "YOUR_DEVICE_NAME",
      "encryption": true
    }
  }
}
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Boms
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T08:59:31.365Z
- Expires at: 2026-05-12T08:59:31.365Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/matrix-fix)
- [Send to Agent page](https://openagent3.xyz/skills/matrix-fix/agent)
- [JSON manifest](https://openagent3.xyz/skills/matrix-fix/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/matrix-fix/agent.md)
- [Download page](https://openagent3.xyz/downloads/matrix-fix)