Kotlin Coroutines

Expert guidance on writing correct Kotlin coroutines — structured concurrency, scopes, dispatchers, cancellation, supervisorScope, and exception handling. Use this whenever you add suspending code.

9 stars 1 forksMobile Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add PanPanFR/oh-my-openkilo --skill kotlin-coroutines
Manual install
git clone --depth 1 https://github.com/PanPanFR/oh-my-openkilo.git /tmp/oh-my-openkilo
mkdir -p ~/.claude/skills
cp -r /tmp/oh-my-openkilo/archive/skills/android/kotlin-coroutines ~/.claude/skills/kotlin-coroutines

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Kotlin Coroutines — Structured Concurrency

## Instructions

Every coroutine must have a parent scope. That scope defines cancellation and error propagation. Never launch into `GlobalScope`.

### 1. Scopes You Actually Use

| Scope | When |
|---|---|
| `viewModelScope` | Work owned by a ViewModel. Cancels on `onCleared()`. |
| `lifecycleScope` | Activity/Fragment lifecycle-bound work. Prefer `repeatOnLifecycle(STARTED) { }` around it. |
| Injected `@ApplicationScope CoroutineScope` | App-wide work (sync, WorkManager helpers). Built on `SupervisorJob() + Dispatchers.Default`. |
| `coroutineScope { }` | Create a temporary scope inside a suspend function. Failure of any child cancels siblings. |
| `supervisorScope { }` | Same, but a child failure doesn't cancel siblings. Use for independent parallel fan-out. |

```kotlin
@Module @InstallIn(SingletonComponent::class)
object CoroutineModule {
    @Provides @Singleton @ApplicationScope
    fun provideAppScope(): CoroutineScope =
        CoroutineScope(SupervisorJob() + Dispatchers.Default + CoroutineName("appScope"))
}
```

### 2. Dispatchers

| Dispatcher | Use for |
|---|---|
| `Dispatchers.Main.immediate` | Touching UI, Compose state, `LiveData`. |
| `Dispatchers.Default` | CPU-bound work (parsing, transforms, sorting). |
| `Dispatchers.IO` | Disk, network, blocking JDBC calls. |
| `Dispatchers.Unconfined` | Only in tests and specific rare stream bridges. |

Inject dispatchers so tests can swap them:
Read the full skill on GitHub

Details

Skill name
kotlin-coroutines
Path
archive/skills/android/kotlin-coroutines/SKILL.md
License
MIT
Repo updated
2 November 2026

FAQ

What does the Kotlin Coroutines skill do?

Expert guidance on writing correct Kotlin coroutines — structured concurrency, scopes, dispatchers, cancellation, supervisorScope, and exception handling. Use this whenever you add suspending code.

How do I install the Kotlin Coroutines skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add PanPanFR/oh-my-openkilo --skill kotlin-coroutines. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Kotlin Coroutines popular?

It lives in PanPanFR/oh-my-openkilo, which has 9 GitHub stars and 1 forks.

Related skills

Adaptive

9

PanPanFR/oh-my-openkilo

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto, and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API, and how to preserve UI, navigation, scroll, and media playback state across configuration changes (such as folding/unfolding a foldable, rotating a device, or resizing a window). It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as button

Mobile Development

Agentmemory

9

PanPanFR/oh-my-openkilo

Index for agentmemory internals: how it is wired into a host agent, its architecture and ports, configuration flags, capture hooks, MCP tool surface, and REST fallback. Use when installing or debugging agentmemory itself, when a memory tool name or parameter is unclear, or when capture is not recording. For normal recall and save work, use agentmemory-ops instead.

AI, LLMs & Agents

Agentmemory History

9

PanPanFR/oh-my-openkilo

Read past work: resume the last session, recap recent sessions, list agent-linked commits, trace a line back to the session that wrote it, or compact the current conversation for handoff. Use when the user says "where were we", "resume", "recap", "session history", "what did we do", "why is this code here", "who wrote this", or "handoff".

AI, LLMs & Agents

Kotlin Data Layer

9

PanPanFR/oh-my-openkilo

Build the Android data layer with Room, DataStore, Retrofit/OkHttp, serialization, offline-first sync, and coroutines/Flow.

Mobile Development

Kotlin Build Performance

9

PanPanFR/oh-my-openkilo

Expert guidance on making Kotlin Android builds fast — configuration cache, build cache, KSP vs KAPT, module graph, Gradle daemon tuning. Use this when builds are slow or CI times blow up.

Mobile Development

Kotlin Flow

9

PanPanFR/oh-my-openkilo

Expert guidance on Kotlin Flow — cold vs hot flows, StateFlow / SharedFlow, common operators, combining, back-pressure, and testing with Turbine. Use this for any reactive data stream work.

Mobile Development

Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.