Borrowing it
Nothing to install: this file belongs to vendelieu/telegram-bot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vendelieu/telegram-bot/master/.cursor/skills/bot-user/setup-bot-handlers/SKILL.mdgit clone --depth 1 https://github.com/vendelieu/telegram-botWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vendelieu/telegram-bot/setup-bot-handlers)<a href="https://agentmods.dev/skills/vendelieu/telegram-bot/setup-bot-handlers"><img src="https://agentmods.dev/badge/skills/vendelieu/telegram-bot/setup-bot-handlers.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.01112 |
| Opus 5 | $0.00022 | $0.00556 |
| Sonnet 5 | $0.00009 | $0.00222 |
| Haiku 4.5 | $0.00004 | $0.00111 |
Grade A, and why
setup-bot-handlers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setup Bot Handlers
Two Approaches
- DSL:
bot.setFunctionality { ... }— define handlers inline - Annotations:
@CommandHandler,@InputHandler, etc. — KSP generates activities; use withbot.handleUpdates()(loads handlers via META-INF)
DSL Handlers
Inside bot.setFunctionality { }:
| Handler | Purpose |
|---|---|
onCommand("/start") { } |
Commands (e.g. /start) |
onInput("id") { } |
Single-step input; route via bot.inputListener[user] = "id" |
inputChain("id") { }.andThen { } |
Multi-step input chain |
common("text") { } or common(Regex("...")) { } |
Text/regex match (lower priority than commands) |
onUpdate(UpdateType.X) { } |
All updates of given type |
whenNotHandled { } |
Fallback for unprocessed updates |
Typed Update Handlers
Use typed wrappers for ActivityCtx<XxxUpdate>:
onMessage { }—MessageUpdateonCallbackQuery { }—CallbackQueryUpdateonInlineQuery { }—InlineQueryUpdateonEditedMessage { },onChannelPost { },onChatMember { }, etc.
Input Listener
Route the next user message to an input handler or chain:
bot.inputListener[user] = "conversation"
// or
bot.inputListener.set(user) { "conversation-2step" }
Annotation Handlers
| Annotation | Purpose |
|---|---|
@CommandHandler(["/start"]) |
Command handler |
@CommandHandler.CallbackQuery(["/data"]) |
Callback query with optional autoAnswer |
@InputHandler(["id"]) |
Input handler |
@CommonHandler.Text(["value"]) or @CommonHandler.Regex("...") |
Text/regex match |
@UpdateHandler([UpdateType.MESSAGE, ...]) |
Update type handler |
@UnprocessedHandler |
Fallback |
Guards
Add pre-processing checks:
- DSL:
guard = UserPresentGuard::class(orDefaultGuard::class) - Annotation:
@Guard(UserPresentGuard::class)or@Guard(guard = UserPresentGuard::class)
Supported by: CommandHandler, CommandHandler.CallbackQuery, InputHandler.
Rate Limits
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 103 lines · 0 tokens per session scan A fd06b2702916
setup-bot-handlers is a skill published in the GitHub repository vendelieu/telegram-bot (248 stars, last pushed 10d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,112 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
telegram-bot
Telegram bot development - chatbots, notifications, AI assistants, and group automation.
langbot-eba-adapter-dev
Build, refactor, and test LangBot platform adapters for the Event-Based Agents architecture. Use when adding or migrating Telegram, Discord, or other messaging platform adapters to the EBA adapter layout, validating unified event/message conversion, writing live adapter probes, or using standalone plugin runtime plus…
langbot-dev
Develop, build, and debug the LangBot core backend and web frontend. Use when working inside the LangBot repository — backend (Python/Quart, src/langbot/pkg), the Vite/React web UI, HTTP API controllers/services, Alembic migrations, or the MCP server. Covers the dev environment (uv, pnpm), repo layout, the API auth…
at_client_skills-sdk
Use this skill when a developer is building a Dart or Flutter app that depends on atclient or atclientflutter from pub.dev, stores or shares data via the Atsign Protocol, needs onboarding (CRAM new-atsign, atKeys file, keychain, APKAM) or APKAM enrollment, or asks about AtCollection , CItem , Query , sub-collections…
bf-to-agents-sdk-typescript-migration
Assess and migrate JavaScript or TypeScript bots from BotBuilder/Bot Framework SDK to Microsoft 365 Agents SDK with AgentApplication. Use to produce a migration report and plan before editing code, map BotBuilder packages and APIs, identify unsupported features, and implement only the supported plan items selected by…
discord-app-setup
Connect a Discord bot to the assistant via the Discord Gateway with guided application creation and intent configuration.