Back to Mobile Development

Android Kotlin Development

androidkotlinjetpack-composemvvmmobile-development
β˜… 4.6 (192)⭐ 267πŸ“„ MITπŸ•’ 2026-03-04Source β†—

Install this skill

npx skills add aj-geddes/useful-ai-prompts

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

What this skill does

  • β€’Scaffolds MVVM-based Android architecture
  • β€’Generates type-safe API service definitions
  • β€’Provides templates for Jetpack Compose UI components
  • β€’Implements reactive data flows with StateFlow
  • β€’Configures local data persistence using Room

When to use it

  • βœ“Starting a new native Android project with modern architectural standards
  • βœ“Implementing data-driven screens using Jetpack Compose
  • βœ“Setting up modular network layers with Retrofit
  • βœ“Enforcing consistent MVVM patterns within a team codebase

When not to use it

  • βœ•Cross-platform development requiring frameworks like React Native or Flutter
  • βœ•Legacy Android projects that strictly forbid Kotlin and Jetpack libraries

How to invoke it

Example prompts that trigger this skill:

  • β€œGenerate a new ViewModel for my User profile feature.”
  • β€œCreate a Retrofit service interface for handling authentication endpoints.”
  • β€œWrite a Jetpack Compose screen for the dashboard view.”
  • β€œImplement a Room database entity for local caching.”
  • β€œRefactor this fragment to follow the current MVVM architectural pattern.”

Example workflow

  1. Define your data models as Kotlin data classes.
  2. Invoke the skill to generate a corresponding Retrofit API interface.
  3. Create a ViewModel to handle business logic and state management.
  4. Build the UI using the generated Jetpack Compose templates.
  5. Apply Hilt annotations for dependency injection across the feature.

Prerequisites

  • –Android Studio installed
  • –Kotlin SDK
  • –Gradle build environment

Pitfalls & limitations

  • !Risk of over-engineering simple UI components using complex MVVM patterns
  • !Potential performance issues if StateFlow observers are not cleared correctly
  • !Hard-coding sensitive API tokens instead of using secure storage

FAQ

Does this skill replace Android Studio?
No, it is a code-generation assistant designed to work alongside your IDE to enforce architectural standards.
Can I use this with XML-based layouts?
While the skill is optimized for Jetpack Compose, the underlying Kotlin and MVVM principles remain applicable to XML-based layouts.
How does it handle asynchronous tasks?
It utilizes Kotlin Coroutines and StateFlow to manage background operations safely, ensuring they do not block the main UI thread.
Are the generated snippets production-ready?
The snippets follow industry standards for Android development, but they should be reviewed and customized for your specific security and business requirements.

How it compares

Unlike a generic LLM prompt, this skill embeds validated quality gates and architectural templates, ensuring code consistency that manual prompting often misses.

Source & trust

⭐ 267 starsπŸ“„ MITπŸ•’ Updated 2026-03-04πŸ›‘ no risky patterns found

From the source: β€œ# Android Kotlin Development ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use) - [Quick Start](#quick-start) - [Reference Guides](#reference-guides) - [Best Practices](#best-practices) ## Overview Build robust native Android applications using Kotlin with modern architecture…”

View the full SKILL.md source

# Android Kotlin Development

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## 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:

```kotlin
// 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:

| Guide | Contents |
|---|---|
| [Models & API Service](references/models-api-service.md) | Models & API Service |
| [MVVM ViewModels with Jetpack](references/mvvm-viewmodels-with-jetpack.md) | MVVM ViewModels with Jetpack |
| [Jetpack Compose UI](references/jetpack-compose-ui.md) | Jetpack 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

Quoted from aj-geddes/useful-ai-prompts for reference β€” see the original for the authoritative, latest version.

πŸ“„ Full skill instructions β€” original source: aj-geddes/useful-ai-prompts
This skill provides a structured framework for building native Android applications using Kotlin. It focuses on modern development standards, emphasizing the transition to declarative UIs via Jetpack Compose and reactive data handling. By integrating essential libraries like Room for persistence, Hilt for dependency injection, and Retrofit for networking, it helps developers maintain high-quality codebases. The toolset promotes MVVM architecture to separate concerns, ensuring that UI logic remains distinct from data operations. Whether you are scaffolding a new feature or refactoring existing modules, this skill ensures your code follows current Android best practices for null safety, lifecycle management, and asynchronous operations. It is intended for Android engineers who need to maintain consistency across complex mobile projects while avoiding common anti-patterns like main-thread network execution or improper state handling.

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/android-kotlin-development/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/aj-geddes/useful-ai-prompts/android-kotlin-development/SKILL.md
  • Cursor: ~/.cursor/skills/aj-geddes/useful-ai-prompts/android-kotlin-development/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/aj-geddes/useful-ai-prompts/android-kotlin-development/SKILL.md

πŸš€ Install with CLI:
npx skills add aj-geddes/useful-ai-prompts

Read the Master Guide: Mastering Agent Skills β†’

Recommended Rules

View more rules β†’

Recommended Workflows

View more workflows β†’

Recommended MCP Servers

View more MCP servers β†’

Take It Further

Maximize your productivity with these powerful resources

πŸ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
πŸ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid mobile development issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Mobile Development and is published by aj-geddes, maintained in aj-geddes/useful-ai-prompts.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.