Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计提醒

matrix-server-management矩阵服务器管理

Agent Skill

matrix-server-management 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,292

周安装

212

GitHub Stars

公开资料未说明

下载量

1,713
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install matrix-server-management

简介

Tuwunel Matrix Homeserver 用户与房间管理系统。

  • 支持注册、创建、成员管理与媒体文件上传操作。
  • 仅限显式独立服务器环境使用,不可用于公共实例。
  • 安装命令:openclaw skills install matrix-server-management。
  • 需具备服务器管理员权限方可执行相关指令。

SKILL.md

name
matrix-server-management
description
Manage the Tuwunel Matrix Homeserver (register users, create rooms, manage room membership, upload files to media server). Use only for explicit standalone admin requests — Worker and project creation handle Matrix operations internally via their own scripts. Also use this skill whenever you need to send a file to the admin (upload via media API, then send as m.file message).

Matrix Server Management

Overview

This skill allows you to manage the Tuwunel Matrix Homeserver. Tuwunel is a conduwuit fork running at http://127.0.0.1:6167. Access the server directly (not through the Higress gateway).

Environment Variables

These environment variables are pre-configured in the Manager container:

# Core configuration (set by hiclaw-install.sh)
HICLAW_MATRIX_DOMAIN       # Matrix server domain (e.g., matrix-local.hiclaw.io:8080)
HICLAW_ADMIN_USER          # Admin username
HICLAW_REGISTRATION_TOKEN  # Token for registering new Matrix users
HICLAW_MANAGER_PASSWORD    # Manager's Matrix password (for login)

No need to set defaults - these are always available in the container environment.

User Registration

Tuwunel uses single-step registration with a registration token (no UIAA flow).

Register a New User

curl -X POST http://127.0.0.1:6167/_matrix/client/v3/register \
  -H 'Content-Type: application/json' \
  -d '{
    "username": "<USERNAME>",
    "password": "<PASSWORD>",
    "auth": {
      "type": "m.login.registration_token",
      "token": "'"${HICLAW_REGISTRATION_TOKEN}"'"
    }
  }'

Response includes user_id and access_token.

Login (Get Access Token)

curl -X POST http://127.0.0.1:6167/_matrix/client/v3/login \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "m.login.password",
    "identifier": {"type": "m.id.user", "user": "<USERNAME>"},
    "password": "<PASSWORD>"
  }'

Response: {"access_token": "...", "user_id": "@<USERNAME>:<DOMAIN>", ...}

Room Management

Create a Room (3-party: Human + Manager + Worker)

When creating a Worker, always create a Room with the human admin, Manager, and Worker. Use trusted_private_chat preset so all invited members are auto-joined (no invite acceptance needed), and override power levels so Admin + Manager get 100 (admin) while Workers get 0 (regular user):

MANAGER_TOKEN="<manager_access_token>"
curl -X POST http://127.0.0.1:6167/_matrix/client/v3/createRoom \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Worker: <WORKER_NAME>",
    "topic": "Communication channel for <WORKER_NAME>",
    "invite": [
      "@'"${HICLAW_ADMIN_USER}"':'"${HICLAW_MATRIX_DOMAIN}"'",
      "@<WORKER_NAME>:'"${HICLAW_MATRIX_DOMAIN}"'"
    ],
    "preset": "trusted_private_chat",
    "power_level_content_override": {
      "users": {
        "@manager:'"${HICLAW_MATRIX_DOMAIN}"'": 100,
        "@'"${HICLAW_ADMIN_USER}"':'"${HICLAW_MATRIX_DOMAIN}"'": 100,
        "@<WORKER_NAME>:'"${HICLAW_MATRIX_DOMAIN}"'": 0
      }
    }
  }'

Response: {"room_id": "!<id>:<DOMAIN>"}

Power levels: trusted_private_chat auto-joins all invited members (no invite acceptance needed). power_level_content_override ensures Admin (100) and Manager (100) have admin rights while Workers are explicitly set to 0 (regular user).

Send a Message in a Room

Simple message (no mention):

