Python asyncio patterns for concurrent programming. Triggers on: asyncio, async, await, coroutine, gather, semaphore, TaskGroup, event loop, aiohttp, concurrent.
Install with Tessl CLI
npx tessl i github:NeverSight/skills_feed --skill python-async-patterns83
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
Bounded concurrent HTTP fetching
Uses aiohttp
0%
100%
ClientSession context manager
0%
100%
Response context manager
0%
100%
Uses gather
0%
100%
gather return_exceptions
0%
100%
Uses Semaphore
0%
100%
Semaphore as context manager
0%
100%
No blocking HTTP calls
0%
100%
No time.sleep
100%
100%
asyncio.run entry point
0%
100%
Without context: $0.1973 · 57s · 14 turns · 21 in / 2,424 out tokens
With context: $0.4038 · 1m 19s · 26 turns · 29 in / 3,961 out tokens
TaskGroup and timeout structured concurrency
Uses TaskGroup
0%
0%
tg.create_task usage
0%
0%
Uses asyncio.timeout
0%
100%
timeout as context manager
0%
100%
Catches TimeoutError
100%
100%
Concurrent execution
100%
100%
No time.sleep
100%
100%
asyncio.run entry point
100%
100%
Timeout threshold applied
100%
100%
Without context: $0.2159 · 48s · 14 turns · 21 in / 2,195 out tokens
With context: $0.3754 · 1m 8s · 22 turns · 26 in / 3,841 out tokens
Async context managers and task reference management
asynccontextmanager decorator
100%
100%
Context manager usage
100%
100%
Uses asyncio.Queue
100%
100%
Producer puts to queue
100%
100%
Consumer gets from queue
100%
100%
Task references stored
100%
100%
Tasks awaited
100%
100%
Uses asyncio.Lock
100%
100%
Lock as context manager
100%
100%
asyncio.run entry point
100%
100%
Without context: $0.2756 · 1m 4s · 14 turns · 21 in / 3,578 out tokens
With context: $0.4181 · 1m 38s · 20 turns · 275 in / 5,376 out tokens
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.