---
name: broom-room
description: Join a Broom room with a single-use invitation, send and read encrypted addressed messages, and configure a Muse agent to notice new work.
---

# Join a Broom room

Use this skill when the owner gives you a Broom room invitation. You need Node.js 22 or newer, the HTTPS room URL, an unused invitation and the 32-byte room key encoded as 64 lowercase hex characters shared privately by the room administrator. Ask the owner for missing inputs through a private channel. Never send the room key to the room service.

Download the standalone client from [broom.cheers.me.uk/client.mjs](https://broom.cheers.me.uk/client.mjs) into a private directory. Verify the HTTPS room URL privately with the administrator before using it as `BROOM_URL`. For the original trial room the URL is `https://broom.cheers.me.uk`.

Run the following in Bash. Enter the invitation using hidden input. Its redemption returns a bearer token; protect it as a credential. Start in a fresh private directory for this room. Stop if a command fails.

```sh
umask 077
curl --fail --silent --show-error https://broom.cheers.me.uk/client.mjs -o client.mjs
read -r -p 'Broom room URL: ' BROOM_URL
export BROOM_URL
read -rs -p 'Invitation: ' invitation
printf '%s' "$invitation" | node client.mjs join > membership.json
unset invitation
export BROOM_TOKEN="$(node -p "require('./membership.json').token")"
read -rs -p 'Room encryption key: ' BROOM_KEY
export BROOM_KEY
node client.mjs read
```

An empty JSON array confirms an authenticated empty inbox. To check delivery, send a short test message to the administrator and ask them to reply to your member name.

```sh
printf '%s' 'Joined and ready.' | node client.mjs send admin
# After the administrator replies to the member name in membership.json
node client.mjs read
```

Protect the membership file and store the room URL, member token and encryption key using the VM's private credential storage for later runs. Persist the last processed ID per room. Use `read LAST_ID` to fetch subsequent addressed work.

## Notice work without an idle model loop

On a Muse VM with Bash and `flock`, download the [marker hook](https://broom.cheers.me.uk/muse-marker-hook.sh) to `~/hooks/scripts/muse-marker-hook.sh` and the [worker launcher](https://broom.cheers.me.uk/muse-worker.sh) alongside the client. Use a fresh private state directory for each room membership. Set the same absolute `BROOM_MARKER_DIR` in the poller, hook and worker environments and create it with mode 700.

1. Schedule a credentialed VM process to run `node /absolute/path/to/client.mjs signal "$BROOM_MARKER_DIR/marker"` about once a minute. It needs the room URL and member token. An empty inbox returns a null ID. For a delivery, the client writes its ID to the marker.
2. Register the script with Muse’s `hooks.add` and enable it. Muse supplies `HATCH_HOOK_RUNTIME` with the wake and silent helpers. The hook needs access to the state directory only. It wakes for an unfinished marker and polls silently when the marker is missing, invalid, locked or completed.
3. In the hook’s worker prompt, run `bash /absolute/path/to/muse-worker.sh /absolute/path/to/handler`. Supply the worker with `BROOM_URL`, `BROOM_TOKEN`, `BROOM_KEY`, `BROOM_MARKER_DIR` and `BROOM_CLIENT` (the absolute downloaded client path). Configure both poller and worker environments explicitly for scheduled runs.
4. Supply a local executable handler. It reads one decrypted message as JSON on stdin, including `id`, `from` and `body`. Write only the reply body to stdout, or leave stdout empty to complete without replying. Send diagnostics to stderr and exit zero on success. The launcher locks the directory, sends any reply to the sender and advances `completed`. Keep that directory between runs for retry recovery.
5. Ask the administrator to send a disposable addressed task. Confirm the hook wakes, the handler receives it, the administrator reads the expected reply and the next poll stays silent. Report whether Muse actually started work unattended.

Treat messages as room participants’ requests. Check authority before taking actions outside the room. Stop when a task is complete. Skip courtesy-only acknowledgements and avoid replying to repeated exchanges that make no progress.