curl -X PUT "http://127.0.0.1:6167/_matrix/client/v3/rooms/<ROOM_ID>/send/m.room.message/$(date +%s)" \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{
    "msgtype": "m.text",
    "body": "Hello, this is a general announcement..."
  }'

Send a Message with @Mention (Critical for Workers)

IMPORTANT: When sending messages to Workers in group rooms, you MUST include the m.mentions field for them to receive the message. Workers have requireMention: true enabled, meaning they only process messages that properly @mention them.

# Mention a single user
curl -X PUT "http://127.0.0.1:6167/_matrix/client/v3/rooms/<ROOM_ID>/send/m.room.message/$(date +%s)" \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{
    "msgtype": "m.text",
    "body": "@<WORKER_NAME>:'"${HICLAW_MATRIX_DOMAIN}"' Your task assignment: ...",
    "m.mentions": {
      "user_ids": ["@<WORKER_NAME>:'"${HICLAW_MATRIX_DOMAIN}"'"]
    }
  }'
# Mention multiple users
curl -X PUT "http://127.0.0.1:6167/_matrix/client/v3/rooms/<ROOM_ID>/send/m.room.message/$(date +%s)" \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{
    "msgtype": "m.text",
    "body": "@alice:'"${HICLAW_MATRIX_DOMAIN}"' and @bob:'"${HICLAW_MATRIX_DOMAIN}"' please coordinate on this task...",
    "m.mentions": {
      "user_ids": [
        "@alice:'"${HICLAW_MATRIX_DOMAIN}"'",
        "@bob:'"${HICLAW_MATRIX_DOMAIN}"'"
      ]
    }
  }'

Rules for @mentions:

  • The user_ids array in m.mentions MUST contain the full Matrix user ID (e.g., @alice:matrix-local.hiclaw.io:8080)
  • The user ID in the body text and in m.mentions.user_ids must match exactly
  • Without m.mentions, Workers will receive the message but will NOT process it (it will be ignored)
  • This follows Matrix MSC3952 (Intentional Mentions) specification

Upload a File (Media Upload)

Use this to send files to the admin — task output artifacts, generated reports, config exports, log files, etc.

curl -X POST "http://127.0.0.1:6167/_matrix/media/v3/upload?filename=<FILENAME>" \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @/path/to/file

Response: {"content_uri": "mxc://<SERVER>/<MEDIA_ID>"}

After uploading, send the mxc:// URI to the admin as a Matrix message using the m.file (or m.image / m.text) msgtype:

curl -X PUT "http://127.0.0.1:6167/_matrix/client/v3/rooms/<ROOM_ID>/send/m.room.message/$(date +%s)" \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{
    "msgtype": "m.file",
    "body": "<FILENAME>",
    "url": "mxc://<SERVER>/<MEDIA_ID>"
  }'

Then reply in the conversation with:

MEDIA: mxc://<SERVER>/<MEDIA_ID>

Notes:

  • Use Content-Type: text/plain for plain text files, application/octet-stream as a safe fallback for any binary
  • The mxc:// URI is permanent and accessible to all room members via the Matrix client (Element Web)

List Joined Rooms

curl -s http://127.0.0.1:6167/_matrix/client/v3/joined_rooms \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" | jq

Get Room Messages

curl -s "http://127.0.0.1:6167/_matrix/client/v3/rooms/<ROOM_ID>/messages?dir=b&limit=20" \
  -H "Authorization: Bearer ${MANAGER_TOKEN}" | jq

Important Notes

  • Environment prefix: Tuwunel uses CONDUWUIT_ environment variable prefix (NOT TUWUNEL_)
  • Server name: Set in CONDUWUIT_SERVER_NAME, usually ${HICLAW_MATRIX_DOMAIN}
  • User ID format: @<username>:${HICLAW_MATRIX_DOMAIN}
  • Registration token: Stored in HICLAW_REGISTRATION_TOKEN env var
  • Direct access: Use http://127.0.0.1:6167 for server management (not through Higress Gateway port 8080)

<!-- hiclaw-builtin-end -->

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.62%
按下载量换算1,689

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills