Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

telegramTelegram Bot 开发

Agent Skill

telegram 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

541

周安装

23

GitHub Stars

267

下载量

190
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:telegram(Telegram Bot 开发)
来源仓库:https://github.com/ninehills/skills
仓库路径:skills/telegram
安装命令:
npx skills add https://github.com/ninehills/skills --skill telegram
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ninehills/skills --skill telegram

简介

telegram 用于查找、检索和筛选相关信息。

  • 适合在关键词搜索或任务场景下快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或文件读写操作。
  • telegram 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Telegram Bot API Skill

You have full access to the Telegram Bot API. Use CLI commands for common operations, and direct API calls for everything else.

Getting the Bot Token

BOT_TOKEN=$(curl -s http://localhost:23001/api/settings | jq -r '.telegram.botToken')

API Call Pattern

# JSON body (most methods)
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/<METHOD>" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

# Multipart form (file uploads)
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/<METHOD>" \
  -F "chat_id=<CHAT_ID>" \
  -F "photo=@/path/to/file.jpg" \
  -F "caption=optional caption"

Full API docs: https://core.telegram.org/bots/api


CLI Quick Commands

# Current chat (ALMA_CHAT_ID auto-set)
alma send photo /path/to/img.jpg "caption"
alma send file /path/to/doc.pdf "caption"
alma send audio /path/to/song.mp3
alma send video /path/to/vid.mp4

# Group operations
alma group list
alma group send <chatId> "text"
alma group send-photo <chatId> /path "caption"
alma group send-document <chatId> /path "caption"
alma group send-video <chatId> /path "caption"
alma group history <chatId> [limit]
alma group search <chatId> "query"
alma group context <chatId>
alma group pin <chatId> <msgId>
alma group unpin <chatId> [msgId]
alma group leave <chatId>
alma group patrol

# Direct message & message mgmt
alma dm <userId> "message"
alma msg delete <chatId> <msgId>
alma msg react <chatId> <msgId> <emoji>   # Add reaction to a message (e.g. ❤️ 😂 👍)
alma msg sticker <chatId> <sticker_file_id>  # Send a sticker (use file_id from received stickers)
alma msg sticker-search [set_name]          # List sticker sets (no args) or index a specific set
alma msg sticker-find <emoji>               # Find stickers by emoji across all indexed sets

All Telegram Bot API Methods

Sending Messages

MethodDescription
sendMessageSend text message. Params: chat_id, text, parse_mode (HTML/Markdown), reply_parameters, reply_markup, message_thread_id, link_preview_options
sendPhotoSend photo. chat_id, photo (file_id/URL/upload), caption, has_spoiler
sendDocumentSend file. chat_id, document, caption, thumbnail
sendVideoSend video. chat_id, video, caption, duration, width, height, has_spoiler
sendAnimationSend GIF. chat_id, animation, caption, has_spoiler
sendAudioSend audio. chat_id, audio, caption, duration, performer, title
sendVoiceSend voice message. chat_id, voice, caption, duration
sendVideoNoteSend round video. chat_id, video_note, duration, length
sendStickerSend sticker. chat_id, sticker (file_id/URL/upload)
sendLocationSend location. chat_id, latitude, longitude, live_period
sendVenueSend venue. chat_id, latitude, longitude, title, address
sendContactSend contact. chat_id, phone_number, first_name, last_name
sendPollSend poll. chat_id, question, options ([{text:...}]), is_anonymous, type (quiz/regular), allows_multiple_answers
sendDiceSend dice/slot. chat_id, emoji (🎲🎯🏀⚽🎳🎰)
sendMediaGroupSend album (2-10 items). chat_id, media ([{type,media,caption}])
sendChatActionShow typing/uploading status. chat_id, action (typing/upload_photo/upload_video/upload_document/record_voice/record_video/etc)
sendMessageDraftStream partial message. chat_id, text, business_connection_id

Forwarding & Copying

MethodDescription
forwardMessageForward message. chat_id (target), from_chat_id, message_id
forwardMessagesForward multiple. chat_id, from_chat_id, message_ids ([array])
copyMessageCopy without "Forwarded" header. chat_id, from_chat_id, message_id, caption
copyMessagesCopy multiple. chat_id, from_chat_id, message_ids

Editing Messages

MethodDescription
editMessageTextEdit text. chat_id, message_id, text, parse_mode, reply_markup
editMessageCaptionEdit caption. chat_id, message_id, caption
editMessageMediaEdit media. chat_id, message_id, media
editMessageReplyMarkupEdit inline keyboard. chat_id, message_id, reply_markup
editMessageLiveLocationUpdate live location. chat_id, message_id, latitude, longitude
stopMessageLiveLocationStop live location. chat_id, message_id
deleteMessageDelete message. chat_id, message_id
deleteMessagesDelete multiple. chat_id, message_ids ([array])

Reactions

MethodDescription
setMessageReactionReact to message. chat_id, message_id, reaction ([{"type":"emoji","emoji":"👍"}]), is_big

Chat Management

MethodDescription
getChatGet chat info. chat_id
getChatMemberCountMember count. chat_id
getChatMemberGet one member's info. chat_id, user_id
getChatAdministratorsList admins. chat_id
setChatTitleSet title. chat_id, title
setChatDescriptionSet description. chat_id, description
setChatPhotoSet photo. chat_id, photo (upload)
deleteChatPhotoDelete photo. chat_id
setChatPermissionsSet default permissions. chat_id, permissions ({can_send_messages, can_send_photos,...})
setChatStickerSetSet sticker set. chat_id, sticker_set_name
deleteChatStickerSetRemove sticker set. chat_id
leaveChatLeave chat. chat_id
pinChatMessagePin message. chat_id, message_id, disable_notification
unpinChatMessageUnpin message. chat_id, message_id
unpinAllChatMessagesUnpin all. chat_id

Member Management

MethodDescription
banChatMemberBan user. chat_id, user_id, until_date, revoke_messages
unbanChatMemberUnban user. chat_id, user_id, only_if_banned
restrictChatMemberRestrict user. chat_id, user_id, permissions, until_date
promoteChatMemberPromote to admin. chat_id, user_id, can_change_info, can_post_messages, can_edit_messages, can_delete_messages, can_invite_users, can_restrict_members, can_pin_messages, can_promote_members, can_manage_video_chats, can_manage_chat
setChatAdministratorCustomTitleSet admin title. chat_id, user_id, custom_title
approveChatJoinRequestApprove join request. chat_id, user_id
declineChatJoinRequestDecline join request. chat_id, user_id

Invite Links

MethodDescription
exportChatInviteLinkCreate new primary link. chat_id
createChatInviteLinkCreate invite link. chat_id, name, expire_date, member_limit, creates_join_request
editChatInviteLinkEdit invite link. chat_id, invite_link,...
revokeChatInviteLinkRevoke link. chat_id, invite_link
createChatSubscriptionInviteLinkPaid subscription link. chat_id, subscription_period, subscription_price

Forum Topics

MethodDescription
createForumTopicCreate topic. chat_id, name, icon_color, icon_custom_emoji_id
editForumTopicEdit topic. chat_id, message_thread_id, name, icon_custom_emoji_id
closeForumTopicClose topic. chat_id, message_thread_id
reopenForumTopicReopen topic. chat_id, message_thread_id
deleteForumTopicDelete topic. chat_id, message_thread_id
unpinAllForumTopicMessagesUnpin all in topic. chat_id, message_thread_id
getForumTopicIconStickersGet available topic icons
editGeneralForumTopicEdit General topic. chat_id, name
closeGeneralForumTopicClose General. chat_id
reopenGeneralForumTopicReopen General. chat_id
hideGeneralForumTopicHide General. chat_id
unhideGeneralForumTopicUnhide General. chat_id

Bot Profile

MethodDescription
getMeGet bot info
setMyNameSet bot name. name, language_code
getMyNameGet bot name
setMyDescriptionSet bot description. description, language_code
getMyDescriptionGet bot description
setMyShortDescriptionSet short description. short_description
getMyShortDescriptionGet short description
setMyProfilePhotoSet bot profile photo. photo
removeMyProfilePhotoRemove bot profile photo
setMyCommandsSet command list. commands ([{command,description}]), scope, language_code
getMyCommandsGet commands
deleteMyCommandsDelete commands
setChatMenuButtonSet menu button. chat_id, menu_button
getChatMenuButtonGet menu button
setMyDefaultAdministratorRightsSet default admin rights. rights, for_channels
getMyDefaultAdministratorRightsGet default admin rights

User Info

MethodDescription
getUserProfilePhotosGet profile photos. user_id, offset, limit
getUserProfileAudiosGet profile audios. user_id

Files

MethodDescription
getFileGet file download info. file_id. Download: https://api.telegram.org/file/bot<TOKEN>/<file_path>

Inline Keyboards & Callbacks

// reply_markup for inline buttons
{
  "inline_keyboard": [
    [{"text": "Button 1", "callback_data": "btn1"}, {"text": "URL", "url": "https://example.com"}],
    [{"text": "Row 2", "callback_data": "btn2"}]
  ]
}
MethodDescription
answerCallbackQueryAnswer callback from inline button. callback_query_id, text, show_alert

Stickers

MethodDescription
sendStickerSend sticker. chat_id, sticker
getStickerSetGet sticker set. name
getCustomEmojiStickersGet custom emoji. custom_emoji_ids
createNewStickerSetCreate sticker set. user_id, name, title, stickers
addStickerToSetAdd sticker. user_id, name, sticker
setStickerPositionInSetReorder. sticker, position
deleteStickerFromSetDelete sticker. sticker
setStickerSetTitleSet title. name, title
setStickerSetThumbnailSet thumbnail. name, user_id, thumbnail

Payments

MethodDescription
sendInvoiceSend invoice. chat_id, title, description, payload, currency, prices
createInvoiceLinkCreate payment link
answerShippingQueryAnswer shipping. shipping_query_id, ok, shipping_options
answerPreCheckoutQueryAnswer checkout. pre_checkout_query_id, ok
refundStarPaymentRefund stars. user_id, telegram_payment_charge_id

Games

MethodDescription
sendGameSend game. chat_id, game_short_name
setGameScoreSet score. user_id, score, chat_id, message_id
getGameHighScoresGet scores. user_id, chat_id, message_id

Common Examples

Post to a channel

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "@channel_username", "text": "Hello!"}'

