[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FWD273RM656XS3FF8CMX1":3,"skill-same:01M74FWD273RM656XS3FF8CMX1":73},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M74FWD273RM656XS3FF8CMX1","telegram-bot-development",null,"Astrumon\u002Fspovishun-skills","Astrumon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F67917191?v=4","01M74FSGPFMM3XWY2PMSEN8Z2W","Danylo Bidnyk","01M74FSGQ12JX4QM4FEY6NEH6N",0,"MIT","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"# Telegram Bot Development (Kotlin)\n\n## Workflow\n\n1. Identify the task type from the user request.\n2. Pick the matching row in the Decision Table below.\n3. Read the linked reference file in `references\u002F`.\n4. Apply the patterns from that reference together with the Always-Active Rules below.\n\n## Decision Table\n\n| If the task is about… | Read first |\n|---|---|\n| Bot registration, long-polling setup, initial wiring | `references\u002Fapi-basics.md` |\n| Parsing commands, routing updates, MessageHandler dispatch | `references\u002Fmessage-handlers.md` |\n| Inline keyboards, callback queries, button flows | `references\u002Fkeyboards.md` |\n| Bot token security, input validation, deployment, shutdown | `references\u002Fsecurity-deployment.md` |\n| Suspend handlers, coroutine scope, dispatcher rules | `references\u002Fcoroutines-integration.md` |\n| Adding, modifying, or using user-facing bot message strings | `references\u002Fbot-messages.md` |\n\n## Always-Active Rules\n\n- Command flow: `TelegramBot → MessageHandler → Command → Controller → Service`\n- Never call a `Service` directly from a `Command` — always route through a `Controller`\n- `Controller` returns `CommandResponse`; `Command` owns emoji prefixes and final text assembly\n- Never expose stack traces to users; send a generic error message instead\n- `BOT_TOKEN` must come from an environment variable — never hardcode it\n- Never hardcode user-facing strings in commands or controllers — always use `BotMessages` backed by `messages.properties`; see `references\u002Fbot-messages.md`\n\n## Output Format\n\nWhen implementing bot features:\n1. **Architecture summary** — which layer is modified and why\n2. **Code snippet** — the new command\u002Fhandler\u002Fhelper with Kotlin idioms\n3. **Registration note** — if a new command needs to be registered in `MessageHandler`\n4. **Test hint** — which integration test pattern to follow\n\n## Do NOT\n\n- Do NOT load all references at once — pick exactly one based on the Decision Table.\n- Do NOT call a `Service` from a `Command` — this violates the layer boundary.\n- Do NOT hardcode `BOT_TOKEN` or any credentials in source files.\n- Do NOT use `GlobalScope` for coroutines in handlers — use the injected scope.\n- Do NOT skip `answerCallbackQuery` for callback queries, even if no popup is shown.\n- Do NOT hardcode user-facing strings in commands or controllers — all text goes in `messages.properties` and is accessed via `BotMessages`.\n\n## Error Handling\n\n- If no row in the Decision Table matches, ask the user to clarify before proceeding.\n- If a reference file is missing, stop and report the exact path.\n- Wrap all `execute()` calls in try-catch; handle `TelegramApiException` and `TelegramApiRequestException` separately.\n\n## Related Skills\n\n- `kotlin-specialist` — coroutine scope design, sealed classes for `CommandResponse`\n- `postgresql-exposed-orm` — DB access patterns called from Services\n- `unit-testing-kotlin` — integration test patterns\n\n## Example Invocation\n\n- User: \"Add a \u002Fstats command to the bot\" → load `references\u002Fmessage-handlers.md`, implement Command → Controller → Service chain.\n- User: \"Build a confirm\u002Fcancel inline keyboard for a delete action\" → load `references\u002Fkeyboards.md`, apply callback data format and `answerCallbackQuery` pattern.\n",{},"main","4ad702b3d4f403306c1a016277020693dd669f55","skills\u002Ftelegram-bot-development","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills","https:\u002F\u002Fgithub.com\u002FAstrumon","Software Engineer","2026-10-14 01:01:46",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Astrumon\u002Fspovishun-skills --skill telegram-bot-development",{"tool":35,"command":36},"bunx","bunx skills add Astrumon\u002Fspovishun-skills --skill telegram-bot-development",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Astrumon\u002Fspovishun-skills --skill telegram-bot-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002FSKILL.md",true,[43,49,53,57,61,65,69],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"manifest.yaml","REFERENCE","参考文档",587,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Fmanifest.yaml",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fapi-basics.md",1536,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Freferences\u002Fapi-basics.md",{"path":54,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fbot-messages.md",3888,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Freferences\u002Fbot-messages.md",{"path":58,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fcoroutines-integration.md",2706,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Freferences\u002Fcoroutines-integration.md",{"path":62,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fkeyboards.md",2572,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Freferences\u002Fkeyboards.md",{"path":66,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fmessage-handlers.md",3025,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Freferences\u002Fmessage-handlers.md",{"path":70,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fsecurity-deployment.md",2469,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftelegram-bot-development\u002Freferences\u002Fsecurity-deployment.md",[74,80,86,93,98,103],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M74FX71JH2KNG5KX7TZHSKCB","universal-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Funiversal-skill\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M74FX57GTEFPJVCPWPSP6CCW","notion-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Fnotion-skill\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M74FX30F3K8906P5ASQ3DNXR","inline-frontmatter-skill","Hand-authored description that already lives in the body and must not be double-wrapped.","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Finline-frontmatter-skill\u002FSKILL.md",[],[],{"skillNo":94,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M74FX18AGHM2KHQ502PMJZRJ","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource-v2\u002Fskills\u002Funiversal-skill\u002FSKILL.md",[],[],{"skillNo":99,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M74FWZJ193G810P0ZJ1PKEZ9","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource-v2\u002Fskills\u002Fnotion-skill\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M74FWPNEZWWGQ2Q37N6MMWP1","write-a-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[],[]]