kotlin-coroutines
Installation
SKILL.md
Kotlin Coroutines
Overview
Best practices for Kotlin Coroutines — covering structured concurrency, Flow operators, StateFlow, SharedFlow, error handling, testing, and common pitfalls.
Structured Concurrency
Always Use a Scoped Coroutine
// ❌ GlobalScope — leaks, no lifecycle, unstructured
GlobalScope.launch { fetchData() }