Skip to main content
ClaudeWave
EN, English
Skill31k repo starsupdated 6d ago

add-deltachat

The add-deltachat skill installs a native DeltaChat channel adapter that communicates directly with the @deltachat/stdio-rpc-server JSON-RPC subprocess to enable email-based messaging with Autocrypt/OpenPGP encryption. Use this when integrating Claude with DeltaChat for secure, decentralized email communication without relying on the Chat SDK bridge. Installation requires copying adapter files, appending an import to the channels barrel, pinning the @deltachat/stdio-rpc-server dependency, and validating with build and integration tests before configuring account credentials.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/nanocoai/nanoclaw /tmp/add-deltachat && cp -r /tmp/add-deltachat/.claude/skills/add-deltachat ~/.claude/skills/add-deltachat
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Add DeltaChat Channel

The adapter drives the `@deltachat/stdio-rpc-server` JSON-RPC subprocess directly — pure Node.js against the DeltaChat core library. Messages are delivered over email with Autocrypt/OpenPGP encryption.

## Install

### 1. Copy the adapter and its registration test

Fetch the `channels` branch from the configured remote that carries it, then
overwrite the skill-owned files with the canonical registry copies:

```nc:copy from-branch:channels
src/channels/deltachat.ts
src/channels/deltachat-registration.test.ts
```

### 2. Append the self-registration import

Append to `src/channels/index.ts` (skip if already present):

```nc:append to:src/channels/index.ts
import './deltachat.js';
```

### 3. Install the adapter package (pinned)

```nc:dep
@deltachat/stdio-rpc-server@2.49.0
```

### 4. Build and validate

```nc:run effect:build
pnpm run build
```
```nc:run effect:test
pnpm exec vitest run src/channels/deltachat-registration.test.ts
```

Both must be clean before proceeding. `deltachat-registration.test.ts` is the one integration test: it imports the real channel barrel and asserts the registry contains `deltachat`. It goes red if the `import './deltachat.js';` line is deleted or drifts, if the barrel fails to evaluate (so the channel genuinely would not register), or if `@deltachat/stdio-rpc-server` isn't installed (the import throws) — so it also implicitly verifies the dependency from step 4. Importing is safe: deltachat instantiates the rpc client only in `setup()` (at host startup), never at import.

End-to-end message delivery against a real email account is verified manually once the service is running — see Wiring and Troubleshooting.

## Account Setup

A dedicated email account is strongly recommended — it will accumulate DeltaChat-formatted messages and store encryption keys. Not all providers work well with DeltaChat; check https://providers.delta.chat/ before picking one.

**Default security modes:** IMAP uses SSL/TLS (port 993), SMTP uses STARTTLS (port 587). Both are configurable via `.env` — see Credentials below.

To find the correct hostnames for a domain:

```bash
node -e "require('dns').resolveMx('example.com', (e,r) => console.log(r))"
```

Most providers publish their IMAP/SMTP hostnames in their help docs under "manual setup" or "IMAP access."

## Credentials

Add to `.env`:

```bash
DC_EMAIL=bot@example.com
DC_PASSWORD=your-app-password
DC_IMAP_HOST=imap.example.com
DC_IMAP_PORT=993
DC_IMAP_SECURITY=1        # 1=SSL/TLS (default), 2=STARTTLS, 3=plain
DC_SMTP_HOST=smtp.example.com
DC_SMTP_PORT=587
DC_SMTP_SECURITY=2        # 2=STARTTLS (default), 1=SSL/TLS, 3=plain
```

Security settings are applied on every startup, so changing them in `.env` and restarting takes effect without wiping the account.


### Optional settings

The following are read from the process environment (not `.env`). To override them, add `Environment=` lines to the systemd service unit or your launchd plist:

| Variable | Default | Description |
|----------|---------|-------------|
| `DC_ACCOUNT_DIR` | `dc-account` | Directory for DeltaChat account data (IMAP state, keys, blobs) |
| `DC_DISPLAY_NAME` | `NanoClaw` | Bot display name shown in DeltaChat |
| `DC_AVATAR_PATH` | _(none)_ | Absolute path to avatar image; set at startup only |

The `/set-avatar` command (send an image with that caption) is the easiest way to set the avatar at runtime without modifying the service file. Only users with `owner` or global `admin` role can use it.

