sbusso/claudeclaw/add-telegram-swarm
Claude Code and agent skill by sbusso/claudeclaw
- community
Checking that the SKILL.md file is still in the repository.
Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".
Install
npx vskill@latest install sbusso/claudeclaw/add-telegram-swarmSKILL.md
Add Agent Swarm to Telegram
This skill adds Agent Teams (Swarm) support to an existing Telegram channel. Each subagent in a team gets its own bot identity in the Telegram group, so users can visually distinguish which agent is speaking.
Prerequisite: Telegram must already be set up via the /add-telegram skill. If src/channels/telegram.ts does not exist or TELEGRAM_BOT_TOKEN is not configured, tell the user to run /add-telegram first.
How It Works
- The main bot receives messages and sends lead agent responses (already set up by
/add-telegram) - Pool bots are send-only — each gets a Grammy
Apiinstance (no polling) - When a subagent calls
send_messagewith asenderparameter, the host assigns a pool bot and renames it to match the sender's role - Messages appear in Telegram from different bot identities
Prerequisites
1. Create Pool Bots
Tell the user:
I need you to create 3-5 Telegram bots to use as the agent pool. These will be renamed dynamically to match agent roles.1. Open Telegram and search for@BotFather2. Send/newbotfor each bot:- Give them any placeholder name (e.g., "Bot 1", "Bot 2")- Usernames likemyproject_swarm_1_bot,myproject_swarm_2_bot, etc.3. Copy all the tokens4. Add all bots to your Telegram group(s) where you want agent teams
Wait for user to provide the tokens.
2. Disable Group Privacy for Pool Bots
Tell the user:
Important: Each pool bot needs Group Privacy disabled so it can send messages in groups.For each pool bot in@BotFather:1. Send/mybotsand select the bot2. Go to Bot Settings > Group Privacy > Turn offThen add all pool bots to your Telegram group(s).
Implementation
Step 1: Update Configuration
Read src/orchestrator/config.ts and add the bot pool config near the other Telegram exports:
Step 2: Add Bot Pool to Telegram Module
Read src/channels/telegram.ts and add the following:
- Update imports — add
Apito the Grammy import:
- Add pool state after the existing
let botdeclaration:
- Add pool functions — place these before the
isTelegramConnectedfunction:
Step 3: Add sender Parameter to MCP Tool
Read agent/runner/src/ipc-mcp-stdio.ts and update the send_message tool to accept an optional sender parameter:
Change the tool's schema from:
To:
And update the handler to include sender in the IPC data:
Step 4: Update Host IPC Routing
Read src/orchestrator/ipc.ts and make these changes:
- Add imports — add
sendPoolMessageandinitBotPoolfrom the Telegram swarm module, andTELEGRAM_BOT_POOLfrom config.
- Update IPC message routing — in
src/orchestrator/ipc.ts, find where thesendMessagedependency is called to deliver IPC messages (insideprocessIpcFiles). ThesendMessageis passed in via theIpcDepsparameter. Wrap it to route Telegram swarm messages through the bot pool:
Note: The assistant name prefix is handled by formatOutbound() in the router — Telegram channels have prefixAssistantName = false so no prefix is added for tg: JIDs.
- Initialize pool in `main()` in `src/index.ts` — after creating the Telegram channel, add:
Step 5: Update CLAUDE.md Files
5a. Add global message formatting rules
Read groups/global/CLAUDE.md and add a Message Formatting section:
5b. Update existing group CLAUDE.md headings
In any group CLAUDE.md that has a "WhatsApp Formatting" section (e.g. groups/main/CLAUDE.md), rename the heading to reflect multi-channel support:
5c. Add Agent Teams instructions to Telegram groups
For each Telegram group that will use agent teams, create or update its groups/{folder}/CLAUDE.md with these instructions. Read the existing CLAUDE.md first (or groups/global/CLAUDE.md as a base) and add the Agent Teams section:
Step 6: Update Environment
Add pool tokens to .env:
Important: Sync to all required locations:
Service name: Derived from the directory name:com.claudeclaw.<dirname>(macOS) /claudeclaw-<dirname>(Linux). For example, if cwd ismy-assistant, the service iscom.claudeclaw.my-assistant. Determine the correct service name before running service commands below.
Also add TELEGRAM_BOT_POOL to the launchd plist (~/Library/LaunchAgents/com.claudeclaw.plist) in the EnvironmentVariables dict if using launchd.
Step 7: Rebuild and Restart
Must use unload/load (macOS) or restart (Linux) because the service env vars changed.
Step 8: Test
Tell the user:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/add-telegram-swarm/SKILL.md
Popularity
- Repository stars
- 173
- Repository forks
- 56
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sbusso/claudeclaw/add-telegram-swarm)