telegram

Fetch, search, send, and download Telegram messages via a Telethon CLI.

Updated Dec 25, 2025
One-click install
npx skills add https://github.com/PytaichukBohdan/DanaCockFightBot --skill telegram
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: telegram
Source: https://github.com/PytaichukBohdan/DanaCockFightBot/tree/main/.claude/skills/telegram
Command: npx skills add https://github.com/PytaichukBohdan/DanaCockFightBot --skill telegram

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires telethon, and includes scripts (resource) components.

What problem does it solve?

Fetch, search, download, and send Telegram messages with flexible filtering and output options. It enables users to manage Telegram conversations directly from Claude Code and integrate results into notes, reports, or daily workflows.

Core Features & Use Cases

  • List chats: display available chats with unread counts.
  • Fetch recent messages: retrieve messages from specific chats or across chats.
  • Search messages: perform content search across chats.
  • Send messages/files: send text or attachments to chats or users.
  • Download attachments: fetch media from chats to a local folder.
  • Output options: output as Markdown or JSON; optionally append to daily or person notes.

Quick Start

Example commands to get started:

  • List chats: python3 scripts/telegram_fetch.py list
  • Fetch recent messages: python3/scripts/telegram_fetch.py recent --limit 20 --chat "Tool Building Ape"
  • Search messages: python3/scripts/telegram_fetch.py search "project update" --limit 20 --chat-id 123456789
  • Send a message: python3/scripts/telegram_fetch.py send --chat "John Doe" --text "Hello!"

Frequently Asked Questions about telegram

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch and search Telegram messages programmatically?

Fetch Telegram messages using the Telethon-based CLI to retrieve recent messages, perform content searches across chats, and filter by chat or date. The Skill outputs results in JSON or Markdown format with metadata including message ID, sender, timestamp, and media indicators, enabling integration into workflows without manual chat navigation.

Can I download attachments and media from Telegram chats?

Download attachments directly from Telegram chats to a local folder using the Skill's built-in download command. Media retrieval is tracked in the output metadata, allowing you to organize and process files programmatically alongside message content.

What authentication setup do I need to use this Skill?

Store Telegram API credentials and session data in ~/.telegram_dl before running commands. The Skill handles session management automatically, requiring one-time authentication to enable persistent access to chats, messages, and sending capabilities.

How do I send messages and files to Telegram chats from the command line?

Send text messages or file attachments to specific chats or users using the send command with chat name and text parameters. The Skill integrates outbound messaging into automated workflows, supporting both text content and file uploads.

Can I list all my chats and see unread message counts?

List all available chats with unread message counts using the list command. The output includes chat names and types, helping you identify conversation targets for fetching, searching, or sending messages without opening the Telegram app.

Does this work for both personal chats and group conversations?

The Skill supports both individual and group chats, with metadata distinguishing chat type in all outputs. Commands accept chat names or IDs, allowing flexible targeting across your entire conversation history regardless of chat category.