From sanjay3290-ai-skills
Sends messages, files, and alerts via the Telegram bot API; reads replies; and runs approval flows with inline buttons. Useful for notifications, CI alerts, cron job updates, or asking for user approval.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sanjay3290-ai-skills:telegramThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Send updates, alerts, and files to Telegram; read replies; run ask-and-wait
Send updates, alerts, and files to Telegram; read replies; run ask-and-wait approval flows. Pure bash + curl + jq — no install beyond a bot token.
First run: scripts/telegram.sh setup (guided BotFather walkthrough).
scripts/telegram.sh send "Deploy finished ✅" # basic alert
scripts/telegram.sh send "low priority" --silent # no notification sound
scripts/telegram.sh send "*bold* alert" --format md # MarkdownV2 (falls back to plain)
scripts/telegram.sh send "hi" --to alerts --bot work # named target + named bot
scripts/telegram.sh file report.pdf "Q3 report" # document (photos auto-detected)
scripts/telegram.sh read # new incoming messages since last read
ANSWER=$(scripts/telegram.sh ask "Deploy to prod?" --options "Yes,No" --timeout 300)
# exit 0 = answered (stdout = answer), 2 = timeout
Env vars win, then ~/.config/telegram/config (mode 600):
TELEGRAM_BOT_TOKEN=123:ABC... # default bot
TELEGRAM_CHAT_ID=987654321 # default target
BOT_ALERTS_TOKEN=456:DEF... # --bot alerts (add via: setup --bot alerts)
TARGET_FAMILY=-100987... # --to family (any chat/group/channel id)
Replies and answers are only accepted from configured chat IDs.
Ping your phone when Claude needs input, and when it finishes:
{
"hooks": {
"Notification": [{"hooks": [{"type": "command",
"command": "~/.claude/skills/telegram/scripts/telegram.sh send \"🔔 Claude needs input in $(basename \\\"$PWD\\\")\""}]}],
"Stop": [{"hooks": [{"type": "command",
"command": "~/.claude/skills/telegram/scripts/telegram.sh send \"✅ Claude finished in $(basename \\\"$PWD\\\")\" --silent"}]}]
}
}
Approval gate in any script/automation:
if [ "$(scripts/telegram.sh ask 'Deploy to prod?' --options 'Yes,No')" = "Yes" ]; then
./deploy.sh
fi
npx claudepluginhub sanjay3290/ai-skillsEnables communication with users via Telegram for clarifications, options, blockers, task completion notifications, and long-running task updates instead of terminal.
Integrates with Telegram Bot API: setup via BotFather, send messages, webhooks, inline keyboards, manage groups and channels. Includes boilerplates for Node.js and Python.
Builds and manages Telegram bots via the Bot API: create bots, send messages with keyboards, handle photos and inline interactions.