一键导入
configure
Configure Matrix channel credentials (homeserver URL, access token, bot user ID). Use when the user wants to set up or update their Matrix connection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure Matrix channel credentials (homeserver URL, access token, bot user ID). Use when the user wants to set up or update their Matrix connection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | configure |
| description | Configure Matrix channel credentials (homeserver URL, access token, bot user ID). Use when the user wants to set up or update their Matrix connection. |
Set up the Matrix bot credentials for the channel plugin.
The user provides: /matrix:configure <homeserver_url> <access_token>
Parse the arguments from "$ARGUMENTS". Extract the homeserver URL (first argument) and access token (second argument).
If arguments are missing, ask the user to provide them:
homeserver_url: The Matrix homeserver URL (e.g., https://matrix.example.com)access_token: A Matrix access token for the bot accountThe homeserver URL MUST include the protocol scheme (https:// or http://). If the user provides a URL without a scheme (e.g., matrix.example.com), automatically prepend https://. Always strip any trailing slashes.
Create the directory ~/.claude/channels/matrix/ if it doesn't exist:
mkdir -p ~/.claude/channels/matrix
Validate the homeserver URL has a protocol scheme. If it does not start with https:// or http://, prepend https://.
Ask the user for their bot's Matrix user ID (e.g., @claude-bot:example.com)
Write the .env file at ~/.claude/channels/matrix/.env:
MATRIX_HOMESERVER_URL=<homeserver_url>
MATRIX_ACCESS_TOKEN=<access_token>
MATRIX_BOT_USER_ID=<bot_user_id>
Confirm the configuration was saved.
Remind the user to set up their allowlist with /matrix:access add <user_id> if they haven't already.
To restrict a Claude Code project to specific Matrix rooms, set MATRIX_ROOM_IDS in the project's .claude/settings.local.json or in the .env file:
MATRIX_ROOM_IDS=!roomA:example.com,!roomB:example.com