tg-hub
Skill by OpenMinis
tg-hub reads and writes Telegram data through Telethon, using Python and UV. It syncs group and channel messages into a local SQLite database for keyword search, filtering, statistics and speaker rankings. It suits users who need programmatic access to their Telegram chats.
Install tg-hub
Built from the published package, never by AI.
git clone --depth 1 https://github.com/OpenMinis/MinisSkills /tmp/MinisSkills && mkdir -p ~/.claude/skills && cp -r /tmp/MinisSkills/tg-hub ~/.claude/skills/tg-hubRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/OpenMinis/MinisSkills /tmp/MinisSkills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/MinisSkills/tg-hub ~/.gemini/antigravity-cli/skills/tg-hubAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
tg-hub is a skill for reading and writing Telegram data with Python and UV. It uses the MTProto protocol through Telethon rather than the Bot API, so it logs in with your own Telegram account. Group and channel messages are synced into a local SQLite database, and searches, multi-keyword filters, today's messages, speaker rankings and timeline statistics then run offline.
The first login is done once in a terminal with a phone number and verification code, after which the session is saved. Refresh calls fetch only new messages incrementally. The skill is based on jackwener/tg-cli under the Apache-2.0 licence and keeps Telethon as its only third-party dependency. It suits users who want programmatic access to Telegram group and channel messages.
Written from the project's SKILL.md and checked against it.
What it can do
- syncSyncs a single group or channel's messages into local SQLite.
- sync_allSyncs all groups with optional throttling and a chat count limit.
- refreshQuickly fetches new messages incrementally, recommended for daily use.
- searchSearches locally stored messages by keyword or regex.
- filterFilters local messages by multiple keywords using OR logic.
- todayReturns today's locally stored messages.
- recentReturns locally stored messages from the last N hours.
- top_sendersRanks speakers by message count in a chat over a time window.
- timelineShows message timeline statistics by granularity such as hour.
- statsReports local database totals and the groups stored.
What you need
- Python and UV
- A Telegram account with access to your phone number
- Telegram verification code for the first login
- Your own TG_API_ID and TG_API_HASH (recommended)
Try asking
- Sync the latest messages from my Telegram group and show new counts.
- Search my synced Telegram groups for messages containing 'Python'.
- Who were the top 5 speakers in my Telegram channels over the last 24 hours?
Good to know
- The first login must be completed in an interactive terminal.
- Using the default api_id=2040 prints a warning and is only a fallback.
- Telegram applies rate limits, and large syncs can take a long time.
- Search and statistics only cover messages already synced to the local database.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: tg-hub/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to tg-hub
All alternatives →Explains how to set up and verify Zoom webhooks for event-driven workflows. Covers signature checks, event subscriptions, delivery handling, retries and event-type selection for developers.
Posts text, images and videos to Weibo, and publishes headline articles from Markdown files. It works through a real Chrome browser over CDP. The scripts only fill in the content, and the user reviews and publishes manually.
Adds another phone number to an existing Dial channel in NanoClaw, so one install can answer SMS and AI voice calls on several numbers. Intended for operators who already run Dial and want a second or third line.
Explains how to set up and use Zoom WebSockets for persistent, low-latency Zoom event streams. Intended for workflows where WebSockets are preferred over webhooks.
Adds personal WeChat support to NanoClaw through Tencent's official iLink Bot API. It uses long-polling and QR code login, so no public webhook URL is needed. It is for NanoClaw users who want a personal WeChat bot channel.
Guides AI assistants through the bundled Zoom MCP connectors for meetings, recordings, meeting assets and transcripts. Intended for planning or troubleshooting tool-based Zoom access after routing to an MCP workflow.
Compare with setup-zoom-webhooks, baoyu-post-to-weibo or add-dial-number
tg-hub: common questions
Does tg-hub need a Telegram bot token?
No. tg-hub uses the MTProto protocol through Telethon, not the Bot API, so it logs in with your own Telegram account.
Do searches need an internet connection?
Read operations such as search, today and recent query the local SQLite database with no network access. Only sync and refresh connect to Telegram.
Why does tg-hub recommend my own API ID and hash?
The source says the public app ID is only a fallback and that using your own credentials is recommended to reduce risk-control issues for long-term use.
How do I install tg-hub?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is tg-hub free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is tg-hub safe to use?
It scores 75 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to tg-hub?
Similar skills: setup-zoom-webhooks, baoyu-post-to-weibo, add-dial-number, setup-zoom-websockets.
