Android Kotlin Development
Install this skill
npx skills add aj-geddes/useful-ai-promptsWorks 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
- Define your data models as Kotlin data classes.
- Invoke the skill to generate a corresponding Retrofit API interface.
- Create a ViewModel to handle business logic and state management.
- Build the UI using the generated Jetpack Compose templates.
- 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
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
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
How to Use This Skill Unit
Option A: Project-Specific (Recommended)
- Click "Download" above
- In your project, create the directory:
.agent/skills/android-kotlin-development/ - Save the file as
SKILL.md - 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
