Add Telegram as a channel. Can replace WhatsApp entirely or run alongside it. Also configurable as a control-only channel (triggers actions) or passive channel (receives notifications only).
Add Telegram as a channel. Can replace WhatsApp entirely or run alongside it. Also configurable as a control-only channel (triggers actions) or passive channel (receives notifications only).
Add Telegram Channel
This skill adds Telegram support to GhostClaw using the skills engine for deterministic code changes, then walks through interactive setup.
Phase 1: Pre-flight
Check if already applied
Read .ghostclaw/state.yaml. If telegram is in applied_skills, skip to Phase 3 (Setup). The code changes are already in place.
Ask the user
Use AskUserQuestion to collect configuration:
AskUserQuestion: Should Telegram replace WhatsApp or run alongside it?
Replace WhatsApp - Telegram will be the only channel (sets TELEGRAM_ONLY=true)
Alongside - Both Telegram and WhatsApp channels active
AskUserQuestion: Do you have a Telegram bot token, or do you need to create one?
If they have one, collect it now. If not, we'll create one in Phase 3.
Phase 2: Apply Code Changes
Run the skills engine to apply this skill's code package. The package files are in this directory alongside this SKILL.md.
Initialize skills system (if needed)
If .ghostclaw/ directory doesn't exist yet:
npx tsx scripts/apply-skill.ts --init
Or call initSkillsSystem() from skills-engine/migrate.ts.
If running npm run dev while the service is active:
# macOS:
launchctl unload ~/Library/LaunchAgents/com.ghostclaw.plist
npm run dev
# When done testing:
launchctl load ~/Library/LaunchAgents/com.ghostclaw.plist
# Linux:# systemctl --user stop ghostclaw# npm run dev# systemctl --user start ghostclaw
Agent Swarms (Teams)
After completing the Telegram setup, use AskUserQuestion:
AskUserQuestion: Would you like to add Agent Swarm support? Without it, Agent Teams still work — they just operate behind the scenes. With Swarm support, each subagent appears as a different bot in the Telegram group so you can see who's saying what and have interactive team sessions.
If they say yes, invoke the /add-telegram-swarm skill.
Removal
To remove Telegram integration:
Delete src/channels/telegram.ts
Remove TelegramChannel import and creation from src/index.ts
Remove channels array and revert to using whatsapp directly in processGroupMessages, scheduler deps, and IPC deps
Revert getAvailableGroups() filter to only include @g.us chats
Remove Telegram config (TELEGRAM_BOT_TOKEN, TELEGRAM_ONLY) from src/config.ts
Remove Telegram registrations from SQLite: sqlite3 store/messages.db "DELETE FROM registered_groups WHERE jid LIKE 'tg:%'"
Uninstall: npm uninstall grammy
Rebuild: npm run build && launchctl kickstart -k gui/$(id -u)/com.ghostclaw (macOS) or npm run build && systemctl --user restart ghostclaw (Linux)