unity-async-patterns
Installation
SKILL.md
Async & Coroutine Patterns -- Correctness Patterns
Prerequisite skills:
unity-scripting(coroutines, Awaitable API, yield types),unity-lifecycle(destruction timing, destroyCancellationToken)
These patterns target async bugs that are especially dangerous because they often work during testing and fail in production: exceptions silently swallowed, objects destroyed mid-await, and thread context violations.
PATTERN: Awaitable Double-Await
WHEN: Storing an Awaitable instance and awaiting it more than once
WRONG (Claude default):
Awaitable task = Awaitable.WaitForSecondsAsync(2f);
await task; // First await -- works
await task; // Second await -- UNDEFINED BEHAVIOR (may complete instantly or throw)
Related skills