What problem does it solve?
This Skill eliminates the common pain points of writing unmaintainable, leak-prone asynchronous code in Kotlin Android and Kotlin Multiplatform projects, including improper coroutine scope management, unhandled flow emissions, and flaky async test execution.
Core Features & Use Cases
- Structured Concurrency Patterns: Provides implementation patterns for proper scope hierarchy, parallel async decomposition with async/await, and supervisorScope for fault-tolerant sibling operations, eliminating GlobalScope related memory leaks.
- Reactive Flow Management: Covers StateFlow/SharedFlow usage for UI state and one-time events, flow operators for debounce, retry, and stream combining, and cross-platform dispatcher configuration for Kotlin Multiplatform compatibility.
- Coroutine Testing Utilities: Includes workflows for testing StateFlow with Turbine, implementing fake flow repositories, and configuring test dispatchers for reliable, deterministic async test execution.
- Real-World Use Case: For example, use this Skill to build a search feature that debounces user input, retries failed API calls with exponential backoff, and updates UI state reactively without memory leaks or cancellation issues.
Quick Start
Use the kotlin-coroutines-flows skill to add a debounced, retry-enabled search flow with reactive UI state updates to your Android or KMP ViewModel.