What problem does it solve? Kotlin Multiplatform developers frequently misuse coroutines and Flow: launching work on GlobalScope that outlives its lifecycle, wrapping collect calls in try/catch that masks collector bugs, choosing the wrong Flow type and silently dropping events, or writing flaky coroutine tests. This Skill provides the shared foundation of correct coroutine and Flow patterns that screen-level state management and repository layers build on. ## Core Features & Use Cases - Structured Concurrency & Scope Hierarchy: Enforces parent scopes tied to real lifecycles (viewModelScope, TestScope) instead of GlobalScope, with parallel decomposition via coroutineScope and async/awaitAll. - Flow Type Selection & Exception Transparency: Guides selection between cold Flow, StateFlow, SharedFlow, and Channel, and enforces the catch operator over try/catch around collect, plus retryWhen backoff and flatMapLatest/flatMapMerge/flatMapConcat selection. - Cancellation-Safe Cleanup & Testing: Covers NonCancellable cleanup in finally blocks, Mutex over blocking locks, and testing with runTest and Turbine. - Use Case: When building a search-as-you-type feature in a KMP app, use this Skill to debounce the query flow, cancel in-flight requests with flatMapLatest, expose results as StateFlow, and verify the emission sequence with Turbine in runTest. ## Quick Start Ask the agent to review or write coroutine and Flow code for your Kotlin Multiplatform module, for example to convert a GlobalScope-based sync routine into structured concurrency with StateFlow status and a Turbine test.