Agent skill

Telegram

by glebis in glebis/claude-skills

This skill should be used when fetching, searching, downloading, sending, editing, or publishing messages on Telegram.

MITAuto-check passed

Install Telegram

skills CLI
$ npx skills add glebis/claude-skills --skill telegram -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install glebis/claude-skills telegram --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/glebis/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/telegram .claude/skills/telegram && rm -rf skills-src

Use ~/.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/

Facts

Skill name
telegram
GitHub stars
389
Token cost
~3.1k tokens
SKILL.md length
920 words
Files
4 (incl. scripts)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when fetching, searching, downloading, sending, editing, or publishing messages on Telegram.

  • Works in 4 steps: Get API credentials from… → Clone telegram_dl:… → Run python telegram_dl.py and follow… → …
  • Queries like show my Telegram messages
  • SKILL.md covers Prerequisites, Quick Start, Commands and Output Options, plus 3 more sections
  • Runs Python scripts from its folder; calls python3, python and pip; reaches t.me

What it does

Telegram is an agent skill from glebis/claude-skills. This skill should be used when fetching, searching, downloading, sending, editing, or publishing messages on Telegram. Use for queries like "show my Telegram messages", "search Telegram for...", "get unread messages", "send a message to...", "edit that message", "publish this draft to klodkot", or "add Telegram messages to my notes".

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `.claude-plugin/plugin.json`, `scripts/bot_send.py` and `scripts/telegram_fetch.py`).

It works with Telegram. The repository describes itself as: Collection of Claude Code skills for enhanced AI workflows. The licence is MIT.

When your agent uses it

  • Queries like show my Telegram messages
  • Search Telegram for...
  • Get unread messages
  • Send a message to...

Example prompts

  • “show my Telegram messages”
  • “search Telegram for...”
  • “get unread messages”
  • “/telegram”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Get API credentials from https://my.telegram.org/auth
  2. Clone telegram_dl: https://github.com/glebis/telegram_dl
  3. Run python telegram_dl.py and follow interactive prompts
  4. Verify with python3 scripts/telegram_fetch.py setup

What it can do on your machine

Read from SKILL.md and the folder at commit 7524dff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • t.me

    Also links to:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Telegram loads about 3.1k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 920 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

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.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated 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); the scripts in this folder are not scanned.

SKILL.md

The full file from glebis/claude-skills at commit 7524dff, republished under its MIT licence (© glebis). 920 words, ~3,058 tokens.

Download SKILL.mdSave it as .claude/skills/telegram/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
telegram
description
This skill should be used when fetching, searching, downloading, sending, editing, or publishing messages on Telegram. Use for queries like "show my Telegram messages", "search Telegram for...", "get unread messages", "send a message to...", "edit that message", "publish this draft to klodkot", or "add Telegram messages to my notes".

Telegram Message Skill

Fetch, search, download, send, and publish Telegram messages with flexible filtering and output options.

Prerequisites

Authentication must be configured in ~/.telegram_dl/. Run setup command to check status or get instructions:

bash
python3 scripts/telegram_fetch.py setup

If not configured, follow these steps:

  1. Get API credentials from https://my.telegram.org/auth
  2. Clone telegram_dl: https://github.com/glebis/telegram_dl
  3. Run python telegram_dl.py and follow interactive prompts
  4. Verify with python3 scripts/telegram_fetch.py setup

Quick Start

Run the script at scripts/telegram_fetch.py with appropriate commands:

bash
# List available chats
python3 scripts/telegram_fetch.py list

# Get recent messages
python3 scripts/telegram_fetch.py recent --limit 20

# Search messages
python3 scripts/telegram_fetch.py search "meeting"

# Get unread messages
python3 scripts/telegram_fetch.py unread

Commands

List Chats

To see available Telegram chats:

bash
python3 scripts/telegram_fetch.py list
python3 scripts/telegram_fetch.py list --limit 50
python3 scripts/telegram_fetch.py list --search "AI"
python3 scripts/telegram_fetch.py list --search "claude code глеб + саши" --exact