Send photo with inline keyboard

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendPhoto" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_id": "'$ALMA_CHAT_ID'",
    "photo": "https://example.com/image.jpg",
    "caption": "Check this out!",
    "reply_markup": {"inline_keyboard": [[{"text":"👍 Like","callback_data":"like"},{"text":"👎","callback_data":"dislike"}]]}
  }'

Forward message between chats

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/forwardMessage" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "<TARGET>", "from_chat_id": "<SOURCE>", "message_id": 123}'

Create a poll

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendPoll" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "'$ALMA_CHAT_ID'", "question": "Best language?", "options": [{"text":"Rust"},{"text":"TypeScript"},{"text":"Python"}], "is_anonymous": false}'

Reply to a specific message

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "'$ALMA_CHAT_ID'", "text": "Replying!", "reply_parameters": {"message_id": 5678}}'

Promote user to admin

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/promoteChatMember" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "<GROUP>", "user_id": 12345, "can_pin_messages": true, "can_invite_users": true}'

Upload and send a local file

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument" \
  -F "chat_id=$ALMA_CHAT_ID" \
  -F "document=@/path/to/file.pdf" \
  -F "caption=Here's the document"

Send album (media group)

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "'$ALMA_CHAT_ID'", "media": [
    {"type":"photo","media":"https://example.com/1.jpg","caption":"First"},
    {"type":"photo","media":"https://example.com/2.jpg"}
  ]}'

Create invite link

curl -s "https://api.telegram.org/bot${BOT_TOKEN}/createChatInviteLink" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "<GROUP>", "name": "My Link", "member_limit": 100}'

Tips

  • Channel posts: Use @channel_username or numeric chat_id (starts with -100)
  • Bot must be admin to: post to channels, pin, delete others' messages, ban, manage topics
  • ALMA_CHAT_ID is auto-set in Bash tool env — use it for current chat
  • File uploads: Use -F multipart form, not -d JSON
  • parse_mode: Use "HTML" for <b>bold</b> <i>italic</i> <code>code</code> <a href="url">link</a>
  • Group IDs are negative; user IDs are positive
  • Message IDs are visible as [msg:xxx] in chat
  • For methods not listed here, check https://core.telegram.org/bots/api

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.08%
按下载量换算63

Claude

30.17%
按下载量换算57

Cursor

19.61%
按下载量换算37

Gemini CLI

9.2%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills