← ClaudeAtlas

android-coroutineslisted

Coroutines and Flow per Google's best practices and the Kotlin coroutines guide: dispatchers, main-safety, scopes, Flow, lifecycle collection, cancellation, exceptions, shared state, testing, concurrency reviews. Use for async code or coroutine tests, and for ANRs, leaks, races, hangs, viewModelScope crashes, silently lost errors, work that ignores cancellation, or runTest timeouts.
pablitoarango/android-skills · ★ 3 · AI & Automation · score 74
Install: claude install-skill pablitoarango/android-skills
# Android Coroutines Sources of truth: [Best practices for coroutines in Android](https://developer.android.com/kotlin/coroutines/coroutines-best-practices), [Improve app performance with Kotlin coroutines](https://developer.android.com/kotlin/coroutines/coroutines-adv), [Kotlin flows on Android](https://developer.android.com/kotlin/flow), [StateFlow and SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow), [Lifecycle-aware coroutines](https://developer.android.com/topic/libraries/architecture/coroutines), [Testing coroutines](https://developer.android.com/kotlin/coroutines/test), [Testing flows](https://developer.android.com/kotlin/flow/test), [Kotlin coroutines guide](https://kotlinlang.org/docs/coroutines-guide.html), [kotlinx.coroutines API](https://kotlinlang.org/api/kotlinx.coroutines/). To audit existing code or chase a concurrency bug, use [`review.md`](review.md). Library versions: [kotlinx.coroutines releases](https://github.com/Kotlin/kotlinx.coroutines/releases), [Lifecycle releases](https://developer.android.com/jetpack/androidx/releases/lifecycle). ## 1. Dispatchers and main-safety A `suspend` modifier does not move work off the main thread. The dispatcher decides the thread: `Dispatchers.Main` for UI and quick work, `Dispatchers.IO` for blocking disk and network I/O, `Dispatchers.Default` for CPU-heavy work such as parsing or sorting. - **The class that blocks owns the thread switch.** Any `suspend` function, in any layer, must b