PluginBench
Skill
Pass
Audit score 90

android-kotlin-development

aj-geddes/useful-ai-prompts

Develop native Android apps with Kotlin using MVVM, Jetpack, and Compose.

What is android-kotlin-development?

Build robust native Android applications using Kotlin with modern architecture patterns, Jetpack libraries, and Jetpack Compose for declarative UI. Use this when creating Android apps that require type-safe development, MVVM architecture, and integration with Android platform APIs.

  • Implement MVVM architecture with Jetpack libraries for scalable app structure
  • Build modern declarative UIs with Jetpack Compose
  • Integrate REST APIs using Retrofit with coroutines
  • Persist local data with Room database
  • Manage navigation architecture across screens
  • Handle dependency injection with Hilt

How to install android-kotlin-development

npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill android-kotlin-development
Prerequisites
  • Android Studio installed
  • Kotlin knowledge or willingness to learn
  • Familiarity with coroutines recommended
  • Understanding of MVVM pattern helpful
Claude Code
Cursor
Windsurf
Cline

How to use android-kotlin-development

  1. 1.Define data models for your application entities
  2. 2.Create Retrofit API service interfaces for network calls
  3. 3.Implement ViewModels using Jetpack libraries for state management
  4. 4.Build UI screens using Jetpack Compose composables
  5. 5.Set up Room database for local data persistence
  6. 6.Configure Hilt for dependency injection
  7. 7.Implement proper error handling and lifecycle management
  8. 8.Test on multiple device types and configurations

Use cases

Good for
  • Building a social media app with user profiles, feeds, and real-time updates
  • Creating an e-commerce application with product listings, cart, and checkout
  • Developing a note-taking app with local storage and cloud synchronization
  • Building a weather app that fetches data from APIs and displays it with Compose UI
  • Creating a task management app with offline-first capabilities
Who it's for
  • Android developers transitioning to Kotlin
  • Teams building native Android applications
  • Developers implementing MVVM architecture patterns
  • Engineers working with Jetpack and Compose ecosystems

android-kotlin-development FAQ

What is MVVM and why use it?

MVVM (Model-View-ViewModel) separates UI logic from business logic, making code testable and maintainable. Jetpack libraries provide built-in support for this pattern.

Should I use Jetpack Compose or XML layouts?

Jetpack Compose is the modern approach for new projects, offering declarative UI, better tooling, and easier state management compared to XML layouts.

How do I handle network requests safely?

Use Retrofit with coroutines for async operations, implement proper error handling, and never make network calls on the main thread.

Where should I store sensitive data like tokens?

Use Android's EncryptedSharedPreferences or Keystore system, never store tokens in plain SharedPreferences.

How do I manage app state across configuration changes?

Use ViewModel and StateFlow to preserve state during device rotations and other configuration changes.

Full instructions (SKILL.md)

Source of truth, from aj-geddes/useful-ai-prompts.


name: android-kotlin-development description: > Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.

Android Kotlin Development

Table of Contents

Overview

Build robust native Android applications using Kotlin with modern architecture patterns, Jetpack libraries, and Compose for declarative UI.

When to Use

  • Creating native Android applications with best practices
  • Using Kotlin for type-safe development
  • Implementing MVVM architecture with Jetpack
  • Building modern UIs with Jetpack Compose
  • Integrating with Android platform APIs

Quick Start

Minimal working example:

// Models
data class User(
  val id: String,
  val name: String,
  val email: String,
  val avatarUrl: String? = null
)

data class Item(
  val id: String,
  val title: String,
  val description: String,
  val imageUrl: String? = null,
  val price: Double
)

// API Service with Retrofit
interface ApiService {
  @GET("/users/{id}")
  suspend fun getUser(@Path("id") userId: String): User

  @PUT("/users/{id}")
  suspend fun updateUser(
    @Path("id") userId: String,
    @Body user: User
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Models & API ServiceModels & API Service
MVVM ViewModels with JetpackMVVM ViewModels with Jetpack
Jetpack Compose UIJetpack Compose UI

Best Practices

✅ DO

  • Use Kotlin for all new Android code
  • Implement MVVM with Jetpack libraries
  • Use Jetpack Compose for UI development
  • Leverage coroutines for async operations
  • Use Room for local data persistence
  • Implement proper error handling
  • Use Hilt for dependency injection
  • Use StateFlow for reactive state
  • Test on multiple device types
  • Follow Android design guidelines

❌ DON'T

  • Store tokens in SharedPreferences
  • Make network calls on main thread
  • Ignore lifecycle management
  • Skip null safety checks
  • Hardcode strings and resources
  • Ignore configuration changes
  • Store passwords in code
  • Deploy without device testing
  • Use deprecated APIs
  • Accumulate memory leaks