Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

Add Matrix Channel (add-matrix)

Wires a Matrix channel into a NanoClaw project: copies the adapter, registers it, pins the dependency, and configures bot credentials.

AutomationAdvanced30,47112,865AI score 7/10Last updated: Aug 9, 2026

What it does

Adds Matrix messaging support to the NanoClaw agent runtime. Channels don't ship in trunk, so the skill pulls the Matrix adapter from the channels branch and then:

  • Copies src/channels/matrix.ts plus its registration test
  • Appends the single self-registration import to src/channels/index.ts
  • Installs @beeper/chat-adapter-matrix at an exact pinned version (ranges and latest are rejected by policy)
  • Patches matrix-js-sdk ESM imports so they resolve under Node 22 strict ESM
  • Runs pnpm run build and the registration test to prove the wiring
  • Walks you through creating a dedicated bot account and storing MATRIX_* env vars

Every mechanical step is expressed as an idempotent nc: directive, so an agent or a parser can apply the same document and re-running is always safe.

Who it's for

  • NanoClaw users who want to talk to their agent over Matrix instead of Slack/Discord
  • Teams running their own homeserver (Synapse) or using matrix.org
  • Developers who like reproducible, single-document install procedures

Note: this is tightly coupled to the NanoClaw repo layout and won't transfer to other projects as-is.

Examples

  1. First-time setup — ask "use add-matrix to enable the Matrix channel"; the agent copies the adapter, installs the pinned dep, prompts for homeserver URL, bot user ID and display name, then writes .env.
  2. Recovering a broken build — after a pnpm install wipes the ESM patch and ERR_MODULE_NOT_FOUND: matrix-js-sdk/lib/... appears, just re-run step 4.
  3. Debugging auth — an M_FORBIDDEN login error is usually MATRIX_USERNAME (localpart) swapped with MATRIX_USER_ID (full ID); the troubleshooting section walks through it.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal and clone the repo: git clone https://github.com/nanocoai/nanoclaw.git
  2. Create the skills folder: mkdir -p ~/.claude/skills
  3. Copy the skill in: cp -r nanoclaw/.claude/skills/add-matrix ~/.claude/skills/
  4. Change into the project: cd nanoclaw (the skill only works inside this repository).
  5. Register a separate Matrix account for the bot at app.element.io (Matrix cannot DM your own account) and note its user ID, e.g. @andybot:matrix.org.
  6. Start Claude Code and say: "Use the add-matrix skill to add a Matrix channel."
  7. Answer the prompts (homeserver URL, bot user ID, display name, and either password or access token); they are written to .env.
  8. Confirm pnpm run build and pnpm exec vitest run src/channels/matrix-registration.test.ts pass, then run /manage-channels to attach the channel to an agent group.