Skip to content
affaan-m avatar

Kotlin Coroutines Flows

Kotlin coroutine and Flow patterns for Android and KMP covering structured concurrency, operators, and testing.

CCM score
75 of 100
skills.sh installs
12.9K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers structured concurrency, Flow operators, StateFlow and SharedFlow usage, cancellation, dispatchers, and testing with Turbine
  • Includes examples for parallel decomposition with async, debounced search, retry with exponential backoff, and one-shot UI effects
  • Enforces structured concurrency by flagging GlobalScope, mutable collections in MutableStateFlow, and catching CancellationException
  • Designed for Android and Kotlin Multiplatform projects where coroutines or Flow code is written or cancellation bugs are debugged

Install

$ npx -y skills add affaan-m/ecc --skill kotlin-coroutines-flows -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Kotlin Coroutines & Flows

Patterns for structured concurrency, Flow-based reactive streams, and coroutine testing in Android and Kotlin Multiplatform projects.

When to Activate

  • Writing async code with Kotlin coroutines
  • Using Flow, StateFlow, or SharedFlow for reactive data
  • Handling concurrent operations (parallel loading, debounce, retry)
  • Testing coroutines and Flows
  • Managing coroutine scopes and cancellation

Structured Concurrency

Scope Hierarchy

Application
  └── viewModelScope (ViewModel)
        └── coroutineScope { } (structured child)
              ├── async { } (concurrent task)
              └── async { } (concurrent task)

Always use structured concurrency — never GlobalScope:

// BAD
GlobalScope.launch { fetchData() }

// GOOD — scoped to ViewModel lifecycle
viewModelScope.launch { fetchData() }

// GOOD — scoped to composable lifecycle
LaunchedEffect(key) { fetchData() }

Parallel Decomposition

Use coroutineScope + async for parallel work:

Details

Repository
github.com/affaan-m/ecc
Categories
Mobile Apps, Go, Java & JVM
First seen
Jul 14, 2026

Questions

What does the kotlin-coroutines-flows skill help with?

It gives Kotlin Coroutines and Flow patterns for Android and Kotlin Multiplatform projects, covering structured concurrency, Flow operators, StateFlow, error handling, and testing. It applies when you write coroutine or Flow code or debug cancellation and concurrency issues.

How do I install the kotlin-coroutines-flows skill?

Run npx -y skills add affaan-m/ecc --skill kotlin-coroutines-flows -y in your project. Once installed, the agent can write and review coroutine and Flow code using these patterns.

Where does kotlin-coroutines-flows rank in the Mobile Apps category?

It ranks in the top 100 on the Mobile Apps category page on Claude Marketplaces. It stands out for focusing on coroutines and Flow for Android and Kotlin Multiplatform, including StateFlow for UI state and coroutine testing with Turbine.

More from affaan-m/ecc

All 257

Similar to Kotlin Coroutines Flows

More Mobile Apps