using-telegram-bot

using-telegram-bot is a skill for Claude Code, Codex from besoeasy/open-skills. It costs 23 tokens per session (609 once invoked), scanned A, original, MIT.

A practical guide to building Telegram bots in Node.js with Telegraf, a library for handling Telegram messages and commands. It includes examples for polling, replies, media, files, buttons, and callbacks.

In plain words
What is it for?
Creating bots that respond to commands and text, send media or documents, and show interactive buttons.
Why use it?
It provides ready-to-adapt patterns for common bot behavior instead of requiring developers to design them from nothing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Creating bots that respond to commands and text, send media or documents, and show interactive buttons.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/besoeasy/open-skills/using-telegram-bot
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add besoeasy/open-skills --skill using-telegram-bot
Clone the repo
git clone --depth 1 https://github.com/besoeasy/open-skills

Made for: Claude Code, Codex.

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 using-telegram-bot

README.md
[![agentmods](https://agentmods.dev/badge/skills/besoeasy/open-skills/using-telegram-bot.svg)](https://agentmods.dev/skills/besoeasy/open-skills/using-telegram-bot)
Your own site
<a href="https://agentmods.dev/skills/besoeasy/open-skills/using-telegram-bot"><img src="https://agentmods.dev/badge/skills/besoeasy/open-skills/using-telegram-bot.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00023 $0.00609
Opus 5 $0.00012 $0.00304
Sonnet 5 $0.00005 $0.00122
Haiku 4.5 $0.00002 $0.00061

Measured 9d ago against content hash 6852e475abf9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

using-telegram-bot 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 9d 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.

skills/using-telegram-bot/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Telegram (Telegraf) Skill — Node.js

Short guide to build Telegram bots with telegraf (Node.js).

Overview

Minimal polling bot

// bot.js
const { Telegraf, Markup } = require('telegraf');
const bot = new Telegraf(process.env.BOT_TOKEN);

bot.start(ctx => ctx.reply('Welcome! I can help with commands.'));

bot.command('echo', ctx => {
  const text = ctx.message.text.split(' ').slice(1).join(' ');
  ctx.reply(text || 'usage: /echo your message');
});

bot.on('text', ctx => ctx.reply(`You said: ${ctx.message.text}`));

bot.launch();

process.once('SIGINT', () => bot.stop('SIGINT'));
process.once('SIGTERM', () => bot.stop('SIGTERM'));

Run:

BOT_TOKEN=123:ABC node bot.js

Send media and files

// send photo
await ctx.replyWithPhoto('https://example.com/image.jpg', { caption: 'Nice pic' });

// send document
await ctx.replyWithDocument('https://example.com/file.pdf');

Inline keyboards and callbacks

// show inline buttons
await ctx.reply('Choose:', Markup.inlineKeyboard([
  Markup.button.callback('OK', 'ok'),
  Markup.button.callback('Cancel', 'cancel')
]));

bot.action('ok', ctx => ctx.reply('You pressed OK'));
bot.action('cancel', ctx => ctx.reply('Cancelled'));

Webhook (Express) example

const express = require('express');
const { Telegraf } = require('telegraf');
const bot = new Telegraf(process.env.BOT_TOKEN);
const app = express();

app.use(bot.webhookCallback('/telegraf'));
bot.telegram.setWebhook(`${process.env.PUBLIC_URL}/telegraf`);

app.listen(process.env.PORT || 3000);

Use webhooks for production deployments (faster, lower resource use).

Error handling

bot.catch((err, ctx) => {
  console.error('Bot error', err);
});

Tips

  • Use environment variables for tokens and URLs.
  • Respect Telegram rate limits (avoid flooding large groups).
  • For local testing, use polling; for deployment use webhooks behind HTTPS.
  • Add NODE_ENV=production and graceful shutdown hooks for reliability.

Read the full file on GitHub · 99 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. 9d ago First seen · 99 lines · 23 tokens per session scan A 6852e475abf9

Subscribe to this mod's changes

using-telegram-bot is a skill published in the GitHub repository besoeasy/open-skills (132 stars, last pushed 4d ago), licensed MIT. It adds 23 tokens to every session and 609 once invoked, about $0.0001 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

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

stripe-projects

Use after E2B sandbox/API access has been provisioned through Stripe Projects and the user needs to use the resulting E2B API key with the E2B CLI, JavaScript SDK, Python SDK, or Code Interpreter SDK.

e2b-dev/E2B · 51 tokens

ax-go-flow

Use when writing Go code with github.com/ax-llm/ax/packages/go for flows, nodes, program graphs, nested programs, dynamic options, caching, and optimizer components.

ax-llm/ax · 43 tokens

ax-event-runtime

Use AxEventRuntime to ingest events, explicitly wake or resume AxGen, AxAgent, and AxFlow, persist state and results, and route outputs safely.

ax-llm/ax · 36 tokens

webhook-subscriptions

Create and manage webhook subscriptions for event-driven agent activation. Use when the user wants external services (GitHub, GitLab, Stripe, Linear, PagerDuty, Sentry, or any generic source) to trigger agent runs by POSTing events to a URL.

moltis-org/moltis · 57 tokens