android-kotlin-patterns

Generate Android Kotlin app skeletons using Compose, MVVM, Room, Retrofit, and Hilt.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill android-kotlin-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-kotlin-patterns
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/mobile/android-kotlin-patterns
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill android-kotlin-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid scattered, outdated, or inconsistent Android architecture choices by providing a proven baseline for modern Kotlin apps.

Core Features & Use Cases

  • Modern Android Architecture: Jetpack Compose UI with ViewModel + StateFlow, Hilt/Dagger DI, Room persistence, Retrofit + OkHttp networking, and Coroutines/Flow for async work.
  • Production-Ready Project Structure: Clear separation between UI, domain, data (local/remote), and DI modules to keep code maintainable as features grow.
  • Reusable Compose & Performance Guidance: State hoisting patterns and practical performance rules like using LazyColumn and stable types.

Quick Start

Use the android-kotlin-patterns skill to generate a modern app skeleton for a new Jetpack Compose project using MVVM, Room, Retrofit, Hilt, and Coroutines.

Frequently Asked Questions about android-kotlin-patterns

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

FAQPage Schema
What is the best way to structure a Jetpack Compose app using MVVM and Hilt?

Modern Android Kotlin architecture standardizes a Compose + MVVM + Room + DI blueprint. It separates UI, domain, data, and DI modules to provide reliable state management, persistence, networking, and async handling for mobile build workflows.

How do I set up Room and Retrofit with Kotlin Coroutines in a new Android project?

Set up Room and Retrofit by layering Room repository/DAO patterns for local persistence and integrating Retrofit/OkHttp for networking. Use Coroutines and Flow patterns within your ViewModel + StateFlow to handle async work and expose data cleanly to the UI.

Does this Android Kotlin architecture pattern support state hoisting in Jetpack Compose?

Yes, this Android Kotlin architecture pattern supports state hoisting in Jetpack Compose. It applies Kotlin best practices including Compose state hoisting and using stable types with LazyColumn to ensure reusable UI components and optimal rendering performance.

Can I use this MVVM blueprint to refactor an existing Android app's state management?

Yes, you can use this MVVM blueprint to refactor an existing Android app. It applies to creating or refactoring Android projects, replacing scattered or outdated architecture choices with a reliable baseline using ViewModel with StateFlow and Hilt DI.

When should I not use Jetpack Compose with MVVM and Hilt for Android development?

You should not use Jetpack Compose with MVVM and Hilt if your project cannot support modern Kotlin dependencies. This architecture requires adopting Coroutines/Flow, Hilt DI modules, and Compose state hoisting, which may not suit legacy codebases with strict legacy constraints.