Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
tg-mtproto-cli 0.1.4 — No changes detected in this version. - No file or documentation changes were detected between versions. - Functionality and skill instructions remain unchanged.
What This Skill Does
Read-only Telegram CLI that uses the MTProto protocol directly, bypassing the Bot API. Lists chats, fetches message history, downloads media, and manages multiple authenticated sessions. Cannot send messages or modify any Telegram data.
Direct MTProto access avoids Bot API rate limits and works on any chat the user is a member of, not just bots.
When to use it
- Pulling recent messages from a Telegram channel for archiving
- Downloading photos or videos from a group chat
- Searching message history across multiple accounts
- Monitoring a forum topic for new posts since a given date
- Extracting structured message data for scripts or pipelines
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: Download all photos posted in @mychat in the last 50 messages
- 1Run `tg messages @mychat -n 50 --json` to fetch recent messages as JSON
- 2Pipe output through `jq` to filter messages where `.media.type == "photo"` and extract `.id` values
- 3Loop over each message ID and run `tg download @mychat <id> --out ./photos`
- 4Confirm download completion from exit codes and `--json` output
All photos from the last 50 messages saved to ./photos directory
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.