telegram

GitHub

通过 Telegram Bot API 发送消息、文件及告警,支持读取回复与审批流。用于将通知集成至 CI/CD、定时任务或自动化流程,实现即时通讯交互。

skills/telegram/SKILL.md sanjay3290/ai-skills

Trigger Scenarios

telegram send me a telegram alert me on telegram ask me on telegram notify me when done

Install

npx skills add sanjay3290/ai-skills --skill telegram -g -y
More Options

Use without installing

npx skills use sanjay3290/ai-skills@telegram

指定 Agent (Claude Code)

npx skills add sanjay3290/ai-skills --skill telegram -a claude-code -g -y

安装 repo 全部 skill

npx skills add sanjay3290/ai-skills --all -g -y

预览 repo 内 skill

npx skills add sanjay3290/ai-skills --list

SKILL.md

Frontmatter
{
    "name": "telegram",
    "description": "Send Telegram messages, files, and alerts via bot API; read replies; ask questions with inline buttons and wait for the answer (approve-from-phone). Supports multiple bots and named chat targets. Use when the user wants to send a Telegram message or alert, get notified on Telegram when a task finishes or needs input, ask for approval via Telegram, or wire Telegram notifications into hooks, cron jobs, or CI. Triggers: 'telegram', 'send me a telegram', 'alert me on telegram', 'ask me on telegram', 'notify me when done'."
}

Telegram

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).

Commands

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

Config

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.

Claude Code hooks (settings.json)

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

Version History

  • 3619692 Current 2026-07-24 17:34

Same Skill Collection

skills/atlassian/SKILL.md
skills/azure-devops/SKILL.md
skills/elevenlabs/SKILL.md
skills/gmail/SKILL.md
skills/google-calendar/SKILL.md
skills/google-chat/SKILL.md
skills/google-docs/SKILL.md
skills/google-drive/SKILL.md
skills/google-sheets/SKILL.md
skills/google-slides/SKILL.md
skills/grok-build/SKILL.md
skills/imagen/SKILL.md
skills/jules/SKILL.md
skills/manus/SKILL.md
skills/mssql/SKILL.md
skills/mysql/SKILL.md
skills/notebooklm/SKILL.md
skills/postgres/SKILL.md
skills/apple-container/SKILL.md
skills/google-tts/SKILL.md
skills/whatsapp/SKILL.md

Metadata

Files
0
Version
3619692
Hash
1f1fcc80
Indexed
2026-07-24 17:34

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 12:11
浙ICP备14020137号-1 $방문자$