{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/matrix-fix",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=matrix-fix",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/matrix-fix",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "1. 加密模块缺失",
        "body": "症状：\n\nMatrixClientLite Failed to initialize crypto storage, E2EE disabled\nCannot find module '@matrix-org/matrix-sdk-crypto-nodejs'\n\n修复：\n\ncd /usr/local/lib/node_modules/openclaw\npnpm add @matrix-org/matrix-sdk-crypto-nodejs\npnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs\nopenclaw gateway restart"
      },
      {
        "title": "2. Token 失效 (M_UNKNOWN_TOKEN)",
        "body": "症状：\n\nerrcode: 'M_UNKNOWN_TOKEN', error: 'Invalid access token passed.'\n\n修复：\n清除旧 token 并重启：\n\nrm -rf ~/.openclaw/matrix/accounts/*\nopenclaw gateway restart"
      },
      {
        "title": "3. DNS 解析失败 (ENOTFOUND)",
        "body": "症状：\n\nError: getaddrinfo ENOTFOUND YOUR_HOMESERVER\n\n检查：\n\nhost YOUR_HOMESERVER\nping YOUR_HOMESERVER"
      },
      {
        "title": "4. 重新配置 Matrix Channel",
        "body": "完整重置步骤：\n\n移除旧配置：\n\nopenclaw config unset channels.matrix\n\n重新设置配置：\n\nopenclaw config set channels.matrix.homeserver \"https://YOUR_HOMESERVER:PORT\"\nopenclaw config set channels.matrix.userId \"@YOUR_BOT_USER_ID\"\nopenclaw config set channels.matrix.password \"YOUR_PASSWORD\"\nopenclaw config set channels.matrix.deviceName \"YOUR_DEVICE_NAME\"\nopenclaw config set channels.matrix.encryption true\nopenclaw config set channels.matrix.enabled true\n\n重启 Gateway：\n\nopenclaw gateway restart"
      },
      {
        "title": "5. 退出所有房间",
        "body": "如果需要让 bot 退出所有房间：\n\n# 获取 access_token\nTOKEN=$(curl -s -X POST \"https://YOUR_HOMESERVER:PORT/_matrix/client/r0/login\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\":\"m.login.password\",\"user\":\"YOUR_BOT_USER\",\"password\":\"YOUR_PASSWORD\"}' | \\\n  jq -r '.access_token')\n\n# 获取房间列表\ncurl -s -X GET \"https://YOUR_HOMESERVER:PORT/_matrix/client/r0/joined_rooms\" \\\n  -H \"Authorization: Bearer $TOKEN\" | jq '.'\n\n# 逐一退出\nfor room in \"ROOM_ID_1\" \"ROOM_ID_2\"; do\n  curl -s -X POST \"https://YOUR_HOMESERVER:PORT/_matrix/client/r0/rooms/$room/leave\" \\\n    -H \"Authorization: Bearer $TOKEN\"\ndone"
      },
      {
        "title": "6. 检查状态",
        "body": "openclaw channels status --probe\nopenclaw logs | grep -i matrix"
      },
      {
        "title": "诊断命令",
        "body": "命令用途openclaw status查看整体状态openclaw channels status查看渠道状态openclaw channels status --probe探测渠道连通性openclaw logs 2>&1 | grep -i matrix查看 Matrix 日志"
      },
      {
        "title": "配置示例",
        "body": "{\n  \"channels\": {\n    \"matrix\": {\n      \"enabled\": true,\n      \"homeserver\": \"https://YOUR_HOMESERVER:PORT\",\n      \"userId\": \"@YOUR_BOT_USER_ID\",\n      \"password\": \"YOUR_PASSWORD\",\n      \"deviceName\": \"YOUR_DEVICE_NAME\",\n      \"encryption\": true\n    }\n  }\n}"
      }
    ],
    "body": "Matrix Channel 修复指南\n常见问题\n1. 加密模块缺失\n\n症状：\n\nMatrixClientLite Failed to initialize crypto storage, E2EE disabled\nCannot find module '@matrix-org/matrix-sdk-crypto-nodejs'\n\n\n修复：\n\ncd /usr/local/lib/node_modules/openclaw\npnpm add @matrix-org/matrix-sdk-crypto-nodejs\npnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs\nopenclaw gateway restart\n\n2. Token 失效 (M_UNKNOWN_TOKEN)\n\n症状：\n\nerrcode: 'M_UNKNOWN_TOKEN', error: 'Invalid access token passed.'\n\n\n修复： 清除旧 token 并重启：\n\nrm -rf ~/.openclaw/matrix/accounts/*\nopenclaw gateway restart\n\n3. DNS 解析失败 (ENOTFOUND)\n\n症状：\n\nError: getaddrinfo ENOTFOUND YOUR_HOMESERVER\n\n\n检查：\n\nhost YOUR_HOMESERVER\nping YOUR_HOMESERVER\n\n4. 重新配置 Matrix Channel\n\n完整重置步骤：\n\n移除旧配置：\nopenclaw config unset channels.matrix\n\n重新设置配置：\nopenclaw config set channels.matrix.homeserver \"https://YOUR_HOMESERVER:PORT\"\nopenclaw config set channels.matrix.userId \"@YOUR_BOT_USER_ID\"\nopenclaw config set channels.matrix.password \"YOUR_PASSWORD\"\nopenclaw config set channels.matrix.deviceName \"YOUR_DEVICE_NAME\"\nopenclaw config set channels.matrix.encryption true\nopenclaw config set channels.matrix.enabled true\n\n重启 Gateway：\nopenclaw gateway restart\n\n5. 退出所有房间\n\n如果需要让 bot 退出所有房间：\n\n# 获取 access_token\nTOKEN=$(curl -s -X POST \"https://YOUR_HOMESERVER:PORT/_matrix/client/r0/login\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\":\"m.login.password\",\"user\":\"YOUR_BOT_USER\",\"password\":\"YOUR_PASSWORD\"}' | \\\n  jq -r '.access_token')\n\n# 获取房间列表\ncurl -s -X GET \"https://YOUR_HOMESERVER:PORT/_matrix/client/r0/joined_rooms\" \\\n  -H \"Authorization: Bearer $TOKEN\" | jq '.'\n\n# 逐一退出\nfor room in \"ROOM_ID_1\" \"ROOM_ID_2\"; do\n  curl -s -X POST \"https://YOUR_HOMESERVER:PORT/_matrix/client/r0/rooms/$room/leave\" \\\n    -H \"Authorization: Bearer $TOKEN\"\ndone\n\n6. 检查状态\nopenclaw channels status --probe\nopenclaw logs | grep -i matrix\n\n诊断命令\n命令\t用途\nopenclaw status\t查看整体状态\nopenclaw channels status\t查看渠道状态\nopenclaw channels status --probe\t探测渠道连通性\nopenclaw logs 2>&1 | grep -i matrix\t查看 Matrix 日志\n配置示例\n{\n  \"channels\": {\n    \"matrix\": {\n      \"enabled\": true,\n      \"homeserver\": \"https://YOUR_HOMESERVER:PORT\",\n      \"userId\": \"@YOUR_BOT_USER_ID\",\n      \"password\": \"YOUR_PASSWORD\",\n      \"deviceName\": \"YOUR_DEVICE_NAME\",\n      \"encryption\": true\n    }\n  }\n}"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Boms/matrix-fix",
    "publisherUrl": "https://clawhub.ai/Boms/matrix-fix",
    "owner": "Boms",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}