Aiogram architecture refactor
Skill ballisarium/aiogram-bot-skills/skills/aiogram-architecture-refactor
use for a deliberate, bounded aiogram bot refactor; рефакторинг, move handler logic, split routers, services, keyboards, texts, i18n, repositories.From its SKILL.md
npx -y skills add ballisarium/aiogram-bot-skills --skill aiogram-architecture-refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.9 KB, 330 tokens by cl100k_base, as published. Nobody here has run it
aiogram architecture refactor
improve structure without changing public telegram behavior. do not invoke for normal feature work unless structure blocks the requested change.
workflow
- use
aiogram-project-orientationunless the repository is already mapped. - define the boundary: behavior that must remain invariant, files and layers in scope, explicit exclusions, and tests that protect the behavior.
- add focused characterization tests before a non-trivial move when existing coverage is missing.
- move one responsibility at a time through existing architecture: handler logic to a service, data access to a repository, markup to a keyboard builder, text to localization, callback assembly to a factory, or a large router to domain routers.
- preserve commands, callback payload compatibility, persisted FSM state names, user-facing text, keyboard layout, permissions, and polling or webhook behavior unless the request explicitly changes them.
- preserve the installed aiogram major-version style and existing dependency wiring. do not introduce a parallel architecture for a single function.
- keep imports safe: no startup on import, global
Botinstance in feature modules, circular imports, handler config loading, or live network access in tests. - use
aiogram-bot-verifyafter each meaningful slice and resolve failures before the next move.
completion requires a bounded responsibility move, protected invariant behavior, preserved compatibility, and verification for every slice. report what moved, what stayed stable, checks run, and remaining gaps.
guardrails
do not mix feature changes, aiogram migration, deployment changes, or unrelated cleanup into the refactor. never rename persisted callbacks or FSM states casually.