kotlin-coroutines-flows

Manage asynchronous Kotlin code with coroutines and Flow patterns.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/TruCol270/salty-pickle --skill kotlin-coroutines-flows-trucol270
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-coroutines-flows
Source: https://github.com/TruCol270/salty-pickle/tree/main/.claude-skills/kotlin-coroutines-flows
Command: npx skills add https://github.com/TruCol270/salty-pickle --skill kotlin-coroutines-flows-trucol270

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kotlin coroutines and Flow patterns are complex to implement correctly across Android and Kotlin Multiplatform projects. This guide provides structured concurrency practices, Flow-based reactive patterns, and robust testing strategies to build responsive, maintainable apps.

Core Features & Use Cases

  • Structured concurrency patterns (Scope Hierarchy, supervisorScope) for safe async code
  • Flow-based reactive streams with Flow, StateFlow, and SharedFlow
  • Testing strategies for coroutines and flows across Android and KMP
  • Parallel execution and cancellation handling in multi-source data loads
  • Cross-platform coroutine usage in Kotlin Multiplatform projects

Quick Start

Provide a minimal Android example showing structured concurrency with viewModelScope and StateFlow to fetch and display data.

Frequently Asked Questions about kotlin-coroutines-flows

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage asynchronous Kotlin code with structured concurrency in Android?

Structured concurrency in Kotlin manages asynchronous code by enforcing a strict scope hierarchy, using viewModelScope and supervisorScope to ensure safe async execution and automatic cancellation across Android and Kotlin Multiplatform projects.

What's the best way to handle reactive streams with StateFlow and SharedFlow in Kotlin?

Handling reactive streams with StateFlow and SharedFlow provides robust state management and event broadcasting, enabling Flow-based reactive patterns that safely emit values across Android and Kotlin Multiplatform coroutine scopes.

How do I test Kotlin coroutines and Flow for parallel loading scenarios?

Testing Kotlin coroutines and Flow for parallel loading requires strategies that validate parallel execution and cancellation handling, ensuring coroutine-driven code remains testable across Android and Kotlin Multiplatform platforms.

Can I use Kotlin coroutines and Flow in Kotlin Multiplatform projects?

Kotlin coroutines and Flow fully support Kotlin Multiplatform projects, enabling cross-platform coroutine usage for structured concurrency, reactive streams, and parallel data loads while maintaining safe cancellation and robust error handling.

Why does my Kotlin Flow execution fail when handling errors across multiple data sources?

Kotlin Flow execution fails across multiple data sources when robust error handling and safe cancellation practices are missing, requiring proper scope usage and supervisorScope to prevent structured concurrency failures in parallel loads.