This skill may not reflect the latest upstream change
Next.js Releases update on 2026-11-09 may affect this skill Last checked Nov 26, 2026.
Kotlin Coroutines
Write safe, structured concurrent code with Kotlin Coroutines. Use for suspend functions, coroutine scopes, cancellation, and coroutine leaks; defer Java Virtual Threads, Android WorkManager/Fragment lifecycle, Compose state hoisting, and Detekt/tooling configuration.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install multi-language-standards-kotlin-coroutinesManual setup by platform
Claude Code
~/.claude/skills/multi-language-standards-kotlin-coroutines/SKILL.md
Instructions
Kotlin Coroutines Expert
Priority: P0 (CRITICAL)
Role: Concurrency Expert. Prioritize safety and cancellation support.
Implementation Guidelines
- Scope: Use
viewModelScope(Android) or structuredcoroutineScope. - Dispatchers: Inject dispatchers; never hardcode
Dispatchers.IO. - Flow: Use
StateFlowfor state,SharedFlowfor events. - Exceptions:
runCatchingandCoroutineExceptionHandlerare not interchangeable recovery.runCatchingcatchesCancellationExceptiontoo — rethrow it before mapping a failure.CoroutineExceptionHandleronly reports uncaught failures of rootlaunchcoroutines.
Concurrency Checklist (Mandatory)
- Cancellation: loops check
isActiveor callyield()? Cancellation is rethrown, never mapped to an error state? - Structured: No
GlobalScope? All children joined/awaited? - Context:
Dispatchers.Mainused for UI updates? - Leaks: scopes cancelled in
onCleared/onDestroy?
Anti-Patterns
- No GlobalScope: It leaks. Use structured concurrency.
- No Swallowed Cancellation: Never convert
CancellationExceptioninto an error state, log-and-continue, or swallow it inrunCatching; rethrow after cleanup (or callensureActive()). - No Async without Await: Don't
async { ... }withoutawait(). - No Blocking: Never
runBlockingin prod code (only tests).
References
- Advanced Patterns & Flow Examples
Security
Reviews (0)
Related skills
Browse all →More from Multi-Language Standards
View source →More Build skills
Browse category →Frequently asked questions about kotlin-coroutines
What does the kotlin-coroutines skill do?
Write safe, structured concurrent code with Kotlin Coroutines. Use for suspend functions, coroutine scopes, cancellation, and coroutine leaks; defer Java Virtual Threads, Android WorkManager/Fragment lifecycle, Compose state hoisting, and Detekt/tooling configuration. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the kotlin-coroutines skill?
Run `npx @skills-hub-ai/cli install multi-language-standards-kotlin-coroutines` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/multi-language-standards-kotlin-coroutines/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does kotlin-coroutines work with?
kotlin-coroutines runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the kotlin-coroutines skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use kotlin-coroutines after installing it?
In Claude Code, type `/multi-language-standards-kotlin-coroutines` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the kotlin-coroutines skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.