### Restart

Run from your NanoClaw project root:

```bash
source setup/lib/install-slug.sh

# Linux
systemctl --user restart $(systemd_unit)

# macOS
launchctl kickstart -k gui/$(id -u)/$(launchd_label)
```

On first start the adapter configures the email account (IMAP/SMTP credentials, calls `configure()`). Subsequent starts skip straight to `startIo()`. Account data is stored in `dc-account/` in the project root (or your `DC_ACCOUNT_DIR`).

## Wiring

### DMs

**DeltaChat contacts cannot be added by email alone** — to start a chat, the user must open the bot's invite link in their DeltaChat app or scan its QR code. This triggers the SecureJoin handshake.

#### Step 1 — Get the invite link

After the service starts, the adapter logs the invite URL and writes a QR SVG:

```bash
grep "invite link" logs/nanoclaw.log | tail -1
# url field contains the https://i.delta.chat/... invite link
# also written to dc-account/invite-qr.svg (or $DC_ACCOUNT_DIR/invite-qr.svg)
```

The invite URL is stable (tied to the bot's email and encryption keys) so it stays valid across restarts.

#### Step 2 — Add the bot in DeltaChat

Two options for the user to connect:

- **Link**: Copy the `https://i.delta.chat/...` URL and open it on the device running DeltaChat. The app recognises it and shows a "Start chat" prompt.
- **QR code**: Open `dc-account/invite-qr.svg` in a browser or image viewer, display it on screen, and scan it from the DeltaChat app using the QR-scan button on the new-chat screen.

After accepting, DeltaChat exchanges keys and creates the chat automatically.

#### Step 3 — Wire the chat to an agent

Once the first message arrives the router auto-creates a `messaging_groups` row. Look up the chat ID:

```bash
pnpm exec tsx scripts/q.ts data/v2.db \
  "SELECT platform_id, name FROM messaging_groups WHERE channel_type='deltachat' AND is_group=0 ORDER BY created_at DESC LIMIT 5"
```

Then run `/init-first-agent` — it creates the agent group, grants the user owner access, and wires the messaging group in one step:

```bash
pnpm exec tsx scripts/init-first-agent.ts \
  --channel deltachat \
  --user-id deltachat:user@example.com \
  --platform-id <platform_id from above> \
  --display-name "Your Name"
```

### Groups

Add the bot email to a DeltaChat group. When any member sends a message, the router creates a `messaging_groups` row with `is_group = 1`. Run `/manage-channels` to wire it to an agent group, or wire it directly with `ncl` — **the host
add-anydocSkill

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.

add-atomic-chat-toolSkill

Add Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its OpenAI-compatible API.

add-clidashSkill

Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.

add-codexSkill

Use Codex (OpenAI's codex app-server) as a full agent provider — planning, tool orchestration, MCP tools, server-side history, session resume — alongside or instead of Claude. ChatGPT subscription or OpenAI API key, vault-only via OneCLI. Per-group via `ncl groups config update --provider codex`. Distinct from using OpenAI as an MCP tool (where Claude remains the planner).

add-dashboardSkill

Add a monitoring dashboard to NanoClaw. Installs @nanoco/nanoclaw-dashboard and a pusher that sends periodic JSON snapshots.

add-dialSkill

Add Dial channel integration — a real phone number for SMS and AI voice calls via the Dial platform (getdial.ai). Native adapter — no Chat SDK bridge.

add-dial-numberSkill

Add another phone number to an existing Dial channel — a second (or third) public line for the agent, so one NanoClaw install answers SMS and AI voice calls on multiple numbers. Use when Dial is already installed and the operator wants an additional number (e.g. a personal line plus a support line). Requires the Dial channel to already be installed (see /add-dial).

add-dial-toolSkill

Give chosen NanoClaw agents a real phone number as a container tool — the `dial` CLI baked into the agent image plus OneCLI credential injection for api.getdial.ai, scoped per agent, so the agents you pick can send SMS, place AI voice calls, and receive verification codes from inside the sandbox. Independent of the Dial channel; idempotent; re-run to change which agents may use it. Use when the user wants agents to text, call, or run `dial …` from a chat, without wiring Dial as a messaging channel.