telegram-serverless-bot
Installation
SKILL.md
Telegram Serverless Bot
Build, ship, and test simple or production-grade Telegram bots directly inside Telegram's cloud runtime—with zero servers, zero webhooks to manually configure, and instant execution.
Powered by Telegram Serverless (tgcloud): instant V8 JavaScript (ES Module) isolates, built-in SQLite database (sdk/db) for persistent sessions and state machines, native Telegram Bot API client (sdk/api), outbound HTTP client (sdk/fetch), Telegram Stars (XTR) digital payments, and interactive keyboards with lightweight Mini App linking.
When to Use
- Telegram Serverless bot projects: You are creating, updating, or debugging bot handlers (
tgcloud/handlers/<update_type>.js), Bot API integrations (apifromsdk), or bot configuration (tgcloud.jsoncortgcloud.json). - Simple commands or complex workflows: You are building anything from a quick
/startand/helpcommand bot to multi-step conversational wizards, interactive inline menus, binary media uploaders, or Telegram Stars checkout flows. - Stateful bot conversations: You need persistent user state across stateless webhook invocations using built-in SQLite (
sdk/db) session tables or stateless 64-byte callback query payload encoding. - Mini App launcher bots: You are configuring bot menu buttons, inline keyboard WebApp buttons (
web_app: { url }), or deep links that launch Telegram Mini Apps from a bot conversation. - Bot testing & operations: You need to validate bot update handlers in local sandboxes (
tgcloud run handlers/<type>with JSON payloads), audit schemas (tgcloud diff), migrate databases (tgcloud migrate), or push to production (tgcloud push).
When Not to Use
- Full-stack Mini App frontend engineering: The task focuses primarily on building standalone frontend Mini App UIs, client RPC endpoints (
Telegram.WebApp.Serverless.call), or static SPA hosting (tgcloud.ai). Route those tasks touse-telegram-serverless. - External runtime bots: The bot is intentionally hosted on a VPS, Docker container, Cloudflare Workers, AWS Lambda, or Vercel using third-party bot frameworks (
grammY,Telegraf,aiogram). Do not migrate external bots unless explicitly instructed. - Long-running background daemons: The feature requires persistent memory loops, long-polling, or raw TCP sockets not supported by Telegram Serverless V8 isolates. Explain platform constraints before proposing architecture.