kotlin-concurrency-expert
Kotlin Concurrency Expert
Overview
Review and fix Kotlin Coroutines issues in Android codebases by applying structured concurrency, lifecycle safety, proper scoping, and modern best practices with minimal behavior changes.
Workflow
1. Triage the Issue
- Capture the exact error, crash, or symptom (ANR, memory leak, race condition, incorrect state).
- Check project coroutines setup:
kotlinx-coroutines-androidversion,lifecycle-runtime-ktxversion. - Identify the current scope context (
viewModelScope,lifecycleScope, custom scope, or none). - Confirm whether the code is UI-bound (
Dispatchers.Main) or intended to run off the main thread (Dispatchers.IO,Dispatchers.Default). - Verify Dispatcher injection patterns for testability.
2. Apply the Smallest Safe Fix
Prefer edits that preserve existing behavior while satisfying structured concurrency and lifecycle safety.
More from new-silvermoon/awesome-android-agent-skills
android-testing
Comprehensive testing strategy involving Unit, Integration, Hilt, and Screenshot tests.
437gradle-build-performance
Debug and optimize Android/Gradle build performance. Use when builds are slow, investigating CI/CD performance, analyzing build scans, or identifying compilation bottlenecks.
436compose-ui
Best practices for building UI with Jetpack Compose, focusing on state hoisting, detailed performance optimizations, and theming. Use this when writing or refactoring Composable functions.
405android-gradle-logic
Expert guidance on setting up scalable Gradle build logic using Convention Plugins and Version Catalogs.
377android-architecture
Expert guidance on setting up and maintaining a modern Android application architecture using Clean Architecture and Hilt. Use this when asked about project structure, module setup, or dependency injection.
351android-emulator-skill
Production-ready scripts for Android app testing, building, and automation. Provides semantic UI navigation, build automation, log monitoring, and emulator lifecycle management. Optimized for AI agents with minimal token output.
337