async-patterns
Installation
SKILL.md
Async Patterns
Rules Summary
- Prefer
safe_gatherfor all new async code - it provides fail-fast, timeout support, and cleaner cancellation - Use
safe_gatherwithreturn_exceptions=Truefor partial-results patterns (better than asyncio.gather due to timeout support) - Migrating existing cleanup/shutdown code to
safe_gatheris optional (low priority, both work fine) - Only use
asyncio.waitwithFIRST_COMPLETEDfor incremental processing patterns - Always consider timeout and cancellation behavior when choosing async primitives