kotlin-coroutines-flows

Implement structured concurrency and reactive streams with Kotlin coroutines and Flow.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/adomot/claude-settings --skill kotlin-coroutines-flows-adomot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-coroutines-flows
Source: https://github.com/adomot/claude-settings/tree/main/skills/aegis/kotlin-coroutines-flows
Command: npx skills add https://github.com/adomot/claude-settings --skill kotlin-coroutines-flows-adomot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android and Kotlin Multiplatform projects often struggle with safely coordinating asynchronous work and UI state updates. This skill provides structured concurrency and reactive streams patterns using Kotlin coroutines and Flow to create robust, testable, and responsive code.

Core Features & Use Cases

  • Structured concurrency with viewModelScope, coroutineScope, and async to coordinate parallel tasks.
  • Flow patterns including cold Flow, StateFlow, and SharedFlow for robust state management and event handling.
  • Cancellation handling, error propagation, and test strategies for coroutines and flows.

Quick Start

Apply structured concurrency and Flow patterns in your Android/KMP project to build robust, testable asynchronous code.

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 UI state in Android using Kotlin coroutines and StateFlow?

You manage UI state in Android using Kotlin coroutines by leveraging StateFlow within viewModelScope to emit and update state reactively. This skill provides patterns for robust state management and event handling using StateFlow and SharedFlow.

What is the best way to coordinate parallel tasks in Kotlin Multiplatform projects?

The best way to coordinate parallel tasks in Kotlin Multiplatform is using structured concurrency with coroutineScope and async. This skill guides developers in safely coordinating asynchronous work to create robust and responsive code.

How do I handle cancellation and error propagation in Kotlin Flow?

You handle cancellation and error propagation in Kotlin Flow by applying specific flow operators and cancellation mechanisms. This skill provides patterns to manage these edge cases, ensuring safe parallel loading and robust error handling.

Does this Kotlin coroutines skill apply to Kotlin Multiplatform projects?

Yes, this Kotlin coroutines skill applies directly to Kotlin Multiplatform projects. It provides structured concurrency and reactive streams patterns to safely coordinate asynchronous work and UI state updates across KMP targets.

How do I write testable code for Kotlin coroutines and Flow?

You write testable code for Kotlin coroutines and Flow by applying specific test strategies outlined in this skill. It covers testing mechanisms for coroutine code to ensure your asynchronous functions are robust and verified.

When should I use cold Flow versus SharedFlow for event handling?

You use cold Flow for on-demand data streams and SharedFlow for broadcasting events to multiple collector. This skill details these Flow patterns to implement robust reactive streams and appropriate event handling.