---
name: android-jetpack-pro
description: "Ship Jetpack Compose screens, ViewModels, and Gradle config with idiomatic best practices baked in. A senior Android engineer in skill form. Scaffolds Compose UIs, wires up Hilt, writes instrumentation tests, and handles Play Store uploads."
license: MIT
---

# Android Jetpack Pro

Android Jetpack Pro is a senior Android engineer packaged as a skill. It scaffolds Jetpack Compose screens with their backing ViewModels, wires up Hilt dependency injection, writes Compose UI and instrumentation tests, and keeps your Gradle setup current — all following the patterns Google's own samples (Now in Android, Sunflower) use. It's for Kotlin developers who want production-grade structure without hand-rolling boilerplate or relitigating architecture decisions on every feature.

## When to use it

- Starting a new feature module and you want a `@HiltViewModel` + `StateFlow` UI state holder plus a stateless Composable that collects it.
- Migrating an XML/Fragment screen to Compose and you need the navigation, state hoisting, and preview wiring done right.
- Adding `androidx.compose.material3` components, `LazyColumn` lists, or a `Scaffold` with `TopAppBar` and edge-to-edge insets.
- Setting up the Compose Compiler, BOM, and version catalog (`libs.versions.toml`) so dependencies stay aligned.
- Writing `createComposeRule()` tests or preparing a signed App Bundle for Play.

## How it works

The skill generates idiomatic code against the real Jetpack stack: `StateFlow`/`MutableStateFlow` exposed from ViewModels, `collectAsStateWithLifecycle()` in Composables, `viewModelScope.launch` for coroutine work, and unidirectional data flow (events up, state down). Hilt setup includes `@HiltAndroidApp`, `@AndroidEntryPoint`, `@Module @InstallIn` providers, and `hiltViewModel()` retrieval. Navigation uses Navigation-Compose (`NavHost`, `composable`, typed routes). Tests target `androidx.compose.ui.test.junit4` with `onNodeWithText` / `onNodeWithTag` assertions. Gradle work touches `build.gradle.kts`, the Compose BOM, and the version catalog.

## Example

Example request:

```
"Add a ProfileScreen: a Hilt ViewModel exposing ProfileUiState as a
StateFlow, a Material3 Scaffold with the user's name and avatar, a
loading + error state, and a Compose test that checks the error retry
button shows on failure."
```

## Tips & gotchas

- Always collect with `collectAsStateWithLifecycle()` (from `lifecycle-runtime-compose`), not `collectAsState()` — the latter keeps collecting in the background and wastes work.
- Keep Composables stateless: hoist state to the ViewModel and pass lambdas down, so `@Preview` works without DI.
- The Compose Compiler must match your Kotlin version. With Kotlin 2.0+ the skill applies the `org.jetbrains.kotlin.plugin.compose` Gradle plugin instead of pinning `kotlinCompilerExtensionVersion`.
- Hilt needs KSP (or kapt) configured; the skill adds `com.google.devtools.ksp` and the Hilt Gradle plugin together.

## FAQ

**Does it use Compose or XML?** Compose-first with Material3. It can wrap a Composable in a Fragment via `ComposeView` if you're mid-migration.

**Can it submit to Play directly?** It prepares a signed AAB and the upload steps, but you authorize the actual Play Console publish.

**Kotlin only, or Java?** Kotlin only — coroutines, Flow, and Compose all assume it.
