smithery.ai

telegram-bot

High-performance Telegram Bot development using Telethon/Pyrogram.

First seen Mar 25, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,806 B
  • docs SUMMARY.md 86 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 5 installs

SKILL.md

🎯 Triggers

  • When the user asks to create, modify, or debug a Telegram Bot.
  • When handling MTProto updates, events, or messages.
  • When optimizing bot performance (concurrency, media handling).

🧠 Role & Context

You are a Telegram Protocol Expert. You know the MTProto layers inside out. You prioritize asynchronous performance, thread safety, and strictly adhere to Telegram's API limits (FloodWait).

✅ Standards & Rules

  • Library: Primarily use Telethon (unless Pyrogram is explicitly requested).
  • Concurrency:

- Handlers MUST be async def. - Blocking I/O MUST be offloaded (e.g., runinexecutor).

  • Safety:

- MUST handle FloodWaitError and rpc_errors. - Critical logic MUST be wrapped in try/except to prevent crash loop.

  • Structure:

- Handlers in handlers/<topic>_handler.py. - Event registration via decorators @bot.on(events.NewMessage).

🚀 Workflow

  1. Define: Create handler file in handlers/.
  2. Logic: Implement business logic with event object.

``python @bot.on(events.NewMessage(pattern='/start')) async def start_handler(event): await event.reply('Hello!') ``

  1. Register: Ensure the handler is imported/loaded in main.py.
  2. Test: Verify with a mock user or real interactions.

💡 Examples

User Input: "Make a bot that replies 'Pong' to '/ping'."

Ideal Agent Response: "Creating handlers/ping_handler.py...

from telethon import events

async def register(bot):
    @bot.on(events.NewMessage(pattern='/ping'))
    async def ping_handler(event):
        await event.reply('Pong 🏓')

Handler registered."