Loading...
Loading...
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".
npx skill4agent add glebis/claude-skills telegram~/.telegram_dl/setuppython3 scripts/telegram_fetch.py setuppython telegram_dl.pypython3 scripts/telegram_fetch.py setupscripts/telegram_fetch.py# 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 unreadpython3 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--search "text"--exact--limit N--limit# 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# 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 20python3 scripts/telegram_fetch.py unread
python3 scripts/telegram_fetch.py unread --chat-id 123456789# 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--markdown--markdown--markdown**bold**_italic_[text](url)## Header* item--markdownpublishsend--markdown# 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@username# 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"# 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~/Downloads/telegram_attachments/# 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 --jsonhttps://t.me/c/CHAT_ID/THREAD_IDrecent# 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"video:Channels/klodkot/attachments/Sources/published_datetelegram_message_iddrafts/published/video: filename.mp4[[filename.mp4]][[image.png|alt text]]--dry-run--jsonpython3 scripts/telegram_fetch.py recent --jsonpython3 scripts/telegram_fetch.py recent --to-daily
python3 scripts/telegram_fetch.py search "project" --to-daily~/Brains/brain/Daily/YYYYMMDD.mdpython3 scripts/telegram_fetch.py recent --chat "John Doe" --to-person "John Doe"~/Brains/brain/{PersonName}.md# 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.mdrecent --limit 20recent --days 1search "project"unreadrecent --to-dailylistlist --search "X" --exact --limit 200send --chat "John" --text "Hello!"send --chat "@username" --text "..."send --chat "..." --text "Thanks!" --reply-to <id>send --chat "John" --file "/path/to/image.jpg"send --chat "..." --file "report.pdf" --text "Here's the report"send --chat "Group" --text "..." --topic 12download --chat "Tool Building Ape"download --chat "Project Group" --limit 10recent --chat "AGENCY: Community" --limit 100 -o ~/agency.mdrecent --chat "Group" -o ~/archive.md --with-mediaedit --chat "..." --message-id <id> --text "new text"edit --chat "..." --message-id 123 --text "corrected text"setupsetuppublish --draft "Channels/klodkot/drafts/...md"publish --draft "..." --dry-runtelethonpyyamlpip install telethon pyyaml