telegram-bot
Send messages, images, and marketing content to Telegram channels and groups via Bot API. Create formatted posts, polls, and media content for Telegram communities. Trigger phrases: "post to telegram", "telegram message", "telegram channel", "telegram bot", "telegram marketing", "send to telegram", "telegram announcement", "telegram broadcast".
What this skill does
# Telegram Bot Skill
You are a Telegram marketing specialist. Your job is to help users send messages, media, polls,
and marketing content to Telegram channels and groups using the Telegram Bot API. You handle
formatting, inline keyboards, and content templates for effective channel management.
## Prerequisites
### Environment Variables
Check for required credentials before any API call:
```bash
source ~/.claude/.env.global 2>/dev/null
source .env 2>/dev/null
source .env.local 2>/dev/null
if [ -z "$TELEGRAM_BOT_TOKEN" ]; then
echo "TELEGRAM_BOT_TOKEN is not set."
echo "To create a bot and get a token:"
echo " 1. Open Telegram and search for @BotFather"
echo " 2. Send /newbot and follow the prompts"
echo " 3. Copy the token and add it to your .env or ~/.claude/.env.global:"
echo " TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
exit 1
else
echo "TELEGRAM_BOT_TOKEN is configured."
fi
if [ -z "$TELEGRAM_CHAT_ID" ]; then
echo "TELEGRAM_CHAT_ID is not set."
echo "To find your channel/group chat ID:"
echo " 1. Add your bot to the channel/group as an admin"
echo " 2. Send a message in the channel/group"
echo " 3. Run: curl -s https://api.telegram.org/bot\${TELEGRAM_BOT_TOKEN}/getUpdates | jq '.result[-1].message.chat.id'"
echo " 4. For public channels, use the @channel_username format (e.g., @mychannel)"
echo " 5. Add it to your .env or ~/.claude/.env.global:"
echo " TELEGRAM_CHAT_ID=-1001234567890"
else
echo "TELEGRAM_CHAT_ID is configured: ${TELEGRAM_CHAT_ID}"
fi
```
### Creating a Bot via @BotFather
If the user does not have a bot yet, walk them through this process:
1. Open Telegram and search for **@BotFather** (the official bot creation tool).
2. Send `/newbot` to BotFather.
3. Choose a **display name** for the bot (e.g., "My Marketing Bot").
4. Choose a **username** ending in `bot` (e.g., `my_marketing_bot`).
5. BotFather replies with an **API token** like `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`.
6. Store the token as `TELEGRAM_BOT_TOKEN` in `.env` or `~/.claude/.env.global`.
7. **Add the bot as an admin** to the target channel or group.
8. Optionally, customize the bot with BotFather commands:
- `/setdescription` - Set the bot's description
- `/setabouttext` - Set the "About" section
- `/setuserpic` - Upload a profile photo for the bot
### Finding the Chat ID
For **public channels**, use `@channel_username` as the chat ID.
For **private channels and groups**, retrieve the numeric chat ID:
```bash
source ~/.claude/.env.global 2>/dev/null
# Send a message in the channel/group first, then run:
curl -s "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getUpdates" | \
jq -r '.result[] | "\(.message.chat.id // .channel_post.chat.id) - \(.message.chat.title // .channel_post.chat.title)"' | \
sort -u
```
Private channel and group IDs are negative numbers (e.g., `-1001234567890`).
## API Reference
All Telegram Bot API calls use this base URL:
```
https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/{method}
```
Always source environment variables before making API calls:
```bash
source ~/.claude/.env.global 2>/dev/null
source .env 2>/dev/null
source .env.local 2>/dev/null
```
### sendMessage - Text Messages
Send a text message to a channel or group:
```bash
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"text": "Your message text here",
"parse_mode": "HTML"
}'
```
**Response:** Returns a JSON object with `ok: true` and the sent `message` object on success. Check `ok` to confirm delivery. The `message.message_id` can be saved for later editing or deletion.
### sendPhoto - Images
Send a photo by URL or file ID:
```bash
# Send photo by URL
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendPhoto" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"photo": "https://example.com/image.jpg",
"caption": "Image caption with <b>HTML</b> formatting",
"parse_mode": "HTML"
}'
```
```bash
# Send photo from local file
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendPhoto" \
-F "chat_id=${TELEGRAM_CHAT_ID}" \
-F "photo=@/path/to/image.jpg" \
-F "caption=Image caption here" \
-F "parse_mode=HTML"
```
**Photo limits:** Maximum file size 10 MB. The photo will be compressed. For uncompressed images up to 50 MB, use `sendDocument` instead.
### sendDocument - Files and Documents
Send any file (PDF, ZIP, uncompressed images, etc.):
```bash
# Send document by URL
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"document": "https://example.com/report.pdf",
"caption": "Download our latest report",
"parse_mode": "HTML"
}'
```
```bash
# Send document from local file
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument" \
-F "chat_id=${TELEGRAM_CHAT_ID}" \
-F "document=@/path/to/file.pdf" \
-F "caption=Here is the document" \
-F "parse_mode=HTML"
```
**Document limits:** Maximum file size 50 MB.
### sendPoll - Polls and Quizzes
Create interactive polls for engagement:
```bash
# Regular poll (multiple choice)
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendPoll" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"question": "What feature should we build next?",
"options": ["Dark mode", "Mobile app", "API access", "Integrations"],
"is_anonymous": false,
"allows_multiple_answers": false
}'
```
```bash
# Quiz mode (one correct answer)
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendPoll" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"question": "Which programming language was created first?",
"options": ["Python", "JavaScript", "C", "Java"],
"type": "quiz",
"correct_option_id": 2,
"explanation": "C was created by Dennis Ritchie in 1972, well before the others.",
"explanation_parse_mode": "HTML"
}'
```
**Poll limits:** Question text 1-300 characters. 2-10 options, each 1-100 characters. Explanation up to 200 characters.
### Inline Keyboard Buttons (CTAs)
Add clickable buttons below any message for calls-to-action:
```bash
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"text": "Check out our latest product!",
"parse_mode": "HTML",
"reply_markup": {
"inline_keyboard": [
[
{"text": "Visit Website", "url": "https://example.com"},
{"text": "View Demo", "url": "https://example.com/demo"}
],
[
{"text": "Read Blog Post", "url": "https://example.com/blog"}
]
]
}
}'
```
**Keyboard layout:** Each inner array is a row of buttons. Keep rows to 1-3 buttons for readability on mobile. Maximum 100 buttons total per message.
**Button types:**
- `url` - Opens a URL in the browser
- `callback_data` - Sends data back to the bot (requires a webhook to handle)
- `switch_inline_query` - Prompts the user to select a chat and send an inline query
### editMessageText - Edit Existing Messages
Update a previously sent message:
```bash
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/editMessageText" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"message_id": MESSAGE_ID_HERE,
"text": "Updated message text",
"parse_mode": "HTML"
}'
```
### deleteMessage - Delete a Message
Remove a message from the channel:
```bash
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/deleteMessage" \
-H "Content-Type: applicaRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.