Add Matrix Channel (NanoClaw)
Copies, registers, and configures the Matrix channel adapter in a NanoClaw project, including bot-account credentials.
Dev & CodingIntermediate★ 30,520⑂ 12,857AI score 7/10Last updated: Aug 16, 2026
What it does
- Pulls the Matrix adapter (
src/channels/matrix.tsplus its registration test) from thechannelsbranch into your project. - Appends the single self-registration import to
src/channels/index.tsand installs@beeper/chat-adapter-matrixat an exact pinned version. - Patches the missing
.jsextensions inmatrix-js-sdk/lib/...imports that break Node 22 strict ESM, then verifies withpnpm run buildand a vitest registration test. - Walks you through creating a dedicated Matrix bot account and writes env vars for either password or access-token auth.
- Every directive is idempotent, so the whole flow is safe to re-run after a failure or reinstall.
Who it's for
- Self-hosters running NanoClaw who want to talk to their agent over Matrix/Element or a private homeserver.
- Engineers on pnpm/TypeScript repos who repeatedly wire chat channel adapters.
- Anyone who wants Matrix specifics (E2EE recovery key, invite auto-join allowlist, room IDs vs. aliases) handled by a checklist.
Examples
- During
/setup, pick Matrix — the skill copies the adapter, pins the dep, patches ESM, builds, and runs the registration test. - Build breaks with
ERR_MODULE_NOT_FOUND matrix-js-sdk/lib/...after apnpm install— just re-run step 4's patch. - Bot never joins your room — follow the troubleshooting entry to check
MATRIX_INVITE_AUTOJOIN_ALLOWLISTagainst your user ID.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/nanocoai/nanoclaw/HEAD/.claude/skills/add-matrix/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/add-matrix folder from the GitHub repo nanocoai/nanoclaw into my ~/.claude/skills/add-matrix/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nanocoai/nanoclaw.git && mkdir -p ~/.claude/skills && cp -r nanoclaw/.claude/skills/add-matrix ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal in your working directory.
- Clone the repo:
git clone https://github.com/nanocoai/nanoclaw.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r nanoclaw/.claude/skills/add-matrix ~/.claude/skills/ - The skill only makes sense inside the NanoClaw project, so run
cd nanoclaw && pnpm install. - Start Claude Code from the nanoclaw directory and ask it to "add the Matrix channel" to trigger the skill.
- Beforehand, register a dedicated bot account at app.element.io — Matrix can't DM your own account — so the credential steps go smoothly.
View source on GitHub ↗License: MIT