Guide · Agent skill
How to use the Telegram Bot & Mini App Dev agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The telegram-dev skill is a reference guide that gives your coding agent working knowledge of the Telegram ecosystem: the Bot API, Mini Apps (web apps that run inside Telegram) and the lower-level MTProto/TDLib route for custom clients. Once it is installed, the agent can draft Python bot code, Flask webhook code, keyboard handling and HTML/JavaScript Mini App templates for you. This guide explains what the skill does, how to install it, how to trigger it and what you need before running anything it produces.
Quick start
- 1Download the skill ZIP. Download the telegram-dev ZIP from this page and keep it somewhere you can find it.
- 2Unzip into a skills folder. Unzip the skill into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project.
- 3Get a bot token. Message @BotFather, send /newbot, follow the prompts and copy the token it returns.
- 4Prepare Python and dependencies. Install the requests library, and Flask if you plan to use the webhook example.
- 5Ask for a feature in plain language. Describe the bot or Mini App task you want, mentioning Python if you want bot code.
- 6Review and secure the code. Move the token out of the code, add input validation, webhook secret checks and error handling before going live.
What the telegram-dev skill makes the agent do
Agent skills are folders of instructions and reference files that an agent loads when a task matches them. This one covers three areas of Telegram development: the Bot API for chat bots, the Mini Apps API for web apps that run inside Telegram, and the Telegram API with TDLib for building custom clients.
The skill is a guide, not a tool that connects to Telegram. The agent writes code for you based on the patterns in the skill, and you are responsible for running, deploying and maintaining that code.
- Bot API: sending messages, polls, inline keyboards, callback handling, inline mode, webhooks and Stars payments.
- Mini Apps: HTML/JS templates using the telegram-web-app JavaScript object, with main and back buttons, data sending and cloud storage.
- Reference material on the MTProto and TDLib route for custom clients, plus an index of official Telegram documentation links.
- Keyboard and button design notes, and a data alignment guide for tables shown in code blocks.
Install the telegram-dev skill
Download the ZIP for the skill from this page and unzip it. The skill folder contains SKILL.md and a references folder. Place the folder in one of the locations below, depending on whether you want it available everywhere or only in one project.
You can also upload the skill in the Claude apps through Settings, then Capabilities, then Skills.
- All your projects: unzip into ~/.claude/skills/ so the skill is available in every session.
- One project only: unzip into the project's .claude/skills/ folder so it applies only there.
- Claude apps: upload the skill under Settings → Capabilities → Skills.
Trigger the skill with natural requests
You do not need a special command. Describe the Telegram task in plain language, and the agent loads the skill when the request matches its description, which covers bot development, Mini Apps, custom clients, webhooks, payments, inline mode and keyboards.
Name the thing you are building and the language you want. Mentioning Python is useful because the skill's examples are in Python, and the Mini App examples are plain HTML and JavaScript.
- "Write a Python Telegram bot that echoes messages using long polling."
- "Give me a Flask webhook handler for a Telegram bot that replies to each message."
- "Create an inline keyboard with Confirm and Cancel buttons and handle the callback."
- "Build a simple Telegram Mini App page with a main button that sends data back to the bot."
- "Explain how Telegram Stars payments work through the Bot API."
Set up what you need before running the code
The skill's examples assume a few things are in place. Gather these before you ask the agent to run or deploy anything.
The bot token comes from @BotFather: message it, send /newbot, follow the prompts to set a name, and copy the token it gives you. The skill's examples put the token directly in the code, so treat it as a secret and move it into an environment variable for anything beyond a test.
- Python, with the requests library. Flask is also needed for the webhook example.
- A Telegram bot token obtained from @BotFather.
- A public HTTPS domain for webhooks. Telegram requires HTTPS and supports ports 443, 80, 88 and 8443, according to the skill.
pip install requests flaskSafety notes before you deploy
The skill does not run scripts on your machine, but the code it produces makes network calls to the Telegram API and, for webhooks, receives requests from the internet. The examples hardcode tokens, skip input validation, skip webhook secret checks and omit error handling. Add those yourself before you use a bot with real users.
Payments and personal data need extra care. Get a security review before a production bot handles payments or stores user information.
- Keep the bot token out of source code and version control.
- Validate all incoming message and callback data before acting on it.
- Handle errors from failed API calls so the bot does not crash silently.
- The skill's main text is mostly in Chinese, so you may need to ask the agent to explain sections in English.
Tips for getting useful output
Start with one small feature, such as a single command that replies, and confirm it works before adding keyboards, payments or web apps. Ask the agent to explain what each function does so you can maintain it later.
For Mini Apps, remember that the templates load telegram-web-app.js from Telegram's site and rely on the window.Telegram.WebApp object. Test the page inside Telegram rather than only in a normal browser, because many of the methods only work in that context.
- Ask for one feature at a time.
- Ask for the webhook version only after you have a public HTTPS domain.
- Check the official Bot API documentation linked from the skill's index when you need exact method details.
What people use it for
- Starting a Python echo bot that replies to messages using long polling.
- Building a Flask webhook endpoint that receives Telegram updates over HTTPS.
- Creating an inline keyboard with callback handling that edits the original message.
- Drafting an HTML Mini App template with a main button and a back button.
- Planning a custom Telegram client by reviewing the Bot API, Mini Apps and TDLib overview.
Frequently asked questions
Is the telegram-dev skill free to use?
The skill is published under the MIT licence, according to this page. Check the licence file in the source repository for the full terms before you reuse or redistribute it.
What do I need to install the telegram-dev skill?
You download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
Does the skill create a working Telegram bot for me?
No. It gives your agent reference patterns and starter code, but you must run, deploy and maintain the bot yourself. The skill does not connect to Telegram on its own.
Where do I get a Telegram bot token?
Message @BotFather in Telegram, send /newbot, follow the prompts to set a name, and copy the token it gives you. Keep that token private.
Why does my webhook not work?
Telegram webhooks need a public HTTPS URL, TLS 1.2 or higher, and one of the supported ports: 443, 80, 88 or 8443. Check that your domain is reachable from the internet and that you have called setWebhook with the correct URL.
How does this compare with python-telegram-bot or other libraries?
The skill's reference files mention python-telegram-bot as a recommended option for bot development with a full handler system. The skill itself is a guide for the agent, not a library, so you would still install and use a library of your choice.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use telegram-dev if you are starting a Telegram bot or Mini App and want an agent to draft Python or HTML/JS boilerplate that follows the official patterns. Pick something else if you need a finished bot without coding, or if you need detailed MTProto client API answers, since the guide covers that area lightly and the examples skip security steps.
Download the skill