mcpbeat

Android Kotlin Patterns

cosmicstack-labs/android-kotlin-patterns

Jetpack Compose, MVVM, Room, Coroutines, DI with Dagger/Hilt, and Play Store submission

435 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
365
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill android-kotlin-patterns

The instruction itself

8 sections, as written by the author

Android Kotlin Patterns

Production Android development with Kotlin and Jetpack.

Architecture (Modern Android Dev)

  • UI: Jetpack Compose with Material 3
  • State: ViewModel + StateFlow
  • DI: Hilt/Dagger
  • DB: Room
  • Network: Retrofit + OkHttp
  • Async: Coroutines + Flow
  • Navigation: Compose Navigation

Project Structure

app/
├── data/
│   ├── local/ (Room DAOs, entities)
│   ├── remote/ (Retrofit APIs, DTOs)
│   └── repository/
├── domain/
│   ├── model/
│   └── usecase/
├── ui/
│   ├── components/
│   ├── screens/
│   └── theme/
└── di/ (Hilt modules)

Jetpack Compose Patterns

State Hoisting

// State flows down, events flow up
@Composable
fun CounterScreen(viewModel: CounterViewModel = hiltViewModel()) {
    val state by viewModel.state.collectAsStateWithLifecycle()
    CounterContent(
        count = state.count,
        onIncrement = viewModel::increment
    )
}

Performance

  • Use remember and derivedStateOf for computations
  • LazyColumn for lists, not Column with scrolling
  • Stable types via @Immutable/@Stable annotations

Play Store Submission

  • [ ] Privacy Policy URL set
  • [ ] App signing key backed up
  • [ ] In-app reviews integrated
  • [ ] Crash reporting (Firebase)
  • [ ] proguard-rules.pro configured
  • [ ] App bundles (.aab) for distribution

How to use it

Copy the folder

Take cosmicstack-labs/android-kotlin-patterns from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.