android-kotlin

Implements Android Kotlin apps with Coroutines, Jetpack Compose, Hilt, and MockK testing.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill android-kotlin-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-kotlin
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/pi/.pi/agent/skills/android-kotlin
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill android-kotlin-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android Kotlin development involves many moving parts—Gradle configuration, coroutine-based state management, Compose UI, dependency injection, and testing—and getting the architecture and boilerplate right is time-consuming and error-prone. ## Core Features & Use Cases - Project Scaffolding & Gradle Setup: Provides a complete MVVM project structure and Kotlin DSL build configuration with Compose BOM, Hilt, Room, and KSP. - Coroutines & Compose Patterns: Supplies ready-to-use ViewModel with StateFlow, Repository with Flow, and lifecycle-aware Compose screen implementations. - Testing & CI: Includes MockK and Turbine unit test patterns, a MainDispatcherRule, detekt lint configuration, and a GitHub Actions CI workflow. - Use Case: When building a new Android feature screen, use this Skill to generate the ViewModel, Compose UI, repository layer, and corresponding unit tests following consistent architecture. ## Quick Start Ask the AI to create an Android Kotlin feature screen with a Hilt ViewModel, StateFlow state management, Compose UI, and MockK unit tests.

Frequently Asked Questions about android-kotlin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an Android Kotlin project with MVVM architecture?

Organize code into data, domain, and ui layers: repositories and Room/Retrofit sources in data, use cases and models in domain, and Compose screens with Hilt ViewModels in ui. The Skill provides a complete directory layout and Gradle Kotlin DSL configuration.

How to test Android ViewModels with MockK and Turbine?

Use MockK's coEvery to stub use case responses and Turbine's test extension to assert StateFlow emissions in order. A MainDispatcherRule with UnconfinedTestDispatcher replaces the main dispatcher so viewModelScope coroutines run synchronously in tests.

Should I use StateFlow or LiveData in Android Compose apps?

StateFlow is the recommended choice for Compose apps, exposed as an immutable StateFlow from the ViewModel and collected with collectAsStateWithLifecycle. Never expose MutableStateFlow publicly, and always handle errors with the catch operator on flows.

Does Hilt work with Jetpack Compose navigation?

Yes, Hilt integrates with Compose through hiltViewModel() from the hilt-navigation-compose artifact, which provides ViewModels scoped to navigation destinations. SavedStateHandle arguments like userId are injected automatically into the ViewModel constructor.

What are common Kotlin coroutine anti-patterns on Android?

Avoid runBlocking on the main thread, GlobalScope usage, collecting flows in init blocks, and hardcoded dispatchers. Use structured concurrency with viewModelScope, inject dispatchers for testability, and collect with repeatOnLifecycle or collectAsStateWithLifecycle.