Agent skill

Setup Bot Handlers

by vendelieu in vendelieu/telegram-bot

Sets up bot handlers using DSL or annotations. An agent skill from vendelieu/telegram-bot.

Apache-2.0Auto-check passedProductivity & Automation

Install Setup Bot Handlers

skills CLI
$ npx skills add vendelieu/telegram-bot --skill setup-bot-handlers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vendelieu/telegram-bot setup-bot-handlers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vendelieu/telegram-bot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/setup-bot-handlers .claude/skills/setup-bot-handlers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-bot-handlers
GitHub stars
249
Token cost
~1k tokens
SKILL.md length
261 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Sets up bot handlers using DSL or annotations. An agent skill from vendelieu/telegram-bot.

  • Configuring command handlers
  • SKILL.md covers Two Approaches, DSL Handlers, Typed Update Handlers and Input Listener, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Common handlers

What it does

Setup Bot Handlers is an agent skill from vendelieu/telegram-bot. Sets up bot handlers using DSL or annotations. Use when configuring command handlers, input handlers, common handlers, update handlers, or fallback handlers for the telegram-bot library.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Chatbots and conversational support. It works with Telegram. The repository describes itself as: Telegram Bot API wrapper with handy Kotlin DSL. The licence is Apache-2.0.

When your agent uses it

  • Configuring command handlers
  • Common handlers
  • Update handlers
  • Fallback handlers for the telegram-bot library

Example prompts

  • “/setup-bot-handlers”

What it can do on your machine

Read from SKILL.md and the folder at commit 1dbfd00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup Bot Handlers loads about 1k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 261 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vendelieu/telegram-bot at commit 1dbfd00, republished under its Apache-2.0 licence (© vendelieu). 261 words, ~1,020 tokens.

