Telegram Setup 标志

Telegram Setup

组织热门
vellum-ai
telegram-setup

将 Telegram 机器人连接到 Vellum Assistant 网关,并自动注册 Webhook 和存储凭据。

Add to TypingMind

概览

发布者vellum-ai
代码仓库vellum-assistant
技能名称telegram-setup
星标数
1.4K
复刻数
208
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

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

  • 兼容任何大语言模型

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

  • 1 个附带文件

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

  • 开源

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

安装

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

1

安装到 TypingMind

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

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

安装到其他智能体

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vellum-ai/vellum-assistant.git /tmp/vellum-assistant
mkdir -p .claude/skills
cp -r /tmp/vellum-assistant/skills/telegram-setup .claude/skills/telegram-setup
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

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

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

兼容任何 AI 模型

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

  • 仅在需要时加载

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

  • 在聊天中切换模型

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

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

You are helping your user connect a Telegram bot. The wizard collects the token, the rest of setup runs automatically, and you confirm it worked.

DO NOT use this skill for runtime Telegram operations (sending, replying, reading). That is the separate messaging skill.

Supported chats

Telegram works in private chats and in groups and supergroups. In a private chat the assistant answers every message. In a group it answers only a message that addresses it: an @mention of the bot's username, a command such as /summary@botname, or a reply to one of its posts. Every other group message is dropped on purpose and never reaches the assistant; the gateway log records each drop with the reason bot_not_mentioned. Broadcast channels are not supported.

Telegram's privacy mode (on by default) already delivers only mentions, replies, and commands to a bot. The assistant applies the same rule itself, so promoting the bot to admin or turning privacy mode off does not make it answer unaddressed messages.

Tell the user this during setup and in the Step 5 summary. When a group message got no reply, first check that it mentioned the bot or replied to it, before diagnosing webhook or credential failures. Forum topics work: a reply lands in the topic the message was in.

What happens without you

Saving the token in the wizard triggers all of this:

StepRuns
Validate the token against getMeAutomatically, on save
Store telegram.botId and telegram.botUsernameAutomatically, on save
Generate the webhook secretAutomatically, on save
Register the platform callback routeAutomatically, on save
Tell Telegram where to send updates (setWebhook)Automatically, after the save
Install the bot commands (setMyCommands)Automatically, after the save

⚠️ CRITICAL: Never run setWebhook, setMyCommands, or assistant webhooks register yourself, and never generate the webhook secret. reconcileTelegramWebhook is idempotent and already runs on the credential change the save produces. Doing it by hand races it, which is how a webhook ends up pointing somewhere stale.

Your job is Steps 1 to 5 below: open the wizard, confirm delivery, link the user's identity.

Step 1: Check existing configuration

⚠️ CRITICAL: If you got here from a wizard-closed notification, or the user just said they finished setup, go straight to Step 3. A successful save leaves both credentials in place, so this step would find them and read it as "already configured" at exactly the moment that means the opposite. Stopping there skips the delivery check and the identity verification, which is the failure this flow exists to prevent.

Otherwise, run assistant credentials list --search telegram (via the bash tool). Note whether bot_token and webhook_secret are present.

  • Neither present → continue to Step 2.
  • Both present → credentials existing does not mean Telegram works, so check before saying so. Run Step 3's assistant channels get telegram --json and read webhook_delivery.
    • passed: true, no indeterminate → already set up and confirmed. Offer to show status or reconfigure, and stop here unless the user wants a reset.
    • passed: true with indeterminate: true → do NOT stop here. Nothing is broken, but nothing is confirmed: the registration record is missing, or Telegram was unreachable just now. Stopping would skip both the recovery in Step 3 and the identity verification in Step 4. Go to Step 3 and re-check.
    • passed: false → configured but not delivering. This is what the Channels page shows as incomplete, and it is why the user may have asked. Go to Step 3 and work the recovery rather than reporting it as already set up.

✓ Checkpoint: You named which fields are present before branching. Do not skip the call and guess.

Step 2: Open the setup wizard

Call ui_show with surface_type: "channel_setup" and data: { channel: "telegram" }. The wizard is non-blocking: the tool returns immediately.

⚠️ CRITICAL: Tool call first, announcement second, in the same turn. Do not write any message saying the wizard is open until ui_show has returned success earlier in the same turn. A message claiming the wizard is open when the tool was never called shows the user an empty side panel.

After it returns success, tell the user:

I've opened the Telegram setup wizard in the side panel. It walks you through creating the bot with @BotFather and brings its token back. Telegram works in private chats and in groups. In a group, mention the bot or reply to it to get an answer; broadcast channels are not supported. It'll let me know when you're done, and I'll check Telegram is actually delivering.

Hand-off notification (phones and narrow windows). On phone-sized clients setup opens on the Contacts page instead of a side drawer and cannot auto-notify. The client sends a hidden message like [User action on channel_setup surface: moved the telegram setup to the Contacts page]. When you receive it:

It looks like setup opened on your Contacts page rather than a side panel, same steps in a different spot. When you've finished, come back and tell me and I'll check it's working.

