What problem does it solve?
This Skill eliminates common coroutine bugs like memory leaks, unhandled cancellations, main thread blocking, and incorrect Flow state modeling that cause unstable Android apps and hours of debugging, replacing guesswork with structured concurrency best practices.
Core Features & Use Cases
- Bug Fixing & Review: Diagnose and fix coroutine cancellation leaks, GlobalScope misuse, and swallowed CancellationExceptions.
- Best Practice Guidance: Choose correct dispatchers for CPU/IO/UI work, design main-safe suspend functions, and scope work to viewModelScope/lifecycleScope.
- Flow & API Bridging: Model UI state with StateFlow, one-shot events with SharedFlow, and convert legacy callback/RxJava APIs to coroutines.
- Use Case Example: If your app crashes on screen rotation due to leaked coroutines, or has jank from network calls running on the main thread, this Skill provides step-by-step fixes aligned with Kotlin 2.x and kotlinx.coroutines 1.9+ standards.
Quick Start
Use the kotlin-coroutines skill to review your ViewModel's data loading coroutine, fix any lifecycle or dispatcher issues, and ensure all async work is properly scoped and main-safe.