Aiogram Production Patterns
Use this skill for aiogram 3 bot work where Telegram update edge cases matter.
This bundle is runtime-neutral and focuses on:
- aiogram_i18n with Fluent/FTL
- locale managers and runtime setup
- topic-aware reply handling
- Telegram quote and forward-origin context for AI features
- production middleware ordering
- Context7 lookups for exact aiogram and aiogram_i18n API details
When to use
- A reply behaves differently in forum topics, linked discussion groups, or channel comments.
- You need a clean
aiogram_i18nsetup with locale persistence and FTL keys. - You need to understand locale managers in
aiogram_i18ninstead of inventing your own runtime flow. - You want to pass better quote or forward-origin context into AI features.
- You need a neutral middleware ordering checklist for a production bot.
Workflow
- Read references/context7-aiogram.md first to choose the right Context7 library and version before quoting API details.
- Read references/i18n-with-aiogram-i18n.md for setup, locale files, registration, and runtime behavior.
- Read references/i18n-managers.md for
BaseManager,ConstManager,MemoryManager,FSMManager, andRedisManager. - Read references/replies-and-topics.md if replies or
message_thread_idare involved. - Read references/ai-context-from-telegram-message.md if the task is about what quote or forward-origin context to pass into AI logic.
- Read references/callback-and-command-patterns.md for typed callback and command handler structure.
- Read references/middleware-order.md if behavior depends on middleware interactions.
- Reuse the bundled scripts instead of re-deriving Telegram edge case handling from scratch.
Included references
- references/context7-aiogram.md
- references/i18n-with-aiogram-i18n.md
- references/i18n-managers.md
- references/replies-and-topics.md
- references/ai-context-from-telegram-message.md
- references/callback-and-command-patterns.md
- references/middleware-order.md
Included scripts
scripts/topic_aware_reply_helpers.pyscripts/i18n_callback_query.pyscripts/forward_origin_context.py
Scope
This skill focuses on Telegram update semantics and aiogram 3 handler patterns.
It does not try to teach:
- beginner aiogram setup
- project-specific wiring frameworks
- database architecture
- generic Python basics
When exact API surface matters, prefer Context7 over memory and pin aiogram lookups to the closest aiogram 3 version that matches the target project.