Add Deltachat 标志

Add Deltachat

组织热门
nanocoai
add-deltachat

Add DeltaChat channel integration via @deltachat/stdio-rpc-server. Native adapter — no Chat SDK bridge. Email-based messaging with end-to-end encryption.

Add to TypingMind

概览

发布者nanocoai
代码仓库nanoclaw
技能名称add-deltachat
星标数
30.9K
复刻数
12.8K
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 nanocoai 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Add Deltachat AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/nanocoai/nanoclaw/tree/main/.claude/skills/add-deltachat
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw
mkdir -p .claude/skills
cp -r /tmp/nanoclaw/.claude/skills/add-deltachat .claude/skills/add-deltachat
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Add Deltachat,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Add Deltachat。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Add Deltachat 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 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
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
import './deltachat.js';

3. Install the adapter package (pinned)

nc
@deltachat/stdio-rpc-server@2.49.0

4. Build and validate

nc
pnpm run build
nc
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:

VariableDefaultDescription
DC_ACCOUNT_DIRdc-accountDirectory for DeltaChat account data (IMAP state, keys, blobs)
DC_DISPLAY_NAMENanoClawBot 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 service must be running (ncl connects to it over a Unix socket):

bash
# Engage mode/pattern default to the DeltaChat adapter's declared channel
# defaults — for DeltaChat groups that's a name pattern (the platform has no
# mention metadata), so the agent responds when addressed by name.
ncl wirings create --messaging-group-id <mg-id> --agent-group-id <ag-id>

Next Steps

If you're in the middle of /setup, return to the setup flow now.

Otherwise, run /init-first-agent to create an agent and wire it to your DeltaChat DM (see Wiring above), or /manage-channels to wire this channel to an existing agent group.

Channel Info

  • type: deltachat
  • terminology: DeltaChat calls them "chats" (1:1 DMs) and "groups"
  • supports-threads: no — DeltaChat has no thread model
  • platform-id-format: numeric chat ID as a string (e.g. "12") — the DeltaChat core's internal chat identifier
  • user-id-format: deltachat:{email} — the contact's email address
  • how-to-find-id: Send a message from DeltaChat to the bot email, then query messaging_groups as shown above
  • typical-use: Personal assistant over DeltaChat DMs; small groups where participants use DeltaChat
  • default-isolation: One agent per bot identity. Multiple chats with the same operator can share an agent group; groups with other people should typically get their own agent group (the default shared session mode already gives each messaging group its own session)

Features

  • File attachments — inbound and outbound; inbound waits up to 30 seconds for large-message download to complete
  • Invite link logged on every startup — URL + QR SVG written to dc-account/invite-qr.svg; see Wiring for the bootstrap flow
  • /set-avatar — send an image with this caption to change the bot's DeltaChat avatar (admin/owner only)
  • Connectivity watchdog — restarts IO if IMAP goes quiet for 20 minutes or connectivity drops below threshold for two consecutive 5-minute checks
  • Network nudge — maybeNetwork() called every 10 minutes to recover from prolonged idle

Not supported: DeltaChat reactions, message editing/deletion, read receipts.

Connectivity model

isConnected() returns true when the internal connectivity value is ≥ 3000:

RangeMeaning
1000–1999Not connected
2000–2999Connecting
3000–3999Working (IMAP fetching)
≥ 4000Fully connected (IMAP IDLE)

Troubleshooting

Adapter not starting — credentials missing

bash
grep "Channel credentials missing" logs/nanoclaw.log | grep deltachat

All six required vars (DC_EMAIL, DC_PASSWORD, DC_IMAP_HOST, DC_IMAP_PORT, DC_SMTP_HOST, DC_SMTP_PORT) must be present in .env.

Account configure fails

bash
grep "DeltaChat" logs/nanoclaw.log | tail -20

Common causes:

  • Wrong IMAP/SMTP hostnames — double-check provider docs
  • App password not generated — Gmail and some others require this when 2FA is enabled
  • Port/security mismatch — defaults are port 993 + SSL/TLS for IMAP and port 587 + STARTTLS for SMTP; override with DC_IMAP_PORT/DC_IMAP_SECURITY or DC_SMTP_PORT/DC_SMTP_SECURITY in .env

Provider uses SMTP port 465 (SSL/TLS) instead of 587

Set DC_SMTP_SECURITY=1 and DC_SMTP_PORT=465 in .env, then restart.

Messages not arriving

  1. Check the service is running and the adapter started: grep "Channel adapter started.*deltachat" logs/nanoclaw.log
  2. Check connectivity: grep "DeltaChat: IO started" logs/nanoclaw.log
  3. Check the sender has been granted access — run /init-first-agent to create their user record and wire the chat
  4. Verify the messaging group is wired: pnpm exec tsx scripts/q.ts data/v2.db "SELECT mg.platform_id, mga.agent_group_id FROM messaging_groups mg JOIN messaging_group_agents mga ON mg.id = mga.messaging_group_id WHERE mg.channel_type='deltachat'"

Stale lock file after crash

bash
rm -f dc-account/accounts.lock
systemctl --user restart "$(. setup/lib/install-slug.sh && systemd_unit)"

Bot not responding after restart

The account is already configured — IO restarts automatically on service start. If the RPC subprocess is stuck, restart the service. Check for errors:

bash
grep "DeltaChat" logs/nanoclaw.error.log | tail -20

Messages received but agent not responding

The messaging group exists but may not be wired to an agent group. Run:

bash
pnpm exec tsx scripts/q.ts data/v2.db "SELECT id, platform_id, name FROM messaging_groups WHERE channel_type='deltachat'"

If the group has no entry in messaging_group_agents, wire it with /manage-channels.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Add Deltachat AI 技能有什么作用?

Add DeltaChat channel integration via @deltachat/stdio-rpc-server. Native adapter — no Chat SDK bridge. Email-based messaging with end-to-end encryption.

为什么在 TypingMind 中使用 Add Deltachat?

因为您只需安装一次,就能搭配任何模型使用。Add Deltachat 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Add Deltachat?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/nanocoai/nanoclaw/tree/main/.claude/skills/add-deltachat。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Add Deltachat?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Add Deltachat 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Add Deltachat 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Add Deltachat AI 技能免费吗?

是的。nanocoai 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