Options:

  • --search "text": Filter by substring match (case-insensitive)
  • --exact: Require exact name match instead of substring (use with --search)
  • --limit N: Max chats to retrieve (default: 30, increase if chat not found)

Important: If you're looking for a specific chat by exact name and it's not found, increase --limit to 100 or 200, as the chat may not be in the most recent 30.

Returns JSON with chat IDs, names, types, and unread counts.

Fetch Recent Messages

To get recent messages:

bash
# From all chats (last 50 messages across top 10 chats)
python3 scripts/telegram_fetch.py recent

# From specific chat
python3 scripts/telegram_fetch.py recent --chat "Tool Building Ape"
python3 scripts/telegram_fetch.py recent --chat-id 123456789

# With limits
python3 scripts/telegram_fetch.py recent --limit 100
python3 scripts/telegram_fetch.py recent --days 7
Search Messages

To search message content:

bash
# Global search across all chats
python3 scripts/telegram_fetch.py search "project deadline"

# Search in specific chat
python3 scripts/telegram_fetch.py search "meeting" --chat-id 123456789

# Limit results
python3 scripts/telegram_fetch.py search "important" --limit 20
Fetch Unread Messages

To get only unread messages:

bash
python3 scripts/telegram_fetch.py unread
python3 scripts/telegram_fetch.py unread --chat-id 123456789
Send Messages

To send a message to a chat:

bash
# Send to existing chat by name
python3 scripts/telegram_fetch.py send --chat "John Doe" --text "Hello!"

# Send to username (works even without prior conversation)
python3 scripts/telegram_fetch.py send --chat "@username" --text "Hello!"

# Reply to a specific message (use message ID from recent/search output)
python3 scripts/telegram_fetch.py send --chat "Tool Building Ape" --text "Thanks!" --reply-to 12345

# Send to a forum topic (for groups with topics enabled)
python3 scripts/telegram_fetch.py send --chat "Group Name" --text "Hello topic!" --topic 12

# Send with markdown formatting (converts **bold**, _italic_, [links](url) to Telegram HTML)
python3 scripts/telegram_fetch.py send --chat "@username" --text "**Bold** and _italic_ text" --markdown

