What problem does it solve?
Writing asynchronous and reactive code in Kotlin for Android and Kotlin Multiplatform projects often leads to unstructured concurrency, memory leaks, unhandled cancellations, and messy state management. This Skill eliminates those issues by providing production-proven patterns for safe, maintainable async implementation.
Core Features & Use Cases
- Structured Concurrency Patterns: Scope hierarchy, parallel decomposition, and supervisorScope to prevent memory leaks and ensure proper cancellation of related async tasks.
- Flow Reactive Patterns: StateFlow for UI state, flow combination, debounce, retry with backoff, and SharedFlow for one-time events to build responsive, resilient data streams.
- Testing & Safety Guards: Coroutine testing patterns with Turbine and TestDispatcher, plus anti-pattern avoidance rules to eliminate common async bugs.
- Use Case: An Android developer building a real-time search feature can use this Skill to implement a debounced search flow with exponential backoff retry, proper state management, and full test coverage without coroutine leaks or unhandled errors.
Quick Start
Use the kotlin-coroutines-flows skill to implement a debounced, retrying search query flow for your Android app's UI state with proper lifecycle-aware scope management.