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.
Install
npx skills add PanPanFR/oh-my-openkilo --skill kotlin-coroutinesgit 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-coroutinesPersonal 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:Details
- Skill name
kotlin-coroutines- Repository
- PanPanFR/oh-my-openkilo
- 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
9PanPanFR/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
Agentmemory
9PanPanFR/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.
Agentmemory History
9PanPanFR/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".
Kotlin Data Layer
9PanPanFR/oh-my-openkilo
Build the Android data layer with Room, DataStore, Retrofit/OkHttp, serialization, offline-first sync, and coroutines/Flow.
Kotlin Build Performance
9PanPanFR/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.
Kotlin Flow
9PanPanFR/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.
Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.