/telegram-connector:telegram-syncfrom telegram-connector
Downloads Telegram messages from groups and DMs to local Markdown files for analysis. Supports incremental sync, time ranges, forum topics, and configurable limits.
Ships in telegram-connector. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Sync Telegram messages to local Markdown storage.
This skill downloads messages from Telegram groups and DMs to local Markdown files. Messages are stored in an LLM-friendly format that can be easily read and analyzed.
DMs are synced by default. Use --no-dms to sync groups only.
Sync all (groups + DMs, last 7 days):
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py
Sync groups only (exclude DMs):
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --no-dms
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --group 1234567890
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --dm 123456789
Sync last 30 days:
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --days 30
Full sync (ignore previous state):
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --full
Sync specific topic in a forum group:
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --group 1234567890 --topic 5
Sync with custom message limit for groups:
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --days 30 --limit 5000
Sync with custom DM limit (default is 100 for privacy):
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --dm-limit 500
--limit)config/agents.yaml)--days 90 --limit 10000 for 90-day archive--dm-limit)--dm-limit 500last_message_id from sync stateGroup messages are saved to:
data/{group_id}-{slug}/messages.md
data/{group_id}-{slug}/sync_state.yaml
data/{group_id}-{slug}/group.yaml
For forum groups with topics:
data/{group_id}-{slug}/{topic_name}/messages.md
DM messages are saved to a separate directory:
dms/telegram/{user_id}-{name}/messages.md
dms/telegram/{user_id}-{name}/sync_state.yaml
dms/telegram/{user_id}-{name}/user.yaml
dms/telegram/manifest.yaml
Telegram has strict rate limits. The sync tool:
If rate limited, you'll see the wait time and can retry later.
## 2026-01-06
### 10:30 AM - @alice (123456)
Hello everyone!
### 10:31 AM - @bob (789012)
↳ replying to @alice:
Hey there!
[photo: vacation.jpg (1.2MB)]
Reactions: heart 5 | thumbsup 3
0 - Success1 - Authentication error2 - Group not found or permission denied3 - Rate limitedError message:
Could not find the input entity for PeerUser(user_id=...) (PeerUser)
What this means: Telethon (the Telegram library) doesn't have this group cached locally. It needs to know the group's "access hash" which is typically cached when you interact with the group.
Solutions (try in order):
Run telegram-list first to refresh the entity cache:
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_list.py
This iterates through all your dialogs and caches the entities.
Use the exact ID from telegram-list output:
# First, list groups to get correct IDs
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_list.py
# Then sync using the ID shown
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --group <ID_FROM_LIST>
Open the group in Telegram app:
For supergroups/channels: Make sure you're using the correct ID format. Supergroup IDs are typically positive integers (not negative).
Error message:
No group specified and no default group configured.
Solution: Either specify a group ID or set a default:
# Option 1: Specify group directly
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_sync.py --group 1234567890
# Option 2: Set a default group
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_init.py --group 1234567890
Possible causes:
Solution: Check your membership status in the Telegram app.
Error message:
Rate limited: Wait X seconds.
Solution: Wait the specified time before retrying. Telegram rate limits are strict and cannot be bypassed.
telegram-init - Initialize Telegram connectiontelegram-list - List groups and topicstelegram-read - Read synced messagesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/telegram-doctorDiagnose Telegram configuration and connectivity issues. Use when user reports problems with Telegram sync, connection errors, or wants to troubleshoot./telegram-initInitialize Telegram configuration. Use when user wants to set up, configure, or connect their Telegram account for the first time./telegram-listList Telegram groups and channels. Use when user asks about available groups, channels, or wants to discover what's accessible./telegram-readRead and search synced Telegram messages. Use when user asks about Telegram conversations, wants to see messages, or search for specific content./telegram-sendSend messages to Telegram channels. Use when user wants to post, reply, or send messages to Telegram.npx claudepluginhub lycfyi/community-agent-plugin --plugin telegram-connectorOther plugins' skills for the same job