telegram-bot-messaging
Skill này làm gì
Chương trình này gửi tin nhắn, tệp và cảnh báo đến Telegram bằng bot. Nó cũng có thể đặt câu hỏi bằng nút bấm và chờ phản hồi.
Khi nào nên dùng
- ✓Khi bạn muốn gửi cảnh báo từ một quy trình tự động đến điện thoại.
- ✓Khi bạn cần xin phê duyệt để tiếp tục một tác vụ, bằng nút trả lời.
- ✓Khi bạn muốn nhận thông báo về tiến độ của một quy trình.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/telegram-bot-messaging/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thông báo cho tôi khi báo cáo đã sẵn sàng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn thiết lập một “bot” trong Telegram đóng vai trò như trợ lý. Chương trình này dùng bot đó để gửi và nhận tin nhắn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Telegram
When to Use
- Use when you need to send a Telegram message, file, or alert from a workflow, hook, cron job, or CI pipeline
- Use when a long-running task should notify you or ask for approval on your phone (inline-button questions that wait for the answer)
- Use when wiring "notify me when done" or "ask me before proceeding" behavior into automated sessions
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: bash scripts/telegram.sh setup (guided BotFather walkthrough).
Safety Gate
Before setup, sending a message or file, reading replies, or enabling a hook, obtain the user's explicit approval for the target chat, bot account, and exact content or file. Never send workspace, customer, credential, or secret data automatically. Treat a token as a secret: do not echo it, commit it, or place it in shell history.
Commands
bash scripts/telegram.sh send "Deploy finished ✅" # basic alert
bash scripts/telegram.sh send "low priority" --silent # no notification sound
bash scripts/telegram.sh send "*bold* alert" --format md # MarkdownV2 (falls back to plain)
bash scripts/telegram.sh send "hi" --to alerts --bot work # named target + named bot
bash scripts/telegram.sh file report.pdf "Q3 report" # document (photos auto-detected)
bash scripts/telegram.sh read # new incoming messages since last read
ANSWER=$(bash 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)
TELEGRAM_APPROVER_IDS=123456789 # default group approver user IDs (comma-separated)
APPROVERS_FAMILY=123456789,987654321 # approvers for --to family (overrides default)
Replies and answers are only accepted from configured chat IDs. Private chats preserve the
direct-chat behavior (the sender user ID must equal the chat ID). Because a group chat ID is
shared by every member, ask fails closed for groups unless TELEGRAM_APPROVER_IDS or the
target-specific APPROVERS_<NAME> explicitly lists the Telegram user IDs allowed to answer.
Claude Code hooks (settings.json)
Ping your phone when Claude needs input, and when it finishes:
{
"hooks": {
"Notification": [{"hooks": [{"type": "command",
"command": "bash ~/.claude/skills/telegram/scripts/telegram.sh send \"🔔 Claude needs input in $(basename \\\"$PWD\\\")\""}]}],
"Stop": [{"hooks": [{"type": "command",
"command": "bash ~/.claude/skills/telegram/scripts/telegram.sh send \"✅ Claude finished in $(basename \\\"$PWD\\\")\" --silent"}]}]
}
}
Approval gate in any script/automation:
if [ "$(bash scripts/telegram.sh ask 'Deploy to prod?' --options 'Yes,No')" = "Yes" ]; then
./deploy.sh
fi
Limitations
- Telegram is a third-party service: message and file contents leave the local machine and may be retained under Telegram's policies.
- This skill cannot verify that a chat ID belongs to the intended recipient; confirm the target before every new destination or automation.
- Bot tokens grant control of the bot. Store them only in a protected local secret store or mode-600 configuration file. The script supplies token-bearing API URLs to curl through stdin rather than process arguments; rotate a token if exposure is suspected.
- Do not use the examples to create unattended notifications or approval flows without the user's explicit, current authorization.
Câu hỏi thường gặp
Tôi thiết lập bot như thế nào?
Bạn chạy một lệnh “setup”, và lệnh này hướng dẫn bạn tạo bot ngay trong Telegram.
Tôi có thể dùng nhiều bot không?
Có, bạn có thể thiết lập và dùng nhiều bot cho các mục đích khác nhau.
Gửi thông tin có an toàn không?
Cần cẩn trọng. Chương trình xin phép bạn trước khi gửi bất cứ thứ gì, và mã token của bot phải được giữ bí mật.
Chi tiết
Mô tả gốc của tác giả
Send Telegram messages, files, and alerts via bot API; ask questions with inline buttons and wait for the answer. Supports multiple bots, named chat targets, and CI/cron/hook notifications.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5951
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
discord-user-post
394kCho phép agent của bạn đăng tin nhắn đã duyệt lên Discord dưới tên bạn qua app Discord trên máy tính, sau khi xác nhận đúng kênh.
configure-channel
394kHướng dẫn agent của bạn kết nối một ứng dụng chat như Telegram với OpenClaw, lưu token bot an toàn và kiểm tra tin nhắn có đi qua được không.
discord
394kGiúp agent của bạn đọc, gửi, sửa và thả biểu cảm cho tin nhắn Discord qua OpenClaw, và kiểm tra đúng tin nhắn trước khi thay đổi.