pyrogram-telegram-bot-techniques
Skill by tangyoha
Provides Pyrogram techniques for Telegram bots: parsing message links, setting a custom session start timeout, uploading videos without a black screen, and removing ad text from captions. Intended for developers who build Telegram tools with Pyrogram.
Install pyrogram-telegram-bot-techniques
Built from the published package, never by AI.
git clone --depth 1 https://github.com/tangyoha/telegram_media_downloader /tmp/telegram_media_downloader && mkdir -p ~/.claude/skills && cp -r /tmp/telegram_media_downloader/.claude/skills/pyrogram-telegram-bot-techniques ~/.claude/skills/pyrogram-telegram-bot-techniquesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install pyrogram-telegram-bot-techniques in Claude Code
git clone --depth 1 https://github.com/tangyoha/telegram_media_downloader /tmp/telegram_media_downloader && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/telegram_media_downloader/.claude/skills/pyrogram-telegram-bot-techniques ~/.gemini/antigravity-cli/skills/pyrogram-telegram-bot-techniquesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install pyrogram-telegram-bot-techniques in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a set of Python code patterns for the Pyrogram Telegram library. It covers extracting chat IDs, message IDs and topic IDs from t.me links, including private channel, topic and comment links. It also includes HookClient and HookSession classes that set a custom connection start timeout, with a default of 60 seconds.
For video uploads, it downloads the video's thumbnail, checks the file size, and sends the video with the thumbnail, width, height and duration, which the source says prevents a black screen. For ads, a MessageProcessor class uses message entities to keep formatting while extracting a chosen part of a caption. The skill is aimed at developers who build Telegram bots or scripts with Pyrogram.
Written from the project's SKILL.md and checked against it.
What it can do
- Parse Telegram linksExtracts chat ID, message ID and topic ID from t.me message links.
- Handle comment linksFinds the linked chat for comment links using get_chat.
- Custom session timeoutHookClient and HookSession set a start timeout instead of the default.
- Video upload with thumbnailSends thumb, width, height and duration to avoid a black video screen.
- Thumbnail downloadDownloads a video thumbnail, retries up to 3 times and checks file size.
- Ad text removalMessageProcessor keeps caption entity formatting while filtering text.
What you need
- Python
- Pyrogram library
- Telegram API ID and API hash
Try asking
- Parse this t.me link and get the chat ID and message ID with Pyrogram
- Upload a Telegram video with a thumbnail so it does not show black
- Remove the ad text from this Telegram caption and keep the formatting
Good to know
- Code snippets reference variables not defined in the source, such as logger and client.
- Ad removal depends on a filter string that matches text in the caption.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/pyrogram-telegram-bot-techniques/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md12 KB
Alternatives to pyrogram-telegram-bot-techniques
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
pyrogram-telegram-bot-techniques: common questions
What does this Pyrogram skill help with?
The source covers parsing Telegram message links, custom session timeouts, avoiding black screens when uploading videos, and removing ads from messages.
How does it avoid black screens on uploaded videos?
The source says to provide a thumbnail and the video's width, height and duration when uploading. It states that a missing thumbnail can cause the video to show as a black screen.
How do I change the Pyrogram connection timeout?
The source subclasses Session and Client as HookSession and HookClient, then passes start_timeout when creating the client. The default value shown is 60 seconds.
How do I install pyrogram-telegram-bot-techniques?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is pyrogram-telegram-bot-techniques free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is pyrogram-telegram-bot-techniques safe to use?
It scores 88 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 pyrogram-telegram-bot-techniques?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