and rely on their confirmation to trigger Step 3.

If ui_show fails, do NOT send that message. Tell the user the wizard could not be opened and troubleshoot (e.g. no connected client) before retrying.

⚠️ CRITICAL: Do NOT collect the token in chat. Do NOT use assistant credentials prompt. The wizard's secure input field is the only path for credential entry.

Step 3: Confirm Telegram is delivering

Triggered by the wizard-closed notification, [User action on channel_setup surface: closed the telegram setup wizard]. Closing the drawer sends it automatically, so do not wait for the user to type a confirmation. If they say they're done or ask you to check, proceed the same way.

  1. Run assistant credentials list --search telegram. Confirm bot_token and webhook_secret are both present.

    If bot_token is missing the user closed the wizard without saving. Say so and offer to reopen it. When the notification triggered this, the panel is closed and re-running Step 2's ui_show is right. When the user asked manually, the wizard may still be open, so point them back to it instead: a second ui_show over a live wizard resets their progress.

  2. Ask whether Telegram is delivering:

    bash
    assistant channels get telegram --json

    get is always live: it invalidates the cached snapshot and re-runs the remote checks, so it reflects the state now rather than before the save.

    Find the webhook_delivery check in remoteChecks. It has three outcomes, and the third is the one that matters:

    • passed: true, no indeterminate → confirmed. Telegram is registered at the address this assistant set. Continue to Step 4.
    • passed: false → the channel is not live. Its message already names the cause and the fix, including whether this deployment can set its own webhook URL, so relay it rather than diagnosing yourself.
    • passed: true with indeterminate: true → nothing is broken, and nothing is confirmed either. Telegram could not be reached, or no registration was recorded to compare against. Do NOT report success. Say plainly that setup is stored but delivery could not be confirmed yet, relay the message, and offer to check again.

    Registration is asynchronous. If the first check reports no webhook registered, or reports indeterminate, wait a few seconds and run the command once more before treating that as the answer: the recorded registration lands when reconciliation completes.

⚠️ CRITICAL: passed: true alone is not confirmation. An unreachable Telegram API and a missing registration record both report passed: true, because neither found a fault, and both set indeterminate. Treating the boolean alone as proof is precisely how this flow used to tell users their channel was live when nothing had verified it.

⚠️ CRITICAL: Do not report success on stored credentials alone. Credentials existing is what you would expect the moment the wizard closes and says nothing about whether messages arrive. webhook_delivery is the check that does, and it is the same signal the channel indicator uses.

⚠️ CRITICAL: Do not run setWebhook or suggest a tunnel yourself. If webhook_delivery fails, the message says what to do. Registration re-runs by itself whenever credentials or the ingress URL change, so a fix applied elsewhere takes effect without you calling Telegram.

Step 4: Verify identity

This links the user's Telegram identity so the assistant can deliver to them. Without it the channel works but has nobody to talk to, so do not skip it silently.

Load the guardian-verify-setup skill:

  • Call skill_load with skill: "guardian-verify-setup".

If the user wants to skip, continue to Step 5 and tell them they can verify later by saying "verify me on Telegram".

Step 5: Report success

Read the bot username from config rather than calling Telegram again:

bash
assistant config get telegram.botUsername

Summarize:

  • Bot connected: @{botUsername}
  • Telegram delivery: {confirmed | stored, not yet confirmed}
  • Guardian identity: {verified | skipped}
  • Supported chats: private chats, groups, and supergroups. In a group, mention the bot or reply to it. Broadcast channels are not supported.

Use "confirmed" only for a webhook_delivery that passed without indeterminate. If it was indeterminate, say so in the summary rather than rounding it up, and tell the user they can ask you to check again.

⚠️ CRITICAL: Never post the summary with a literal {botUsername} placeholder. Read the config value first and substitute it.

Completion checklist

  • assistant credentials list --search telegram was called and the existing-state branch named explicitly (Step 1).
  • ui_show returned success before any message claiming the wizard is open (Step 2).
  • The token was never requested in chat.
  • assistant channels get telegram reported webhook_delivery as passed: true without indeterminate before any delivery success was claimed (Step 3).
  • setWebhook, setMyCommands, assistant webhooks register and getWebhookInfo were not run by hand.
  • guardian-verify-setup was loaded and either completed or explicitly declined (Step 4).

Clearing credentials

To disconnect Telegram:

bash
assistant credentials delete --service telegram --field bot_token
assistant credentials delete --service telegram --field webhook_secret
assistant config set telegram.botUsername ""

附带文件

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

常见问题

Telegram Setup AI 技能有什么作用?

将 Telegram 机器人连接到 Vellum Assistant 网关,并自动注册 Webhook 和存储凭据。

为什么在 TypingMind 中使用 Telegram Setup?

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

如何在 TypingMind 中安装 Telegram Setup?

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

哪些 AI 模型可以使用 Telegram Setup?

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

Telegram Setup 可以搭配多少个 AI 模型使用?

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

Telegram Setup AI 技能免费吗?

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

什么是 AI 技能?

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

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

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

查看全部

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

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