telegram-bot: Skill for Cursor

.cursor/skills/bot-user/setup-bot-handlers/SKILL.md

setup-bot-handlers is a skill for Cursor from vendelieu/telegram-bot. It costs 44 tokens per session (1,112 once invoked), scanned A, original, Apache-2.0.

A guide for receiving and routing Telegram bot updates, such as messages, commands, button clicks, and inline queries. It covers both inline handler definitions and handlers generated from annotations.

In plain words
What is it for?
Use it to handle commands, text or regular-expression matches, specific update types, multi-step input, and unprocessed updates.
Why use it?
It helps route each incoming update to the right piece of code, including follow-up input and fallback behavior. This avoids putting all bot logic into one handler.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is vendelieu/telegram-bot's own configuration. It tells Cursor how to work on telegram-bot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything telegram-bot configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/vendelieu/telegram-bot/master/.cursor/skills/bot-user/setup-bot-handlers/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vendelieu/telegram-bot

Made for: Cursor.

Wrote 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.

agentmods badge for setup-bot-handlers

README.md
[![agentmods](https://agentmods.dev/badge/skills/vendelieu/telegram-bot/setup-bot-handlers.svg)](https://agentmods.dev/skills/vendelieu/telegram-bot/setup-bot-handlers)
Your own site
<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>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,112 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash fd06b2702916, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

.cursor/skills/bot-user/setup-bot-handlers/SKILL.md · 103 lines

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 with bot.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 { }MessageUpdate
  • onCallbackQuery { }CallbackQueryUpdate
  • onInlineQuery { }InlineQueryUpdate
  • onEditedMessage { }, 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 (or DefaultGuard::class)
  • Annotation: @Guard(UserPresentGuard::class) or @Guard(guard = UserPresentGuard::class)

Supported by: CommandHandler, CommandHandler.CallbackQuery, InputHandler.

Rate Limits

Read the full file on GitHub · 103 lines

Changes

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.

  1. 6d ago First seen · 103 lines · 0 tokens per session scan A fd06b2702916

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

telegram-bot

Telegram bot development - chatbots, notifications, AI assistants, and group automation.

claude-office-skills/skills · 19 tokens

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-app/LangBot · 73 tokens

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…

langbot-app/LangBot · 136 tokens

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…

atsign-foundation/at_client_sdk · 232 tokens

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…

microsoft/Agents · 71 tokens

discord-app-setup

Connect a Discord bot to the assistant via the Discord Gateway with guided application creation and intent configuration.

vellum-ai/vellum-assistant · 23 tokens