android-kotlin

Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing

By alinaqi · 3,136 installs

npx skills add alinaqi/maggy --skill android-kotlin

Source repository · Upstream listing

Android Kotlin Skill Project Structure Gradle Configuration (Kotlin DSL) App level build.gradle.kts Kotlin Coroutines & Flow ViewModel with StateFlow Repository with Flow Jetpack Compose Screen with ViewModel Sealed Classes for State Result Wrapper Testing with MockK & Turbine ViewModel Tests GitHub Actions Lint Configuration detekt.yml Kotlin Anti Patterns ❌ Blocking coroutines on Main Never use runBlocking on main thread ❌ GlobalScope usage Use structured concurrency with viewModelScope/lifecycleScope ❌ Collecting flows in init Use repeatOnLifecycle or collectAsStateWithLifecycle ❌ Mutable state exposure Expose StateFlow not MutableStateFlow ❌ Not handling exceptions in flows Always use catch operator ❌ Lateinit for nullable Use lazy or nullable with ? ❌ Hardcoded dispatchers Inject dispatchers for testability ❌ Not using sealed classes Prefer sealed for finite state sets ❌ Side effects in Composables Use LaunchedEffect / SideEffect ❌ Unstable Compose parameters Use stable/immutable types or @Stable