Formatting (--markdown flag):

  • Without --markdown: text is sent as-is (plain text, no formatting)
  • With --markdown: converts markdown to Telegram HTML (**bold** -> bold, _italic_ -> italic, [text](url) -> link, ## Header -> bold, * item -> arrow list)
  • IMPORTANT: Always use --markdown when sending draft content that contains markdown formatting
  • The publish command handles markdown conversion automatically; the send command does NOT unless --markdown is specified
Send Files

To send images, documents, or videos:

bash
# Send an image
python3 scripts/telegram_fetch.py send --chat "John Doe" --file "/path/to/image.jpg"

# Send document with caption
python3 scripts/telegram_fetch.py send --chat "@username" --file "report.pdf" --text "Here's the report"

# Reply with media
python3 scripts/telegram_fetch.py send --chat "Group" --file "screenshot.png" --reply-to 12345

Chat resolution order:

  1. @username - Resolves Telegram username directly
  2. Numeric ID - Resolves chat by Telegram ID
  3. Name match - Fuzzy search in existing dialogs

Returns JSON with send status, resolved chat name, message ID, and file info (for media).

Edit Messages

To edit an existing message:

bash
# Edit a message by ID
python3 scripts/telegram_fetch.py edit --chat "@mentalhealthtech" --message-id 76 --text "Updated text"

# Edit in a group/channel
python3 scripts/telegram_fetch.py edit --chat "Mental health tech" --message-id 123 --text "Corrected content"

Note: You can only edit your own messages. Telegram formatting (bold, etc.) is preserved.

Returns JSON with edit status and message ID.

Download Attachments

To download media files from a chat:

bash
# Download last 5 attachments from a chat (default)
python3 scripts/telegram_fetch.py download --chat "Tool Building Ape"

# Download last 10 attachments
python3 scripts/telegram_fetch.py download --chat "Project Group" --limit 10

# Download to custom directory
python3 scripts/telegram_fetch.py download --chat "@username" --output "/path/to/folder"

# Download from specific message
python3 scripts/telegram_fetch.py download --chat "John Doe" --message-id 12345

Default output: ~/Downloads/telegram_attachments/

Returns JSON with download results (file names, paths, sizes).

Fetch Forum Thread Messages

To get messages from a specific forum thread (topics in groups):

bash
# Fetch from thread 174 in Claude Code Lab
python3 scripts/telegram_fetch.py thread --chat-id -1003237581133 --thread-id 174

# Fetch with custom limit
python3 scripts/telegram_fetch.py thread --chat-id -1003237581133 --thread-id 174 --limit 50

# Save to file
python3 scripts/telegram_fetch.py thread --chat-id -1003237581133 --thread-id 174 -o ~/thread.md

# Append to daily note
python3 scripts/telegram_fetch.py thread --chat-id -1003237581133 --thread-id 174 --to-daily

# JSON output
python3 scripts/telegram_fetch.py thread --chat-id -1003237581133 --thread-id 174 --json

Messages are sorted newest first (reverse chronological order).

How to find thread ID:

  • Forum topic IDs appear in the thread URL: https://t.me/c/CHAT_ID/THREAD_ID
  • Use recent command on the chat to see message IDs in threads

Returns markdown or JSON with all messages from the specified thread.

Publish Draft to Channel

To publish a draft from the klodkot channel to Telegram:

bash
# Dry run (preview without sending)
python3 scripts/telegram_fetch.py publish --draft "Channels/klodkot/drafts/20260122-anthropic-consciousness-question.md" --dry-run

# Publish to channel
python3 scripts/telegram_fetch.py publish --draft "Channels/klodkot/drafts/20260122-anthropic-consciousness-question.md"

Workflow:

  1. Parses draft frontmatter and body
  2. Validates channel field (must be "klodkot")
  3. Extracts media references from frontmatter video: field and wikilinks
  4. Resolves media paths in Channels/klodkot/attachments/ or Sources/
  5. Strips draft headers (e.g., "# Title - Telegram Draft")
  6. Appends footer if not present: "КЛОДКОТ — Claude Code и другие агенты: инструменты, кейсы, вдохновение"
  7. Sends to @klodkot channel (multiple media as album)
  8. Updates frontmatter with published_date, telegram_message_id
  9. Moves file from drafts/ to published/
  10. Updates channel index with new entry at top

Media handling:

  • Frontmatter: video: filename.mp4
  • Wikilinks: [[filename.mp4]], [[image.png|alt text]]
  • Multiple media sent as Telegram album

Safety:

  • --dry-run shows preview without sending
  • Validates before sending
  • Rollback on send failure (file not moved)
  • Warnings on post-publish errors (file sent but move/index update failed)

Returns: JSON with publish status, message ID, warnings (if any)

Show full SKILL.md (367 more words)Show less

Output Options

Default (Markdown to stdout)

By default, outputs formatted markdown suitable for Claude to read and summarize.

JSON Format

Add --json flag for structured data:

bash
python3 scripts/telegram_fetch.py recent --json
Append to Obsidian Daily Note

Add messages to today's daily note in the vault:

bash
python3 scripts/telegram_fetch.py recent --to-daily
python3 scripts/telegram_fetch.py search "project" --to-daily

Appends to ~/Brains/brain/Daily/YYYYMMDD.md

Append to Person's Note

Add messages to a specific person's note:

bash
python3 scripts/telegram_fetch.py recent --chat "John Doe" --to-person "John Doe"

Creates or appends to ~/Brains/brain/{PersonName}.md

Save to File (Token-Efficient)

Save messages directly to file without consuming context tokens:

bash
# Save 100 messages to markdown file
python3 scripts/telegram_fetch.py recent --chat "AGENCY: Community" --limit 100 -o ~/chat_archive.md

# Save with media files downloaded to same folder
python3 scripts/telegram_fetch.py recent --chat "Project Group" --limit 50 -o ~/project/archive.md --with-media

# Save search results to file
python3 scripts/telegram_fetch.py search "meeting" -o ~/meetings.md

Returns JSON with save status (file path, message count, media download results) - minimal token usage.

Example User Requests

When user asks:

  • "Show my recent Telegram messages" -> recent --limit 20
  • "What Telegram messages did I get today?" -> recent --days 1
  • "Search Telegram for messages about the project" -> search "project"
  • "Get unread messages from Tool Building Ape" -> unread + filter output
  • "Add my Telegram messages to daily note" -> recent --to-daily
  • "What chats do I have on Telegram?" -> list
  • "Find the exact chat named X" -> list --search "X" --exact --limit 200
  • "Send hello to John on Telegram" -> send --chat "John" --text "Hello!"
  • "Message @username on Telegram" -> send --chat "@username" --text "..."
  • "Reply to that message with thanks" -> send --chat "..." --text "Thanks!" --reply-to <id>
  • "Send this image to John" -> send --chat "John" --file "/path/to/image.jpg"
  • "Send report.pdf with caption" -> send --chat "..." --file "report.pdf" --text "Here's the report"
  • "Send to topic 12 in Group" -> send --chat "Group" --text "..." --topic 12
  • "Download attachments from Tool Building Ape" -> download --chat "Tool Building Ape"
  • "Download last 10 files from Project Group" -> download --chat "Project Group" --limit 10
  • "Save last 100 messages from AGENCY to file" -> recent --chat "AGENCY: Community" --limit 100 -o ~/agency.md
  • "Archive chat with media" -> recent --chat "Group" -o ~/archive.md --with-media
  • "Edit that message" -> edit --chat "..." --message-id <id> --text "new text"
  • "Fix the typo in message 123" -> edit --chat "..." --message-id 123 --text "corrected text"
  • "Is Telegram configured?" -> setup
  • "How do I set up Telegram?" -> setup (returns instructions if not configured)
  • "Publish this draft to klodkot" -> publish --draft "Channels/klodkot/drafts/...md"
  • "Preview this draft before publishing" -> publish --draft "..." --dry-run

Rate Limiting

The script includes built-in rate limiting (0.1s between messages) and handles Telegram's FloodWaitError automatically with backoff.

Dependencies

Requires Python packages:

  • telethon - Telegram API client
  • pyyaml - YAML parsing for draft frontmatter

Install with: pip install telethon pyyaml

© glebis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in telegram of glebis/claude-skills.

  • SKILL.md
  • .claude-plugin/plugin.json
  • scripts/bot_send.py
  • scripts/telegram_fetch.py

Open the folder on GitHubat commit 7524dff

Compare with similar skills

Telegram 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.

Telegram compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Telegram this skillglebis/claude-skills389—~3.1kAutomated safety check: PassMIT
Process Inboxtelegramdesktop/tdesktop33k2 repos~4.5kAutomated safety check: PassGPL-3.0
Perform Tasktelegramdesktop/tdesktop33k2 repos~3kAutomated safety check: PassGPL-3.0
Custom Mode Creator for claude-memthedotmack/claude-mem98k—~2.4kAutomated safety check: PassApache-2.0
Continuetelegramdesktop/tdesktop33k2 repos~9.4kAutomated safety check: PassGPL-3.0
Rebasetelegramdesktop/tdesktop33k1 repos~3.7kAutomated safety check: PassGPL-3.0

Similar skills

  • Process Inbox

    telegramdesktop/tdesktop

    Process the local ignored ai-tdesktop inbox into durable, independently testable Telegram Desktop task records while task execution worktrees remain active.

    33k GitHub starsUsed in 2 repos~4.5k tokens
    Productivity & AutomationAuto-check passed
  • Perform Task

    telegramdesktop/tdesktop

    Resolve, start or resume, implement, review, test, and publish exactly one existing ai-tdesktop task by short slug or full dated id, including rare blocked retries and split-required results.

    33k GitHub starsUsed in 2 repos~3k tokens
    Productivity & AutomationAuto-check passed
  • Walks you through creating, installing and verifying a custom claude-mem mode, including note types, tags and optional Telegram alerts for chosen memories.

    98k GitHub stars~2.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Continue

    telegramdesktop/tdesktop

    Continue autonomous Telegram Desktop development from the shared ai-tdesktop repository.

    33k GitHub starsUsed in 2 repos~9.4k tokens
    Productivity & AutomationAuto-check passed
  • Rebase

    telegramdesktop/tdesktop

    Drive an intent-aware rebase of the current checkout, resolving every conflict by reading the history behind both sides instead of by making the markers disappear.

    33k GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check passed
  • Claude To Im

    op7418/Claude-to-IM-skill

    Bridge THIS Claude Code or Codex session to Telegram, Discord, Feishu/Lark, QQ, or WeChat so the user can chat with Claude from their phone.

    2.9k GitHub stars~3.4k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check: notes

More from glebis/claude-skills

All 91 skills in this repo
  • Runs a human-first workflow for labeling PII spans in a transcript, then scores inter-annotator agreement and drafts an adjudicated gold set.

    389 GitHub stars~1.3k tokensUpdated 12 days ago
    Auto-check passed
  • Automates a dedicated, logged-in Chrome instance per profile without ever closing the user's own open tabs or browser windows.

    389 GitHub stars~973 tokensUpdated 12 days ago
    Auto-check passed
  • Deep Research

    glebis/claude-skills

    This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API.

    389 GitHub stars~2.6k tokensUpdated 12 days ago
    Auto-check: notes
  • Elimination Research

    glebis/claude-skills

    This skill should be used for elimination-style research where the user wants to choose from a shortlist of products, tools, services, vendors, or other options using explicit criteria, numeric…

    389 GitHub stars~1.6k tokensUpdated 12 days ago
    Auto-check passed
  • Narrated HTML Presentations

    glebis/claude-skills

    Generates a self-contained HTML presentation with article and slides modes, ElevenLabs voiceover narration and optional GPT Image 2 illustrations.

    389 GitHub stars~2.3k tokensUpdated 12 days ago
    Auto-check: notes
  • Writes fictional but realistic coaching or therapy session transcripts for evals, demos and few-shot examples, in several modalities and export formats.

    389 GitHub stars~2.9k tokensUpdated 12 days ago
    Auto-check passed

Works with

Questions about Telegram

What does Telegram do?

This skill should be used when fetching, searching, downloading, sending, editing, or publishing messages on Telegram. Telegram is an agent skill from glebis/claude-skills. This skill should be used when fetching, searching, downloading, sending, editing, or publishing messages on Telegram.

When should I use Telegram?

Telegram fits situations like: queries like show my Telegram messages; search Telegram for..; get unread messages; send a message to...

How do I install Telegram in Claude Code?

Run `npx skills add glebis/claude-skills --skill telegram -a claude-code`. Or copy the skill folder (telegram in glebis/claude-skills) into .claude/skills/telegram in your project. Claude Code loads it when a task matches its description.

How do I install Telegram in Codex?

Run `npx skills add glebis/claude-skills --skill telegram -a codex`. Or copy the skill folder (telegram in glebis/claude-skills) into .agents/skills/telegram in your project. Codex loads it when a task matches its description.

Can I use Telegram in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add glebis/claude-skills --skill telegram -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, .gemini/skills/telegram, .github/skills/telegram and .opencode/skills/telegram in your project.

What does Telegram need to run?

Going by SKILL.md and its folder, Telegram needs Python for the scripts in its folder and the command-line tools its instructions call (python3, python and pip). Our summary lists: Python 3.

Does Telegram access the network?

SKILL.md names 2 domains. In commands or code: t.me; the agent is likely to contact it when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.

Is Telegram safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Telegram use?

Telegram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Telegram use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Telegram?

Skills that share tags, products or a category with Telegram: Process Inbox (telegramdesktop/tdesktop, 33k stars), Perform Task (telegramdesktop/tdesktop, 33k stars), Custom Mode Creator for claude-mem (thedotmack/claude-mem, 98k stars) and Continue (telegramdesktop/tdesktop, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Telegram?

glebis (a GitHub user) maintains it in glebis/claude-skills, which has 389 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on September 26, 2026.

Source: glebis/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.