
Add Matrix
Add Matrix channel integration via Chat SDK.
Install
npx skills add nanocoai/nanoclaw --skill add-matrix -g -a claude-code -y- Repository
- nanocoai/nanoclaw31.1k
- Category
- Engineering
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 2,107 tokens
- Runs scripts
- No, instructions only
What it does
Add Matrix channel integration via Chat SDK. Works with any Matrix homeserver.
Add Matrix Channel
Adds Matrix support via the Chat SDK bridge. NanoClaw doesn't ship channels in
trunk, this skill copies the Matrix adapter in from the channels branch.
The mechanical steps under Apply carry nc: directive fences: an agent
reads the prose and applies them, and a parser can apply them deterministically
from the same document. Every directive is idempotent, so the whole skill is
safe to re-run; anything a parser can't apply falls back to the prose beside it.
Apply
1. Copy the adapter
Fetch the channels branch and copy the Matrix adapter into src/channels/
(overwrite, the branch is canonical):
src/channels/matrix.ts
src/channels/matrix-registration.test.ts
2. Register the adapter
Append the self-registration import to the channel barrel (skipped if the line is already present). This one line is the skill's only reach-in into core:
import './matrix.js';
3. Configure the ESM patch
The published adapter references matrix-js-sdk/lib/... without .js
extensions, which fails under Node 22 strict ESM resolution. Register the
committed pnpm patch before installing the package. pnpm reapplies it after
every install and fails if the pinned package drifts away from the patch:
patches/@beeper__chat-adapter-matrix@0.2.0.patch
pnpm pkg set 'pnpm.patchedDependencies[@beeper/chat-adapter-matrix@0.2.0]=patches/@beeper__chat-adapter-matrix@0.2.0.patch'
4. Install the adapter package
Pinned to an exact version, the supply-chain policy rejects ranges and latest.
The Matrix adapter lives in the @beeper/ namespace and versions on its own
track (not the @chat-adapter/* family), so it carries its own pin:
@beeper/chat-adapter-matrix@0.2.0
