# Using Element with Claude

Claude, our AI assistant, can read and post in our Element (Matrix) rooms at `matrix.nearlyfreeenergy.com` **as you**. It does this through the **"nfe-element"** skill. This page covers the one-time setup, including the device-verification step that trips people up, and how to use it well.

## What Claude can do in Element

- **Catch you up.** *"What's new in the product room?"* or *"Did anyone answer my question in the business thread?"* Claude reads whole threads, not just the main timeline, because replies in threads don't show there.
- **Answer in the right place.** Claude replies inside the thread, to the exact message being answered.
- **Tag people properly.** When a post asks someone to do something, Claude mentions them with a real Matrix mention, the pill Element shows, so they get notified. Their name in plain text doesn't notify them. Ask *"tag Hillary in it"*.
- **Preview before sending.** Claude can do a dry run that shows exactly what would be posted, mentions included, without sending anything.
- **Start a topic the NFE way.** A short heading post, with the body as the first reply in its thread.
- **Fix mistakes.** It edits your message instead of posting a correction.
- **Share files** into the relevant thread.

Everything is posted under your name, and Claude only sees the rooms you're in. **Claude shows you the exact text and waits for your yes before posting.**

## One-time setup

The skill is already set up for everyone in our Claude organisation, so there's nothing to install. You need to do three things once on each computer: install the Matrix library, log in, and verify the new session.

### 1. Install the Matrix library

Ask Claude to *"set up the nfe-element skill"*. It installs the Matrix library into its own private Python environment at `~/.config/nfe-element/venv`.

- On a Mac, `pip install --user` and `brew install libolm` **no longer work**. Homebrew's Python refuses `--user` installs, and Homebrew has dropped libolm. You don't need either: current versions of the Matrix library (`matrix-nio` 0.26+) handle encryption with `vodozemac`, which installs as a ready-made package.
- If you're doing it by hand:
  ```
  python3 -m venv ~/.config/nfe-element/venv
  ~/.config/nfe-element/venv/bin/pip install 'matrix-nio[e2e]'
  ```

### 2. Log in

Claude gives you a `login` command to run in a terminal. Press Enter to accept the NFE homeserver, then enter your Matrix ID (`@first.last:matrix.nearlyfreeenergy.com`) and your password. **Type the password yourself in the terminal, never in the chat.** Only a login token is kept, in `~/.config/nfe-element/credentials.json`, readable by you alone.

Posting in rooms works as soon as you've logged in.

### 3. Verify the new session (needed to read encrypted rooms)

Most of our rooms, including **product**, **general** and **learning**, are encrypted. Until you verify Claude's session, it cannot read new messages there; they show as `[undecryptable …]`.

**Don't use emoji verification. It doesn't work with this skill.** Tapping *Verify by emoji* on the phone (or in Element Desktop) never completes: Claude's session cannot respond to it, and Element quietly gives up. Use manual verification instead:

1. Ask Claude to run the nfe-element **whoami** command. It prints a line like:
   `/verify ABCDEFGHIJ abc123…fingerprint…xyz`
2. Open **Element Desktop or app.element.io**. **Not the phone app**, which doesn't support this command.
3. Paste that line into the message box of **any room** and press Enter. It's a command, so nobody else sees it.
4. Element confirms the session is verified. Under **Settings → Sessions**, `claude-nfe-element` now shows a green shield.

The fingerprint isn't secret. It's the public key of Claude's session on your computer.

## What to expect

- **Older messages stay locked.** Encrypted messages sent before you logged Claude in can't be read by it, even after verifying. Everything from then on can.
- **Plain rooms** (for example **business**) can be read straight after logging in.
- **Files you send** through Claude are stored on the server unencrypted, even in encrypted rooms. Don't send anything that must stay encrypted.
- **Each computer is its own session.** Logging in again, or on another machine, creates a new `claude-nfe-element` session that needs verifying again. Remove old ones under Settings → Sessions.

## Keeping your account safe

- Never paste your Matrix password into a chat, a Library page or a room. It only goes into the terminal prompt.
- Don't share `~/.config/nfe-element/`. It holds your login token and the session's encryption keys.
- To cut Claude off, sign out the `claude-nfe-element` session in Element under Settings → Sessions.

## Troubleshooting

| What you see | What to do |
| --- | --- |
| `matrix-nio is missing` | The library isn't installed for the Python running the script. Ask Claude to use `~/.config/nfe-element/venv/bin/python`. |
| `externally-managed-environment` from pip | Homebrew Python blocks `pip --user`. Install into the venv (step 1). |
| `No available formula with the name "libolm"` | Expected. libolm isn't needed any more (step 1). |
| *Verify by emoji* closes or never shows emoji | Expected. Use manual `/verify` from Element Desktop or the web (step 3). |
| `/verify` isn't recognised | You're on the phone app. Use Element Desktop or app.element.io. |
| Encrypted messages show `[undecryptable …]` | Either the session isn't verified yet (step 3), or the message is older than your login. |
| "Not logged in on this machine" | Run the `login` step (step 2). |
| Someone wasn't notified when Claude named them | Their name went out as plain text. Ask Claude to tag them; from version 0.1.3 the skill sends a real mention. |
| Claude has two skills called nfe-element | You have a personal copy as well as the organisation's. Remove your personal copy in Claude's skills settings, so the organisation version is the only one. |

## For admins

- **Skill:** "nfe-element", set up for everyone in Claude under **Organization settings → Plugins & skills**. Updates are made by uploading a new version there, then choosing **Make this the current version** in its version history (uploading alone doesn't reach members). Version 0.1.1 added the `whoami` command used in step 3; 0.1.2 adds the macOS venv install and the `/verify` steps to the skill's own setup. 0.1.3 adds real mentions (`--mention`), `--dry-run`, and `members ROOM` to list a room's members and their Matrix IDs.
- **Homeserver:** https://matrix.nearlyfreeenergy.com
- **Why not emoji verification?** The Matrix library the skill uses (`matrix-nio`) can't complete Element's current emoji flow. Manual `/verify` cross-signs the session from a client that holds your cross-signing keys.

*Last reviewed: 22 October 2026 by Aaron Tushabe (macOS setup, manual verification, mentions in 0.1.3)*