{"id":"92459aef-f094-4ab9-94f9-11e6141760ac","shortId":"2C2Mcs","kind":"skill","title":"telegram-bot-builder","tagline":"Expert in building Telegram bots that solve real problems - from","description":"# Telegram Bot Builder\n\nExpert in building Telegram bots that solve real problems - from simple\nautomation to complex AI-powered bots. Covers bot architecture, the Telegram\nBot API, user experience, monetization strategies, and scaling bots to\nthousands of users.\n\n**Role**: Telegram Bot Architect\n\nYou build bots that people actually use daily. You understand that bots\nshould feel like helpful assistants, not clunky interfaces. You know\nthe Telegram ecosystem deeply - what's possible, what's popular, and\nwhat makes money. You design conversations that feel natural.\n\n### Expertise\n\n- Telegram Bot API\n- Bot UX design\n- Monetization\n- Node.js/Python bots\n- Webhook architecture\n- Inline keyboards\n\n## Capabilities\n\n- Telegram Bot API\n- Bot architecture\n- Command design\n- Inline keyboards\n- Bot monetization\n- User onboarding\n- Bot analytics\n- Webhook management\n\n## Patterns\n\n### Bot Architecture\n\nStructure for maintainable Telegram bots\n\n**When to use**: When starting a new bot project\n\n## Bot Architecture\n\n### Stack Options\n| Language | Library | Best For |\n|----------|---------|----------|\n| Node.js | telegraf | Most projects |\n| Node.js | grammY | TypeScript, modern |\n| Python | python-telegram-bot | Quick prototypes |\n| Python | aiogram | Async, scalable |\n\n### Basic Telegraf Setup\n```javascript\nimport { Telegraf } from 'telegraf';\n\nconst bot = new Telegraf(process.env.BOT_TOKEN);\n\n// Command handlers\nbot.start((ctx) => ctx.reply('Welcome!'));\nbot.help((ctx) => ctx.reply('How can I help?'));\n\n// Text handler\nbot.on('text', (ctx) => {\n  ctx.reply(`You said: ${ctx.message.text}`);\n});\n\n// Launch\nbot.launch();\n\n// Graceful shutdown\nprocess.once('SIGINT', () => bot.stop('SIGINT'));\nprocess.once('SIGTERM', () => bot.stop('SIGTERM'));\n```\n\n### Project Structure\n```\ntelegram-bot/\n├── src/\n│   ├── bot.js           # Bot initialization\n│   ├── commands/        # Command handlers\n│   │   ├── start.js\n│   │   ├── help.js\n│   │   └── settings.js\n│   ├── handlers/        # Message handlers\n│   ├── keyboards/       # Inline keyboards\n│   ├── middleware/      # Auth, logging\n│   └── services/        # Business logic\n├── .env\n└── package.json\n```\n\n### Inline Keyboards\n\nInteractive button interfaces\n\n**When to use**: When building interactive bot flows\n\n## Inline Keyboards\n\n### Basic Keyboard\n```javascript\nimport { Markup } from 'telegraf';\n\nbot.command('menu', (ctx) => {\n  ctx.reply('Choose an option:', Markup.inlineKeyboard([\n    [Markup.button.callback('Option 1', 'opt_1')],\n    [Markup.button.callback('Option 2', 'opt_2')],\n    [\n      Markup.button.callback('Yes', 'yes'),\n      Markup.button.callback('No', 'no'),\n    ],\n  ]));\n});\n\n// Handle button clicks\nbot.action('opt_1', (ctx) => {\n  ctx.answerCbQuery('You chose Option 1');\n  ctx.editMessageText('You selected Option 1');\n});\n```\n\n### Keyboard Patterns\n| Pattern | Use Case |\n|---------|----------|\n| Single column | Simple menus |\n| Multi column | Yes/No, pagination |\n| Grid | Category selection |\n| URL buttons | Links, payments |\n\n### Pagination\n```javascript\nfunction getPaginatedKeyboard(items, page, perPage = 5) {\n  const start = page * perPage;\n  const pageItems = items.slice(start, start + perPage);\n\n  const buttons = pageItems.map(item =>\n    [Markup.button.callback(item.name, `item_${item.id}`)]\n  );\n\n  const nav = [];\n  if (page > 0) nav.push(Markup.button.callback('◀️', `page_${page-1}`));\n  if (start + perPage < items.length) nav.push(Markup.button.callback('▶️', `page_${page+1}`));\n\n  return Markup.inlineKeyboard([...buttons, nav]);\n}\n```\n\n### Bot Monetization\n\nMaking money from Telegram bots\n\n**When to use**: When planning bot revenue\n\n## Bot Monetization\n\n### Revenue Models\n| Model | Example | Complexity |\n|-------|---------|------------|\n| Freemium | Free basic, paid premium | Medium |\n| Subscription | Monthly access | Medium |\n| Per-use | Pay per action | Low |\n| Ads | Sponsored messages | Low |\n| Affiliate | Product recommendations | Low |\n\n### Telegram Payments\n```javascript\n// Create invoice\nbot.command('buy', (ctx) => {\n  ctx.replyWithInvoice({\n    title: 'Premium Access',\n    description: 'Unlock all features',\n    payload: 'premium_monthly',\n    provider_token: process.env.PAYMENT_TOKEN,\n    currency: 'USD',\n    prices: [{ label: 'Premium', amount: 999 }], // $9.99\n  });\n});\n\n// Handle successful payment\nbot.on('successful_payment', (ctx) => {\n  const payment = ctx.message.successful_payment;\n  // Activate premium for user\n  await activatePremium(ctx.from.id);\n  ctx.reply('🎉 Premium activated!');\n});\n```\n\n### Freemium Strategy\n```\nFree tier:\n- 10 uses per day\n- Basic features\n- Ads shown\n\nPremium ($5/month):\n- Unlimited uses\n- Advanced features\n- No ads\n- Priority support\n```\n\n### Usage Limits\n```javascript\nasync function checkUsage(userId) {\n  const usage = await getUsage(userId);\n  const isPremium = await checkPremium(userId);\n\n  if (!isPremium && usage >= 10) {\n    return { allowed: false, message: 'Daily limit reached. Upgrade?' };\n  }\n  return { allowed: true };\n}\n```\n\n### Webhook Deployment\n\nProduction bot deployment\n\n**When to use**: When deploying bot to production\n\n## Webhook Deployment\n\n### Polling vs Webhooks\n| Method | Best For |\n|--------|----------|\n| Polling | Development, simple bots |\n| Webhooks | Production, scalable |\n\n### Express + Webhook\n```javascript\nimport express from 'express';\nimport { Telegraf } from 'telegraf';\n\nconst bot = new Telegraf(process.env.BOT_TOKEN);\nconst app = express();\n\napp.use(express.json());\napp.use(bot.webhookCallback('/webhook'));\n\n// Set webhook\nconst WEBHOOK_URL = 'https://your-domain.com/webhook';\nbot.telegram.setWebhook(WEBHOOK_URL);\n\napp.listen(3000);\n```\n\n### Vercel Deployment\n```javascript\n// api/webhook.js\nimport { Telegraf } from 'telegraf';\n\nconst bot = new Telegraf(process.env.BOT_TOKEN);\n// ... bot setup\n\nexport default async (req, res) => {\n  await bot.handleUpdate(req.body);\n  res.status(200).send('OK');\n};\n```\n\n### Railway/Render Deployment\n```dockerfile\nFROM node:18-alpine\nWORKDIR /app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nCMD [\"node\", \"src/bot.js\"]\n```\n\n## Validation Checks\n\n### Bot Token Hardcoded\n\nSeverity: HIGH\n\nMessage: Bot token appears to be hardcoded - security risk!\n\nFix action: Move token to environment variable BOT_TOKEN\n\n### No Bot Error Handler\n\nSeverity: HIGH\n\nMessage: No global error handler for bot.\n\nFix action: Add bot.catch() to handle errors gracefully\n\n### No Rate Limiting\n\nSeverity: MEDIUM\n\nMessage: No rate limiting - may hit Telegram limits.\n\nFix action: Add throttling with Bottleneck or similar library\n\n### In-Memory Sessions in Production\n\nSeverity: MEDIUM\n\nMessage: Using in-memory sessions - will lose state on restart.\n\nFix action: Use Redis or database-backed session store for production\n\n### No Typing Indicator\n\nSeverity: LOW\n\nMessage: Consider adding typing indicator for better UX.\n\nFix action: Add ctx.sendChatAction('typing') before slow operations\n\n## Collaboration\n\n### Delegation Triggers\n\n- mini app|web app|TON|twa -> telegram-mini-app (Mini App integration)\n- AI|GPT|Claude|LLM|chatbot -> ai-wrapper-product (AI integration)\n- database|postgres|redis -> backend (Data persistence)\n- payments|subscription|billing -> fintech-integration (Payment integration)\n- deploy|host|production -> devops (Deployment)\n\n### AI Telegram Bot\n\nSkills: telegram-bot-builder, ai-wrapper-product, backend\n\nWorkflow:\n\n```\n1. Design bot conversation flow\n2. Set up AI integration (OpenAI/Claude)\n3. Build backend for state/data\n4. Implement bot commands and handlers\n5. Add monetization (freemium)\n6. Deploy and monitor\n```\n\n### Bot + Mini App\n\nSkills: telegram-bot-builder, telegram-mini-app, frontend\n\nWorkflow:\n\n```\n1. Design bot as entry point\n2. Build Mini App for complex UI\n3. Integrate bot commands with Mini App\n4. Handle payments in Mini App\n5. Deploy both components\n```\n\n## Related Skills\n\nWorks well with: `telegram-mini-app`, `backend`, `ai-wrapper-product`, `workflow-automation`\n\n## When to Use\n- User mentions or implies: telegram bot\n- User mentions or implies: bot api\n- User mentions or implies: telegram automation\n- User mentions or implies: chat bot telegram\n- User mentions or implies: tg bot\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["telegram","bot","builder","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-telegram-bot-builder","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/telegram-bot-builder","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 35034 github stars · SKILL.md body (8,510 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-25T12:51:27.296Z","embedding":null,"createdAt":"2026-04-18T20:29:41.225Z","updatedAt":"2026-04-25T12:51:27.296Z","lastSeenAt":"2026-04-25T12:51:27.296Z","tsv":"'+1':382 '-1':373 '/app':641 '/python':110 '/webhook':591 '/webhook'';':599 '0':368 '1':287,289,306,312,317,832,876 '10':489,527 '18':638 '2':292,294,837,882 '200':630 '3':843,889 '3000':604 '4':848,896 '5':345,854,902 '5/month':498 '6':858 '9.99':463 '999':462 'access':416,444 'action':423,669,691,712,740,765 'activ':475,484 'activatepremium':480 'actual':63 'ad':425,495,504,758 'add':692,713,766,855 'advanc':501 'affili':429 'ai':33,788,794,797,818,827,840,917 'ai-pow':32 'ai-wrapper-product':793,826,916 'aiogram':175 'allow':529,537 'alpin':639 'amount':461 'analyt':131 'api':42,103,119,937 'api/webhook.js':608 'app':585,776,778,784,786,864,873,885,895,901,914 'app.listen':603 'app.use':587,589 'appear':662 'architect':57 'architectur':38,113,121,136,152 'ask':990 'assist':74 'async':176,510,623 'auth':248 'autom':29,922,943 'await':479,516,521,626 'back':746 'backend':802,830,845,915 'basic':178,270,410,493 'best':157,558 'better':762 'bill':807 'bot':3,9,16,22,35,37,41,49,56,60,69,102,104,111,118,120,126,130,135,141,149,151,171,187,230,233,266,387,393,399,401,542,549,563,579,614,619,654,660,675,678,689,820,824,834,850,862,868,878,891,931,936,949,956 'bot.action':304 'bot.catch':693 'bot.command':277,438 'bot.handleupdate':627 'bot.help':198 'bot.js':232 'bot.launch':215 'bot.on':207,467 'bot.start':194 'bot.stop':220,224 'bot.telegram.setwebhook':600 'bot.webhookcallback':590 'bottleneck':716 'boundari':998 'build':7,20,59,264,844,883 'builder':4,17,825,869 'busi':251 'button':258,302,335,357,385 'buy':439 'capabl':116 'case':322 'categori':332 'chat':948 'chatbot':792 'check':653 'checkpremium':522 'checkusag':512 'choos':281 'chose':310 'clarif':992 'claud':790 'clear':965 'click':303 'clunki':76 'cmd':649 'collabor':772 'column':324,328 'command':122,192,235,236,851,892 'complex':31,407,887 'compon':905 'consid':757 'const':186,346,350,356,364,471,514,519,578,584,594,613 'convers':96,835 'copi':642,648 'cover':36 'creat':436 'criteria':1001 'ctx':195,199,209,279,307,440,470 'ctx.answercbquery':308 'ctx.editmessagetext':313 'ctx.from.id':481 'ctx.message.successful':473 'ctx.message.text':213 'ctx.reply':196,200,210,280,482 'ctx.replywithinvoice':441 'ctx.sendchataction':767 'currenc':456 'daili':65,532 'data':803 'databas':745,799 'database-back':744 'day':492 'deepli':83 'default':622 'deleg':773 'deploy':540,543,548,553,606,634,813,817,859,903 'describ':969 'descript':445 'design':95,106,123,833,877 'develop':561 'devop':816 'dockerfil':635 'ecosystem':82 'entri':880 'env':253 'environ':673,981 'environment-specif':980 'error':679,686,696 'exampl':406 'experi':44 'expert':5,18,986 'expertis':100 'export':621 'express':567,571,573,586 'express.json':588 'fals':530 'featur':448,494,502 'feel':71,98 'fintech':809 'fintech-integr':808 'fix':668,690,711,739,764 'flow':267,836 'free':409,487 'freemium':408,485,857 'frontend':874 'function':340,511 'getpaginatedkeyboard':341 'getusag':517 'global':685 'gpt':789 'grace':216,697 'grammi':164 'grid':331 'handl':301,464,695,897 'handler':193,206,237,241,243,680,687,853 'hardcod':656,665 'help':73,204 'help.js':239 'high':658,682 'hit':708 'host':814 'implement':849 'impli':929,935,941,947,954 'import':182,273,570,574,609 'in-memori':720,730 'indic':753,760 'initi':234 'inlin':114,124,245,255,268 'input':995 'instal':647 'integr':787,798,810,812,841,890 'interact':257,265 'interfac':77,259 'invoic':437 'ispremium':520,525 'item':342,359,362 'item.id':363 'item.name':361 'items.length':377 'items.slice':352 'javascript':181,272,339,435,509,569,607 'json':644 'keyboard':115,125,244,246,256,269,271,318 'know':79 'label':459 'languag':155 'launch':214 'librari':156,719 'like':72 'limit':508,533,700,706,710,957 'link':336 'llm':791 'log':249 'logic':252 'lose':735 'low':424,428,432,755 'maintain':139 'make':92,389 'manag':133 'markup':274 'markup.button.callback':285,290,295,298,360,370,379 'markup.inlinekeyboard':284,384 'match':966 'may':707 'medium':413,417,702,727 'memori':722,732 'mention':927,933,939,945,952 'menu':278 'menus':326 'messag':242,427,531,659,683,703,728,756 'method':557 'middlewar':247 'mini':775,783,785,863,872,884,894,900,913 'miss':1003 'model':404,405 'modern':166 'monet':45,107,127,388,402,856 'money':93,390 'monitor':861 'month':415,451 'move':670 'multi':327 'natur':99 'nav':365,386 'nav.push':369,378 'new':148,188,580,615 'node':637,650 'node.js':109,159,163 'node.js/python':108 'npm':646 'ok':632 'onboard':129 'openai/claude':842 'oper':771 'opt':288,293,305 'option':154,283,286,291,311,316 'output':975 'packag':643 'package.json':254 'page':343,348,367,371,372,380,381 'pageitem':351 'pageitems.map':358 'pagin':330,338 'paid':411 'pattern':134,319,320 'pay':421 'payload':449 'payment':337,434,466,469,472,474,805,811,898 'peopl':62 'per':419,422,491 'per-us':418 'permiss':996 'perpag':344,349,355,376 'persist':804 'plan':398 'point':881 'poll':554,560 'popular':89 'possibl':86 'postgr':800 'power':34 'premium':412,443,450,460,476,483,497 'price':458 'prioriti':505 'problem':13,26 'process.env.bot':190,582,617 'process.env.payment':454 'process.once':218,222 'product':430,541,551,565,725,750,796,815,829,919 'project':150,162,226 'prototyp':173 'provid':452 'python':167,169,174 'python-telegram-bot':168 'quick':172 'railway/render':633 'rate':699,705 'reach':534 'real':12,25 'recommend':431 'redi':742,801 'relat':906 'req':624 'req.body':628 'requir':994 'res':625 'res.status':629 'restart':738 'return':383,528,536 'revenu':400,403 'review':987 'risk':667 'role':54 'run':645 'safeti':997 'said':212 'scalabl':177,566 'scale':48 'scope':968 'secur':666 'select':315,333 'send':631 'servic':250 'session':723,733,747 'set':592,838 'settings.js':240 'setup':180,620 'sever':657,681,701,726,754 'shown':496 'shutdown':217 'sigint':219,221 'sigterm':223,225 'similar':718 'simpl':28,325,562 'singl':323 'skill':821,865,907,960 'skill-telegram-bot-builder' 'slow':770 'solv':11,24 'source-sickn33' 'specif':982 'sponsor':426 'src':231 'src/bot.js':651 'stack':153 'start':146,347,353,354,375 'start.js':238 'state':736 'state/data':847 'stop':988 'store':748 'strategi':46,486 'structur':137,227 'subscript':414,806 'substitut':978 'success':465,468,1000 'support':506 'task':964 'telegraf':160,179,183,185,189,276,575,577,581,610,612,616 'telegram':2,8,15,21,40,55,81,101,117,140,170,229,392,433,709,782,819,823,867,871,912,930,942,950 'telegram-bot':228 'telegram-bot-build':1,822,866 'telegram-mini-app':781,870,911 'test':984 'text':205,208 'tg':955 'thousand':51 'throttl':714 'tier':488 'titl':442 'token':191,453,455,583,618,655,661,671,676 'ton':779 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':973 'trigger':774 'true':538 'twa':780 'type':752,759,768 'typescript':165 'ui':888 'understand':67 'unlimit':499 'unlock':446 'upgrad':535 'url':334,596,602 'usag':507,515,526 'usd':457 'use':64,144,262,321,396,420,490,500,546,729,741,925,958 'user':43,53,128,478,926,932,938,944,951 'userid':513,518,523 'ux':105,763 'valid':652,983 'variabl':674 'vercel':605 'vs':555 'web':777 'webhook':112,132,539,552,556,564,568,593,595,601 'welcom':197 'well':909 'work':908 'workdir':640 'workflow':831,875,921 'workflow-autom':920 'wrapper':795,828,918 'yes':296,297 'yes/no':329 'your-domain.com':598 'your-domain.com/webhook'';':597","prices":[{"id":"19fa4d23-2fc7-4c6f-9631-ef6ab289b314","listingId":"92459aef-f094-4ab9-94f9-11e6141760ac","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:29:41.225Z"}],"sources":[{"listingId":"92459aef-f094-4ab9-94f9-11e6141760ac","source":"github","sourceId":"sickn33/antigravity-awesome-skills/telegram-bot-builder","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/telegram-bot-builder","isPrimary":false,"firstSeenAt":"2026-04-18T21:46:01.461Z","lastSeenAt":"2026-04-25T12:51:27.296Z"},{"listingId":"92459aef-f094-4ab9-94f9-11e6141760ac","source":"skills_sh","sourceId":"sickn33/antigravity-awesome-skills/telegram-bot-builder","sourceUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/telegram-bot-builder","isPrimary":true,"firstSeenAt":"2026-04-18T20:29:41.225Z","lastSeenAt":"2026-04-25T12:40:22.230Z"}],"details":{"listingId":"92459aef-f094-4ab9-94f9-11e6141760ac","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"telegram-bot-builder","github":{"repo":"sickn33/antigravity-awesome-skills","stars":35034,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-25T06:33:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"92a63a32c93ae257a9f2eb31ffe04e9e7d0dc7d9","skill_md_path":"skills/telegram-bot-builder/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/telegram-bot-builder"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"telegram-bot-builder","description":"Expert in building Telegram bots that solve real problems - from"},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/telegram-bot-builder"},"updatedAt":"2026-04-25T12:51:27.296Z"}}