跳到主要内容
知仓学习社ZHICANG

telegram

Send Telegram messages, files, and alerts via bot API; read replies; ask questions with inline buttons and wait for the answer (approve-from-phone).…

写文件联网严重 0 · 高危 6sanjay3290/ai-skills

它会碰到什么

扫了多少3 个文本文件,22 KB
它会碰到什么写文件联网
命中总数9 处
命中统计严重 0 · 高 6 · 中 0 · 低 3
逐条看命中(6 条严重或高危)
  • README.md:152identity-config-write
    "hooks": {
  • README.md:153identity-config-write
    "Notification": [{"hooks": [{"type": "command",
  • README.md:155identity-config-write
    "Stop": [{"hooks": [{"type": "command",
  • SKILL.md:45identity-config-write
    "hooks": {
  • SKILL.md:46identity-config-write
    "Notification": [{"hooks": [{"type": "command",
  • SKILL.md:48identity-config-write
    "Stop": [{"hooks": [{"type": "command",

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 424
本站分层T2
该仓技能数24
原文件路径skills/telegram/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 24 个技能