Caspian Connect Telegram
TryCaspian/caspian-sdk
Connect Caspian Telegram for OpenCode, enable telegram in caspian.json channels, and tell the user to restart.
Send messages, images, and marketing content to Telegram channels and groups via Bot API.
$ npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install OpenClaudia/openclaudia-skills telegram-bot --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/telegram-bot .claude/skills/telegram-bot && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "telegram-bot" agent skill from https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-bot into .claude/skills/telegram-bot/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram-bot", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-botType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install OpenClaudia/openclaudia-skills telegram-bot --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/telegram-bot .agents/skills/telegram-bot && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "telegram-bot" agent skill from https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-bot into .agents/skills/telegram-bot/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram-bot", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install OpenClaudia/openclaudia-skills telegram-bot --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/telegram-bot .cursor/skills/telegram-bot && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "telegram-bot" agent skill from https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-bot into .cursor/skills/telegram-bot/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram-bot", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/OpenClaudia/openclaudia-skills.git --path skills/telegram-bot--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install OpenClaudia/openclaudia-skills telegram-bot --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/telegram-bot .gemini/skills/telegram-bot && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "telegram-bot" agent skill from https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-bot into .gemini/skills/telegram-bot/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram-bot", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install OpenClaudia/openclaudia-skills telegram-botInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/telegram-bot .github/skills/telegram-bot && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "telegram-bot" agent skill from https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-bot into .github/skills/telegram-bot/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram-bot", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install OpenClaudia/openclaudia-skills telegram-bot --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/telegram-bot .opencode/skills/telegram-bot && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "telegram-bot" agent skill from https://github.com/OpenClaudia/openclaudia-skills/tree/main/skills/telegram-bot into .opencode/skills/telegram-bot/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram-bot", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
telegram-botSend messages, images, and marketing content to Telegram channels and groups via Bot API.
Telegram Bot is an agent skill from OpenClaudia/openclaudia-skills. 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".
Its SKILL.md is about 6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Productivity & Automation, covering Chatbots and conversational support and Messaging and chat bots. It works with Telegram. The repository describes itself as: 77 open-source marketing skills for Claude Code, Codex, and other AI coding agents. SEO, content, email, ads, analytics, and growth. The licence is MIT.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 28bf209. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashWebFetchWebSearchFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
curljqFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.telegram.orgt.meFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
TELEGRAM_BOT_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Telegram Bot loads about 6k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 1,336 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
source ~/.claude/.env.global 2>/dev/nullsource .env 2>/dev/nullsource .env.local 2>/dev/null" 3. Copy the token and add it to your .env or ~/.claude/.env.global:"echo " 5. Add it to your .env or ~/.claude/.env.global:"re the token as `TELEGRAM_BOT_TOKEN` in `.env` or `~/.claude/.env.global`.source ~/.claude/.env.global 2>/dev/nullsource ~/.claude/.env.global 2>/dev/nullsource .env 2>/dev/nullsource .env.local 2>/dev/nullAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from OpenClaudia/openclaudia-skills at commit 28bf209, republished under its MIT licence (© OpenClaudia). 1,336 words, ~6,036 tokens.
.claude/skills/telegram-bot/SKILL.md (or your agent's skills folder).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.
Check for required credentials before any API call:
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}"
fiIf the user does not have a bot yet, walk them through this process:
/newbot to BotFather.bot (e.g., my_marketing_bot).123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11.TELEGRAM_BOT_TOKEN in .env or ~/.claude/.env.global./setdescription - Set the bot's description/setabouttext - Set the "About" section/setuserpic - Upload a profile photo for the botFor public channels, use @channel_username as the chat ID.
For private channels and groups, retrieve the numeric chat ID:
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 -uPrivate channel and group IDs are negative numbers (e.g., -1001234567890).
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:
source ~/.claude/.env.global 2>/dev/null
source .env 2>/dev/null
source .env.local 2>/dev/nullSend a text message to a channel or group:
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.
Send a photo by URL or file ID:
# 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"
}'# 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.
Send any file (PDF, ZIP, uncompressed images, etc.):
# 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"
}'# 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.
Create interactive polls for engagement:
# 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
}'# 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.
Add clickable buttons below any message for calls-to-action:
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 browsercallback_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 queryUpdate a previously sent message:
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"
}'Remove a message from the channel:
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/deleteMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"message_id": MESSAGE_ID_HERE
}'Pin a message to the top of the channel or group:
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/pinChatMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"message_id": MESSAGE_ID_HERE,
"disable_notification": true
}'Set "parse_mode": "HTML" and use these tags:
| Tag | Result | Example |
|---|---|---|
<b>text</b> | Bold | <b>Important</b> |
<i>text</i> | Italic | <i>Note:</i> |
<u>text</u> | Underline | <u>highlight</u> |
<s>text</s> | <s>old price</s> | |
<code>text</code> | Monospace | <code>variable</code> |
<pre>text</pre> | Code block | <pre>code block</pre> |
<a href="url">text</a> | Link | <a href="https://example.com">Click here</a> |
<tg-emoji emoji-id="ID">emoji</tg-emoji> | Custom emoji | Premium feature |
<blockquote>text</blockquote> | Block quote | <blockquote>Quote</blockquote> |
<tg-spoiler>text</tg-spoiler> | Spoiler | <tg-spoiler>Hidden</tg-spoiler> |
HTML escaping rules: Replace & with &, < with <, > with > in all text that is not part of an HTML tag. Unrecognized tags are stripped. Tags must be properly closed.
Set "parse_mode": "MarkdownV2" and use this syntax:
| Syntax | Result |
|---|---|
*bold* | Bold |
_italic_ | Italic |
__underline__ | Underline |
~strikethrough~ | |
`code` | Monospace |
```code block``` | Code block |
[text](url) | Link |
| ` | |
>blockquote | Block quote (start of line) |
MarkdownV2 escaping rules: These characters MUST be escaped with a preceding backslash outside of code blocks: _ * [ ] ( ) ~ > # + - = | { } . !. This makes MarkdownV2 error-prone. HTML mode is recommended for most use cases to avoid escaping issues.
\n\n) to separate sections visually.<b><i>bold italic</i></b> works in HTML mode.<a href="https://example.com">Click here</a>."disable_notification": true to the request body.curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"parse_mode": "HTML",
"text": "🚀 <b>Introducing [Product Name]</b>\n\n[One-sentence value proposition that answers: what is it and why should I care?]\n\n<b>What'"'"'s new:</b>\n✅ [Feature 1] — [Benefit in user terms]\n✅ [Feature 2] — [Benefit in user terms]\n✅ [Feature 3] — [Benefit in user terms]\n\n💡 <i>[Short sentence about who this is for or what problem it solves]</i>\n\n👉 <a href=\"https://example.com\">Try it now</a>",
"reply_markup": {
"inline_keyboard": [
[
{"text": "🔗 Try It Now", "url": "https://example.com"},
{"text": "📖 Learn More", "url": "https://example.com/blog"}
]
]
}
}'curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"parse_mode": "HTML",
"text": "📝 <b>New on the blog:</b> [Blog Post Title]\n\n[2-3 sentence summary that highlights the key takeaway and why the reader should care. Pull out the most surprising insight or actionable tip.]\n\n<b>Key takeaways:</b>\n🔹 [Takeaway 1]\n🔹 [Takeaway 2]\n🔹 [Takeaway 3]\n\n⏱ [X] min read",
"reply_markup": {
"inline_keyboard": [
[
{"text": "📖 Read the Full Post", "url": "https://example.com/blog/post-slug"}
]
]
}
}'curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"parse_mode": "HTML",
"text": "📢 <b>[Brand] Weekly Update — [Date]</b>\n\nHey everyone! Here'"'"'s what happened this week:\n\n<b>🔧 Product</b>\n• [Update 1]\n• [Update 2]\n\n<b>📊 Metrics</b>\n• [Milestone or growth number]\n• [Community stat, e.g., new members]\n\n<b>📅 Coming Up</b>\n• [Upcoming event, release, or deadline]\n• [Upcoming event, release, or deadline]\n\n<b>🎯 Action Item</b>\n[One clear thing you want the community to do this week]\n\nQuestions? Drop them below 👇"
}'# First, send the image with caption
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/launch-banner.jpg",
"caption": "🎉 <b>[Product Name] is LIVE!</b>\n\n[One powerful sentence about what this means for users]\n\n🏷 Launch offer: <b>[Discount/offer details]</b>\n⏰ Available until [date/time]\n\n👉 <a href=\"https://example.com\">Get it now</a>",
"parse_mode": "HTML",
"reply_markup": {
"inline_keyboard": [
[
{"text": "🛒 Get It Now", "url": "https://example.com/buy"},
{"text": "🎥 Watch Demo", "url": "https://example.com/demo"}
],
[
{"text": "💬 Join Discussion", "url": "https://t.me/community_group"}
]
]
}
}'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 should we focus on next? 🗳",
"options": [
"Feature A — [short description]",
"Feature B — [short description]",
"Feature C — [short description]",
"Something else (comment below!)"
],
"is_anonymous": false,
"allows_multiple_answers": false
}'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": "[Interesting question related to your niche]?",
"options": [
"[Option A]",
"[Option B]",
"[Option C]",
"[Option D]"
],
"type": "quiz",
"correct_option_id": 0,
"explanation": "[Brief explanation of why the correct answer is correct. Include a fun fact or link to learn more.]",
"explanation_parse_mode": "HTML",
"is_anonymous": false
}'curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"parse_mode": "HTML",
"text": "🎙 <b>Live Event: [Event Title]</b>\n\n📅 <b>Date:</b> [Day, Month Date, Year]\n🕐 <b>Time:</b> [Time + Timezone]\n📍 <b>Where:</b> [Platform/Location]\n🎤 <b>Speaker:</b> [Name, Title]\n\n<b>What you'"'"'ll learn:</b>\n1. [Topic 1]\n2. [Topic 2]\n3. [Topic 3]\n\n🎁 <i>Bonus: [Incentive for attending, e.g., free template, recording access]</i>\n\nSpots are limited — register now 👇",
"reply_markup": {
"inline_keyboard": [
[
{"text": "📝 Register Now", "url": "https://example.com/event"}
],
[
{"text": "📅 Add to Calendar", "url": "https://example.com/calendar-link"}
]
]
}
}'Telegram Bot API does not have a built-in scheduling feature. Use these approaches for scheduled content delivery.
sleep (Simple)For one-off scheduled messages from the terminal:
# Send a message after a delay (e.g., 2 hours = 7200 seconds)
echo "Message scheduled. Will send at $(date -v+2H '+%Y-%m-%d %H:%M:%S' 2>/dev/null || date -d '+2 hours' '+%Y-%m-%d %H:%M:%S' 2>/dev/null)"
sleep 7200 && 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": "Scheduled message content here",
"parse_mode": "HTML"
}'at Command (Specific Time)Schedule a message for a specific date and time:
# Create the send script
cat > /tmp/telegram_scheduled.sh << 'SCRIPT'
source ~/.claude/.env.global 2>/dev/null
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 scheduled message here",
"parse_mode": "HTML"
}'
SCRIPT
chmod +x /tmp/telegram_scheduled.sh
# Schedule it (macOS/Linux)
echo "bash /tmp/telegram_scheduled.sh" | at 09:00 AM tomorrowFor recurring messages (daily tips, weekly digests):
# Edit crontab
# Example: Send every weekday at 9:00 AM
# 0 9 * * 1-5 bash /path/to/telegram_post.sh
crontab -l 2>/dev/null > /tmp/crontab_backup
echo "0 9 * * 1-5 source ~/.claude/.env.global && 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\": \"Good morning! Here is your daily tip.\", \"parse_mode\": \"HTML\"}'" >> /tmp/crontab_backup
crontab /tmp/crontab_backupPrepare multiple messages and send them with delays between each:
# Create a batch of messages as a JSON array, then iterate
messages=(
"Message 1: Monday motivation"
"Message 2: Tuesday tip"
"Message 3: Wednesday wisdom"
)
DELAY=86400 # 24 hours between messages
for i in "${!messages[@]}"; do
if [ "$i" -gt 0 ]; then
echo "Waiting ${DELAY}s before next message..."
sleep ${DELAY}
fi
echo "Sending message $((i+1)) of ${#messages[@]}..."
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": "'"${messages[$i]}"'",
"parse_mode": "HTML"
}'
echo ""
doneIf the user manages multiple channels, accept a list of chat IDs and broadcast to all:
# Define target channels
CHANNELS=("-1001234567890" "-1009876543210" "@public_channel")
MESSAGE='<b>Announcement</b>\n\nThis message goes to all channels.'
for CHAT_ID in "${CHANNELS[@]}"; do
echo "Sending to ${CHAT_ID}..."
curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${CHAT_ID}"'",
"text": "'"${MESSAGE}"'",
"parse_mode": "HTML"
}'
echo ""
sleep 1 # Respect rate limits
donecurl -s "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getChat?chat_id=${TELEGRAM_CHAT_ID}" | jq .curl -s "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getChatMemberCount?chat_id=${TELEGRAM_CHAT_ID}" | jq .curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/setChatDescription" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'"${TELEGRAM_CHAT_ID}"'",
"description": "Your channel description here (up to 255 characters)"
}'sleep 1 between sends when broadcasting.| Practice | Details |
|---|---|
| Post frequency | 1-3 posts per day for active channels. More than 5 risks mute/unsubscribe. |
| Best times | 9-11 AM and 6-8 PM in your audience's primary timezone. |
| Message length | Keep under 1,000 characters for feed posts. Long-form is fine for articles. |
| Media | Posts with images get 2-3x more engagement than text-only. |
| Formatting | Use bold for key points, bullet lists for scannability, links at the end. |
| Engagement | Ask questions. Use polls weekly. Reply to comments promptly. |
| Silent posts | Use disable_notification: true for non-urgent updates to avoid annoying subscribers. |
| Pin messages | Pin important announcements. Unpin old ones to keep the pinned area relevant. |
| Link previews | Telegram auto-generates link previews. To disable, set disable_web_page_preview: true. |
When the user asks to post content to Telegram:
TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID are set.message_id for future reference (editing, deleting, pinning).Never auto-post without explicit user confirmation.
Before composing a Telegram message, collect these inputs:
TELEGRAM_CHAT_ID or ask for a specific one.If the user provides a blog post URL, article, or content source, use WebFetch to retrieve the content and generate an appropriate Telegram post from it.
Common Telegram Bot API errors and how to resolve them:
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid bot token | Regenerate token via @BotFather |
400 Bad Request: chat not found | Wrong chat ID or bot not in chat | Verify chat ID; add bot to channel as admin |
403 Forbidden: bot is not a member | Bot was removed from the channel | Re-add the bot as a channel admin |
403 Forbidden: bot can't send messages | Bot lacks posting permissions | Grant the bot "Post Messages" admin right |
429 Too Many Requests | Rate limit exceeded | Wait the retry_after seconds specified in the response |
400 Bad Request: can't parse entities | Malformed HTML/Markdown | Check formatting; escape special characters; switch to HTML mode |
Always check the ok field in the API response. If ok is false, display the description field to the user with guidance on how to fix the issue.
© OpenClaudia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/telegram-bot of OpenClaudia/openclaudia-skills.
Open the folder on GitHubat commit 28bf209
Telegram Bot next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Telegram Bot this skillOpenClaudia/openclaudia-skills | 711 | — | ~6k | Automated safety check: Notes | MIT | |
| Caspian Connect TelegramTryCaspian/caspian-sdk | 973 | — | ~446 | Automated safety check: Notes | Apache-2.0 | |
| Telegramolasunkanmi-SE/codebuddy | 141 | — | ~817 | Automated safety check: Pass | MIT | |
| Telegram Channel Setupanthropics/claude-plugins-official | 38k | 1 repos | ~1.1k | Automated safety check: Notes | Apache-2.0 | |
| Chat SDKdatabuddy-analytics/Databuddy | 1.2k | — | ~2.6k | Automated safety check: Pass | AGPL-3.0 | |
| Pytdbotpytdbot/client | 137 | — | ~4.3k | Automated safety check: Pass | MIT |
TryCaspian/caspian-sdk
Connect Caspian Telegram for OpenCode, enable telegram in caspian.json channels, and tell the user to restart.
olasunkanmi-SE/codebuddy
Send Telegram messages, files, and interact with Telegram bots via the telegram-send CLI tool.
anthropics/claude-plugins-official
Saves a Telegram bot token for the Telegram channel plugin and reviews who may message the bot, steering the policy toward a fixed allowlist.
databuddy-analytics/Databuddy
Build multi-platform chat bots with Chat SDK (chat npm package).
pytdbot/client
Write Telegram bots and userbots with Pytdbot (async TDLib wrapper with high-level helpers; not the Telegram Bot API).
terranc/claude-telegram-bot-bridge
Install and configure the Telegram Skill Bot. An agent skill from terranc/claude-telegram-bot-bridge.
OpenClaudia/openclaudia-skills
Build an interactive competitive-traffic report for any company and its rivals — monthly visits (SimilarWeb), organic search traffic and Domain Rating (Ahrefs) — as one self-contained HTML page with…
OpenClaudia/openclaudia-skills
Score how hard a keyword is to rank for in the AI-search era — page-level URL Rating of real competitors (not just domain DR), Ahrefs keyword difficulty, and whether a given site already ranks or is…
OpenClaudia/openclaudia-skills
Audit EVERY Google Search Console property at once — rank all sites by clicks and impressions with period-over-period deltas, then diff keywords per site to surface what is newly ranking, rising…
OpenClaudia/openclaudia-skills
Fetch website traffic estimates (monthly visits, traffic sources, top countries, keywords, engagement, ranks) for any domain from SimilarWeb.
OpenClaudia/openclaudia-skills
Manages Ahrefs API usage in Python using ahrefs-python library.
OpenClaudia/openclaudia-skills
Design, plan, and analyze A/B tests with statistical rigor. An agent skill from OpenClaudia/openclaudia-skills.
Works with
Categories
Send messages, images, and marketing content to Telegram channels and groups via Bot API. Telegram Bot is an agent skill from OpenClaudia/openclaudia-skills. Send messages, images, and marketing content to Telegram channels and groups via Bot API.
Telegram Bot fits situations like: phrases: post to telegram; telegram message; telegram channel; telegram marketing.
Run `npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a claude-code`. Or copy the skill folder (skills/telegram-bot in OpenClaudia/openclaudia-skills) into .claude/skills/telegram-bot in your project. Claude Code loads it when a task matches its description.
Run `npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a codex`. Or copy the skill folder (skills/telegram-bot in OpenClaudia/openclaudia-skills) into .agents/skills/telegram-bot in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenClaudia/openclaudia-skills --skill telegram-bot -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/telegram-bot, .gemini/skills/telegram-bot, .github/skills/telegram-bot and .opencode/skills/telegram-bot in your project.
Going by SKILL.md and its folder, Telegram Bot needs the command-line tools its instructions call (curl and jq) and credentials named TELEGRAM_BOT_TOKEN. Our summary lists: A credential in TELEGRAM_BOT_TOKEN. Its frontmatter pre-approves these tools: Bash, WebFetch, WebSearch.
SKILL.md names 2 domains. In commands or code: api.telegram.org and t.me; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Telegram Bot is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6k tokens (SKILL.md is roughly 24k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Telegram Bot: Caspian Connect Telegram (TryCaspian/caspian-sdk, 973 stars), Telegram (olasunkanmi-SE/codebuddy, 141 stars), Telegram Channel Setup (anthropics/claude-plugins-official, 38k stars) and Chat SDK (databuddy-analytics/Databuddy, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
OpenClaudia (a GitHub organization) maintains it in OpenClaudia/openclaudia-skills, which has 711 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on September 18, 2026.
Source: OpenClaudia/openclaudia-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.