Agent skill

kotlin-coroutines-flows

Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill kotlin-coroutines-flows --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/kotlin-coroutines-flows/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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`: ```kotlin // 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: ```kotlin suspend fun loadDashboard(): Dashboard = coroutineScope { val items = async { itemRepository.getRecent() } val stats = async { statsRepository.getToday() } val profile = async { userRepository.getCurrent() } Dashbo

What's inside
Steps it walks through
  1. When to Activate
  2. Structured Concurrency
  3. Scope Hierarchy
  4. Parallel Decomposition
  5. SupervisorScope
  6. Flow Patterns
  7. Cold Flow — One-Shot to Stream Conversion
  8. StateFlow for UI State
  9. Combining Multiple Flows
  10. Flow Operators
  11. SharedFlow for One-Time Events
  12. Dispatchers
  13. Cancellation
  14. Cooperative Cancellation
More from everything-openai-codex
All skills →
About this skill
What does the kotlin-coroutines-flows skill do?

Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill kotlin-coroutines-flows --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going