2025emma/vibe-coding-cn
Overview
This skill is a practical, full-stack guide to developing across the Telegram ecosystem, covering Bot API, Mini Apps (Web Apps), and MTProto/TDLib client development. It condenses workflows, code snippets, and configuration tips for messaging, media, payments, web apps, authentication, storage, sensors, and client operations. Use it to speed up implementation and avoid common pitfalls when building Telegram integrations.
How this skill works
The skill inspects and documents core APIs and typical developer flows: Bot API HTTP methods, WebApp JavaScript hooks, and TDLib/MTProto client operations. It provides runnable examples (Python/Flask, JavaScript WebApp) and server-side validation patterns for initData and webhooks. It also lists recommended libraries, deployment constraints, and security checks to validate and protect application data.
When to use it
- Building or prototyping a Telegram bot with messaging, keyboards, or media handling
- Creating a Telegram Mini App that runs inside the Telegram client and communicates with a bot
- Implementing webhooks or switching from long polling to a scalable webhook setup
- Integrating payments, invoices, or pre-checkout flows into chat experiences
- Developing a custom Telegram client or automating with TDLib/MTProto
- Adding device APIs (location, sensors) or biometric flows inside a Mini App
Best practices
- Prefer HTTPS webhooks over long polling for scalability and lower latency
- Always validate WebApp initData server-side using your bot token and HMAC checks
- Implement robust error handling and respect Telegram rate limits to avoid bans
- Keep Mini App bundles small, responsive, and theme-aware; use lazy loading for assets
- Never store secrets in client-side storage; use SecureStorage or server-side vaults
- Use existing SDKs (python-telegram-bot, aiogram, pyrogram, telegraf) to reduce boilerplate
Example use cases
- A customer service bot that receives media, forwards to backend storage, and replies with status
- A Mini App storefront inside Telegram that opens via keyboard button and completes payment via invoice
- A custom desktop client using TDLib to integrate with internal enterprise systems
- A location-based service using Mini App LocationManager and bot notifications
- An inline mode content provider offering searchable articles directly in chats
FAQ
Yes. WebApps and webhooks must be served over HTTPS with TLS 1.2+ and a publicly accessible URL.
When should I use TDLib instead of Bot API?
Use TDLib/MTProto when you need full client capabilities, multiple accounts, or features unavailable to bots; use Bot API for automated bots and simple integrations.
10 skills
This skill helps you build Telegram bots, mini apps, and clients with practical guidance on Bot API, Webhooks, payments, and TDLib.
This skill helps you learn Claude API integration and build Claude-powered apps with code examples, tools, and best practices.
This skill provides comprehensive guidance for hummingbot development, features, APIs, and debugging to accelerate building automated crypto trading bots.
This skill helps you stream real-time cryptocurrency data from 40+ exchanges using cryptofeed, normalizing feeds for backends and algorithmic trading.
This skill converts scattered domain material into a reusable Skill blueprint with SKILL.md, references, and assets to improve reliability and maintainability.
This skill helps you integrate CoinGecko API, access market data, and build crypto price trackers with best practices.
This skill helps you develop and debug ccxt integrations across exchanges, APIs, order management, and market data with practical guidance.
This skill helps you develop and optimize TimescaleDB solutions with hypertables, continuous aggregates, and real-time analytics through practical guidance.
This skill helps you build and monitor Polymarket apps by leveraging API data, trading insights, and real-time WebSocket streams.
This skill helps you work with PostgreSQL databases by guiding SQL, design, and performance best practices across development tasks.