kotlin-coroutines-expert
Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.
npx skills add sickn33/agentic-awesome-skills --skill kotlin-coroutines-expert --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Kotlin Coroutines Expert ## Overview A guide to mastering asynchronous programming with Kotlin Coroutines. Covers advanced topics like structured concurrency, `Flow` transformations, exception handling, and testing strategies. ## When to Use This Skill - 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. ## Step-by-Step Guide ### 1. Structured Concurrency Always launch coroutines within a defined `CoroutineScope`. Use `coroutineScope` or `supervisorScope` to group concurrent tasks. ```kotlin suspend fun loadDashboardData(): DashboardData = coroutineScope { val userDeferred = async { userRepo.getUser() } val settingsDeferred = async { settingsRepo.getSettings() } DashboardData( user = userDeferred.await(), settings = settingsDeferred.await() ) } ``` ### 2. Exception Handling Use `CoroutineExceptionHandler` for top-level scopes, but rely on `try-catch` within suspending functions for granular control. ```kotlin val handler = CoroutineExceptionHandler { _, exception -> println("Caught $exception") }
- Overview
- When to Use This Skill
- Step-by-Step Guide
- 1. Structured Concurrency
- 2. Exception Handling
- 3. Reactive Streams with Flow
- Examples
- Example 1: Parallel Execution with Error Handling
- Best Practices
- Troubleshooting
- Limitations
What does the kotlin-coroutines-expert skill do?
Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill kotlin-coroutines-expert --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 sickn33/agentic-awesome-skills, a repository with 44,414 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.