
Android Coroutines
If you're building Android apps with Kotlin Coroutines, this enforces the patterns that prevent production headaches. It covers dispatcher injection for testability, lifecycle-safe Flow collection with repeatOnLifecycle, proper StateFlow encapsulation, and cooperative cancellation in long operations. The biggest value is in the constraint enforcement: no hardcoded dispatchers, no GlobalScope, no exposed MutableStateFlow, and proper CancellationException handling. It also handles the callback-to-Flow conversion pattern with callbackFlow and awaitClose. Useful when you're implementing ViewModels, fetching API data, or tracking down memory leaks related to coroutines. The rules lean opinionated but they reflect 2025 best practices and will save you from the subtle bugs that only appear in production.
- skills.sh installs
- 569
- GitHub stars
- 1K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill android-coroutines --agent claude-codeInstalls into .claude/skills of the current project.
Files
Android Coroutines Expert Skill
This skill provides authoritative rules and patterns for writing production-quality Kotlin Coroutines code on Android. It enforces structured concurrency, lifecycle safety, and modern best practices (2025 standards).
Responsibilities
- Asynchronous Logic: Implementing suspend functions, Dispatcher management, and parallel execution.
- Reactive Streams: Implementing
Flow,StateFlow,SharedFlow, andcallbackFlow. - Lifecycle Integration: Managing scopes (
viewModelScope,lifecycleScope) and safe collection (repeatOnLifecycle). - Error Handling: Implementing
CoroutineExceptionHandler,SupervisorJob, and propertry-catchhierarchies. - Cancellability: Ensuring long-running operations are cooperative using
ensureActive(). - Testing: Setting up
TestDispatcherandrunTest.
Applicability
Activate this skill when the user asks to:
- "Fetch data from an API/Database."
- "Perform background processing."
- "Fix a memory leak" related to threads/tasks.
- "Convert a listener/callback to Coroutines."
- "Implement a ViewModel."
- "Handle UI state updates."
Sponsors
Details
- Repository
- github.com/new-silvermoon/awesome-android-agent-skills
- Categories
- Code Review & Quality, AI & Agent Building, Mobile Development, Java & JVM
- First seen
- Jun 3, 2026
More from new-silvermoon/awesome-android-agent-skills
All 17- Android Accessibility560
- Android Data Layer531
- Android Retrofit495
- Coil Compose464
- Xml To Compose Migration451
- Compose Navigation438
- Rxjava To Coroutines Migration347
- Android Testing869
- Gradle Build Performance809
- Compose Ui760
- Android Gradle Logic738
- Android Architecture701
- Kotlin Concurrency Expert684
- Compose Performance Audit596
- Android Emulator Skill578
- Android Viewmodel576