Files
nanoclaw/.claude/skills/add-telegram-v2/SKILL.md
gavrielc 57a6491c7e v2: channel isolation model, manage-channels skill, refactored channel skills
- Add three-level isolation model (shared session, same agent, separate agent)
  with agent-shared session mode for cross-channel shared sessions
- Create /manage-channels skill for wiring channels to agent groups
- Refactor all 12 v2 channel skills: lean SKILL.md + VERIFY.md + REMOVE.md
  with structured Channel Info section for platform-specific metadata
- Create /add-discord-v2 skill (was missing)
- Add step 5a to setup SKILL.md invoking /manage-channels after channel install
- Update setup/verify.ts to check all 12 channel token types
- Add docs/v2-isolation-model.md explaining the isolation model
- Update v2-checklist.md and v2-setup-wiring.md to reflect completed work

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 13:19:19 +03:00

2.1 KiB

name, description
name description
add-telegram-v2 Add Telegram channel integration to NanoClaw v2 via Chat SDK.

Add Telegram Channel

Adds Telegram bot support to NanoClaw v2 using the Chat SDK bridge.

Pre-flight

Check if src/channels/telegram.ts exists and the import is uncommented in src/channels/index.ts. If both are in place, skip to Credentials.

Install

Install the adapter package

npm install @chat-adapter/telegram

Enable the channel

Uncomment the Telegram import in src/channels/index.ts:

import './telegram.js';

Build

npm run build

Credentials

Create Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts:
    • Bot name: Something friendly (e.g., "NanoClaw Assistant")
    • Bot username: Must end with "bot" (e.g., "nanoclaw_bot")
  3. Copy the bot token (looks like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)

Important for group chats: By default, Telegram bots only see @mentions and commands in groups. To let the bot see all messages:

  1. Open @BotFather > /mybots > select your bot
  2. Bot Settings > Group Privacy > Turn off

Configure environment

Add to .env:

TELEGRAM_BOT_TOKEN=your-bot-token

Sync to container: mkdir -p data/env && cp .env data/env/env

Next Steps

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

Otherwise, run /manage-channels to wire this channel to an agent group.

Channel Info

  • type: telegram
  • terminology: Telegram calls them "groups" and "chats." A "group" has multiple members; a "chat" is a 1:1 conversation with the bot.
  • how-to-find-id: Send a message in the group/chat, then visit https://api.telegram.org/bot<TOKEN>/getUpdates — the chat.id field is the platform ID. Group IDs are negative numbers.
  • supports-threads: no
  • typical-use: Interactive chat — direct messages or small groups
  • default-isolation: Same agent group if you're the only participant across multiple chats. Separate agent group if different people are in different groups.