OpenClaw Matrix Device Verification
Use this skill when the user wants to verify the currently active Matrix device for an OpenClaw-managed account.
Required Inputs
- -
homeserver: Matrix homeserver base URL. - INLINECODE1 : OpenClaw account id, full Matrix user id, or unique localpart.
- INLINECODE2 : the Matrix recovery key. Treat this as a secret.
- Optional: path to
openclaw.json when it is not in the default location.
Workflow
- 1. If any required input is missing, ask the user for it.
- Ensure dependencies are installed in this skill folder. If
{baseDir}/node_modules/matrix-js-sdk is missing, run npm install --prefix {baseDir}. - Run the verifier from this skill folder:
node {baseDir}/scripts/verify_matrix_device.mjs --homeserver "<homeserver>" --username "<username>"
- 4. If the user gave a non-default config path, append:
--openclaw-json "<path>"
- 5. Let the script prompt for the recovery key in the terminal. Do not pass the recovery key on the command line or in environment variables.
- Report whether the device was already cross-signed or was signed successfully.
Notes
- - The skill uses the existing OpenClaw access token from
openclaw.json; it does not create a helper Matrix device. - The verifier signs the active device directly and confirms the signature server-side.
- Use a real TTY so the hidden recovery-key prompt works correctly.
- For local testing outside OpenClaw,
--access-token bypasses openclaw.json and prompts for the Matrix user ID plus access token (--direct and -t are compatibility aliases). - If the access token is missing,
--password (or -p) can log in with the Matrix password and sign a specific target device_id, then log out the temporary helper session.
OpenClaw Matrix 设备验证
当用户想要验证 OpenClaw 管理账户当前活跃的 Matrix 设备时,使用此技能。
必需输入
- - homeserver:Matrix 主服务器基础 URL。
- username:OpenClaw 账户 ID、完整 Matrix 用户 ID 或唯一本地部分。
- recovery key:Matrix 恢复密钥。请将其视为机密信息。
- 可选:当 openclaw.json 不在默认位置时,提供其路径。
工作流程
- 1. 如果缺少任何必需输入,向用户询问。
- 确保此技能文件夹中已安装依赖项。如果缺少 {baseDir}/node_modules/matrix-js-sdk,运行 npm install --prefix {baseDir}。
- 从此技能文件夹运行验证程序:
node {baseDir}/scripts/verify
matrixdevice.mjs --homeserver
--username
- 4. 如果用户提供了非默认配置路径,附加:
--openclaw-json
- 5. 让脚本在终端中提示输入恢复密钥。不要在命令行或环境变量中传递恢复密钥。
- 报告设备是否已经完成交叉签名或已成功签名。
注意事项
- - 该技能使用 openclaw.json 中现有的 OpenClaw 访问令牌;不会创建辅助 Matrix 设备。
- 验证程序直接签名活跃设备,并在服务器端确认签名。
- 使用真实 TTY,以便隐藏的恢复密钥提示能正常工作。
- 在 OpenClaw 外部进行本地测试时,--access-token 会绕过 openclaw.json,并提示输入 Matrix 用户 ID 和访问令牌(--direct 和 -t 是兼容别名)。
- 如果缺少访问令牌,--password(或 -p)可以使用 Matrix 密码登录并签名特定的目标 device_id,然后注销临时辅助会话。