smithery/smolagen

Telegram Bot Development (Aiogram v3)

Best practices for implementing Telegram Bots in TMS using Aiogram v3 and Redis.

Installation

$ npx skills add smithery/smolagen --skill telegram-bot-development-aiogram-v3

Similar popular skills

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

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

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,352 B
  • docs SUMMARY.md 123 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Telegram Bot Skill

Technology Stack

  • Framework: Aiogram 3.x
  • Storage: Redis (for FSM and Caching)
  • Architecture: Router-based (Modular)

Key Patterns

1. Router Setup

Use Router for modularity. Do not attach handlers directly to Dispatcher in modules.

from aiogram import Router
router = Router(name="feature_name")

@router.message(...)
async def handler(...): ...

2. Dependency Injection (Middleware)

Common objects like driver (User model) or configuration are injected via Middlewares (AuthMiddleware).

  • Handlers should type-hint expected injected middleware arguments:
@router.message(...)
async def handle_msg(message: Message, driver: Driver): 
    # 'driver' is injected by AuthMiddleware
    ...

3. Location & State Handling

  • Use src.services.location_manager.LocationManager with Redis for handling geo-updates.
  • Use F.content_type == ContentType.LOCATION filters.
  • Support both message (one-time) and edited_message (Live Location updates).

4. Logging

Use structlog via src.core.logging.get_logger.

logger = get_logger(__name__)
logger.info("event_name", user_id=123, key="value")