kotlin-coroutines-expert
Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.
Target: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- Kotlin Coroutines Expert
- Overview
- When to Use This Skill
- Step-by-Step Guide
- 1. Structured Concurrency
- 2. Exception Handling
- 3. Reactive Streams with Flow
- Examples
A guide to mastering asynchronous programming with Kotlin Coroutines. Covers advanced topics like structured concurrency, Flow transformations, exception handling, and testing strategies. Use when implementing asynchronous operations in Kotlin. Use when designing reactive data streams with Flow. Use when debugging coroutine cancellations or exceptions. Use when writing unit tests for suspending functions or Flows. Always launch coroutines within a defined CoroutineScope. Use coroutineScope or supervisorScope to group concurrent tasks. Use CoroutineExceptionHandler for top-level scopes, but rely on try-catch within suspending functions for granular control. Use StateFlow for state that needs to be retained, and SharedFlow for events. ✅ Do: Use Dispatchers.IO for blocking I/O operations. ✅ Do: Cancel scopes when they are no longer needed (e.g., ViewModel.onCleared). ✅ Do: Use TestScope and runTest for unit testing coroutines. ❌ Don't: Use GlobalScope. It breaks structured concurrency and can lead to leaks. ❌ Don't: Catch CancellationException unless you rethrow it. Problem: Coroutine test hangs or fails unpredictably. Solution: Ensure you are using runTest and injecting TestDispatche
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- davila7/claude-code-templates
- Source file
- cli-tool/components/skills/development/kotlin-coroutines-expert/SKILL.md
- Fixed revision
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:44.484Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.