AgentSkillsCN

aiogram-framework

使用aiogram v3构建、重构或排查Telegram机器人。当您处理aiogram的路由器/处理器/过滤器、Dispatcher生命周期、更新推送(长轮询或Webhook)、FSM状态机、中间件/DI依赖注入、错误处理,或aiogram提供的键盘、格式化、国际化等实用工具时,可选用此功能。

SKILL.md
--- frontmatter
name: aiogram-framework
description: Build, refactor, or troubleshoot Telegram bots using aiogram v3. Use when working with aiogram routers/handlers/filters, Dispatcher lifecycle, update delivery (long polling or webhook), FSM, middleware/DI, error handling, or aiogram utilities like keyboards, formatting, and i18n.

Aiogram Framework

Overview

Use this skill to design or modify aiogram-based bots in this repository with v3 patterns and the local docs/examples.

Workflow

  1. Choose update delivery (polling vs webhook) and note any scaling or multi-bot needs. See references/updates.md.
  2. Define dispatcher/router layout and handler registration. See references/quickstart.md and references/handlers-filters.md.
  3. Add filters and context injection (including custom filters) as needed. See references/handlers-filters.md and references/middleware-di-errors.md.
  4. Add middleware and error handling for cross-cutting concerns. See references/middleware-di-errors.md.
  5. Add FSM if the flow is multi-step or needs user state. See references/fsm.md.
  6. Use utilities (keyboards, formatting, i18n) where they reduce boilerplate. See references/utils.md.
  7. Cross-check with local examples under examples/ before finalizing.

Reference Map

  • Quickstart and project shape: references/quickstart.md
  • Update delivery details: references/updates.md
  • Routers/handlers/filters: references/handlers-filters.md
  • Middlewares, DI, errors: references/middleware-di-errors.md
  • FSM and storage: references/fsm.md
  • Utilities (keyboard/formatting/i18n): references/utils.md