Download SKILL.mdSave it as .claude/skills/setup-bot-handlers/SKILL.md (or your agent's skills folder).
name
setup-bot-handlers
description
Sets up bot handlers using DSL or annotations. Use when configuring command handlers, input handlers, common handlers, update handlers, or fallback handlers for the telegram-bot library.

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 { }:

HandlerPurpose
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:

kotlin
bot.inputListener[user] = "conversation"
// or
bot.inputListener.set(user) { "conversation-2step" }

Annotation Handlers

AnnotationPurpose
@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
@UnprocessedHandlerFallback

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

  • DSL: rateLimits = RateLimits.NOT_LIMITED or custom
  • Annotation: @RateLimits(period = 60_000, rate = 5) — 5 requests per 60 seconds
  • Default: no limit

Supported by: CommandHandler, CallbackQuery, InputHandler, CommonHandler.

ArgParser

Custom argument parsing for commands and callback data:

  • Annotation: @ArgParser(argParser = CustomArgParser::class)
  • Supported by: CommandHandler, CallbackQuery, CommonHandler
  • Default: DefaultArgParser

Annotation Reference

AnnotationParametersDefault
@CommandHandlervalue (commands), scope (UpdateType[])scope: MESSAGE
@CommandHandler.CallbackQueryvalue (callback data prefixes), autoAnswer (bool)autoAnswer: false
@InputHandlervalue (input identifiers)—
@CommonHandler.Textvalue, filters, priority, scopefilters: [], priority: 0, scope: MESSAGE
@CommonHandler.Regexvalue (pattern), options, filters, priority, scopeoptions: [], filters: [], priority: 0, scope: MESSAGE
@UpdateHandlertype (UpdateType[])—
@UnprocessedHandler——
@Guardguard (KClass)DefaultGuard
@ArgParserargParser (KClass)DefaultArgParser
@RateLimitsperiod (ms), rate (requests)0, 0

Reference

© vendelieu, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/setup-bot-handlers of vendelieu/telegram-bot.

Open the folder on GitHubat commit 1dbfd00

Compare with similar skills

Setup Bot Handlers next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup Bot Handlers compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Bot Handlers this skillvendelieu/telegram-bot249—~1kAutomated safety check: PassApache-2.0
Pytdbotpytdbot/client137—~4.3kAutomated safety check: PassMIT
Setupterranc/claude-telegram-bot-bridge134—~1.5kAutomated safety check: NotesNone
MuseKevPH2026/muse-catch128—~865Automated safety check: PassAGPL-3.0
Telegram Bot ManagerCraftOS-dev/CraftBot392—~836Automated safety check: PassMIT
Telegram Bot Builderdavila7/claude-code-templates32k4 repos~1.5kAutomated safety check: NotesMIT

Similar skills

  • Pytdbot

    pytdbot/client

    Write Telegram bots and userbots with Pytdbot (async TDLib wrapper with high-level helpers; not the Telegram Bot API).

    137 GitHub stars~4.3k tokensUpdated 10 days ago
    Productivity & AutomationAuto-check passed
  • Setup

    terranc/claude-telegram-bot-bridge

    Install and configure the Telegram Skill Bot. An agent skill from terranc/claude-telegram-bot-bridge.

    134 GitHub stars~1.5k tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check: notes
  • Muse

    KevPH2026/muse-catch

    Muse · Catch — AI灵感捕手。浏览器插件+Telegram Bot一键捕获,AI自动提炼,Dashboard浏览+DNA雷达+OPC Market。当用户说「灵感」「捕获」「Muse」「Catch」「记下来」「收藏」时触发。

    128 GitHub stars~865 tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Telegram Bot Manager

    CraftOS-dev/CraftBot

    Manage and configure Telegram bots for OpenClaw. An agent skill from CraftOS-dev/CraftBot.

    392 GitHub stars~836 tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Telegram Bot Builder

    davila7/claude-code-templates

    Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots.

    32k GitHub starsUsed in 4 repos~1.5k tokens
    Productivity & AutomationAuto-check: notes
  • Telegram Bot

    OpenClaudia/openclaudia-skills

    Send messages, images, and marketing content to Telegram channels and groups via Bot API.

    711 GitHub stars~6k tokensUpdated 20 days ago
    Productivity & AutomationAuto-check: notes

More from vendelieu/telegram-bot

All 14 skills in this repo
  • Add Ktnip Ksp Tests

    vendelieu/telegram-bot

    Adds tests for the ktnip KSP processor. An agent skill from vendelieu/telegram-bot.

    249 GitHub stars~726 tokensUpdated 4 days ago
    Auto-check passed
  • Add Ktnip Parameter Strategy

    vendelieu/telegram-bot

    Adds a new parameter resolution strategy to the ktnip KSP processor.

    249 GitHub stars~613 tokensUpdated 4 days ago
    Auto-check passed
  • Add Telegram API Action

    vendelieu/telegram-bot

    Adds a new Telegram Bot API method (action class and top-level functions).

    249 GitHub stars~974 tokensUpdated 4 days ago
    Auto-check passed
  • Add Telegram API Tests

    vendelieu/telegram-bot

    Writes tests for Telegram Bot API actions. An agent skill from vendelieu/telegram-bot.

    249 GitHub stars~609 tokensUpdated 4 days ago
    Auto-check: notes
  • Add Telegram Update Field

    vendelieu/telegram-bot

    Adds a new field to the Update type and wires it through ProcessedUpdate, UpdateType, ProcessUpdate, KSP (TypeConstants, TypeMapper), and FunctionalDSLUtils.

    249 GitHub stars~841 tokensUpdated 4 days ago
    Auto-check passed
  • Add Wizard Handler

    vendelieu/telegram-bot

    Configures @WizardHandler annotation for wizard flows. An agent skill from vendelieu/telegram-bot.

    249 GitHub stars~508 tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about Setup Bot Handlers

What does Setup Bot Handlers do?

Sets up bot handlers using DSL or annotations. An agent skill from vendelieu/telegram-bot. Setup Bot Handlers is an agent skill from vendelieu/telegram-bot. Sets up bot handlers using DSL or annotations.

When should I use Setup Bot Handlers?

Setup Bot Handlers fits situations like: configuring command handlers; common handlers; update handlers; fallback handlers for the telegram-bot library.

How do I install Setup Bot Handlers in Claude Code?

Run `npx skills add vendelieu/telegram-bot --skill setup-bot-handlers -a claude-code`. Or copy the skill folder (.cursor/skills/setup-bot-handlers in vendelieu/telegram-bot) into .claude/skills/setup-bot-handlers in your project. Claude Code loads it when a task matches its description.

How do I install Setup Bot Handlers in Codex?

Run `npx skills add vendelieu/telegram-bot --skill setup-bot-handlers -a codex`. Or copy the skill folder (.cursor/skills/setup-bot-handlers in vendelieu/telegram-bot) into .agents/skills/setup-bot-handlers in your project. Codex loads it when a task matches its description.

Can I use Setup Bot Handlers in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vendelieu/telegram-bot --skill setup-bot-handlers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-bot-handlers, .gemini/skills/setup-bot-handlers, .github/skills/setup-bot-handlers and .opencode/skills/setup-bot-handlers in your project.

What does Setup Bot Handlers need to run?

SKILL.md names no scripts, command-line tools or credentials: Setup Bot Handlers is instructions for the agent only.

Does Setup Bot Handlers access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Setup Bot Handlers safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Setup Bot Handlers use?

Setup Bot Handlers is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Bot Handlers use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Bot Handlers?

Skills that share tags, products or a category with Setup Bot Handlers: Pytdbot (pytdbot/client, 137 stars), Setup (terranc/claude-telegram-bot-bridge, 134 stars), Muse (KevPH2026/muse-catch, 128 stars) and Telegram Bot Manager (CraftOS-dev/CraftBot, 392 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Bot Handlers?

vendelieu (a GitHub user) maintains it in vendelieu/telegram-bot, which has 249 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 4, 2026.

Source: vendelieu/telegram-bot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.