android
Use when the user asks about Android apps in Kotlin, Jetpack Compose screens, navigation and ViewModel, Hilt, Room, Retrofit/OkHttp, WorkManager or Android…
by j4flmao★ 47 GitHub stars
Install android in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Android Native
Purpose
Implement Android native applications using Kotlin, Jetpack Compose, MVVM+Clean Architecture, Coroutines+Flow, Hilt DI, Room, and comprehensive testing.
Agent Protocol
Trigger
User request includes: android, kotlin, jetpack, compose, android architecture, android testing, room, hilt.
Input Context
- Android SDK version (compileSdk / minSdk / targetSdk)
- Kotlin version
- Build system (Gradle KTS)
- Architecture pattern (MVVM, Clean, MVI)
Output Artifact
A markdown document containing:
- Project structure
- Jetpack Compose setup
- MVVM+Clean Architecture
- Coroutines+Flow concurrency
- Hilt dependency injection
- Room database setup
- JUnit + Espresso test plan
Response Format
Produce the artifact directly. No preamble, no postamble, no explanations. No filler, no hedging, no transitions. Strip articles a/an/the where unambiguous. Compress output — why use many token when few do trick.
Max Response Length
4096 tokens
Workflow
Step 1: Set Up Project Structure
Organize code with Clean Architecture layers: data, domain, ui, and di with feature-based packaging.
Step 2: Implement Domain Layer
Define domain models, repository interfaces, and use cases independent of framework dependencies.
Step 3: Implement Data Layer
Set up Room database with DAOs and entities, Retrofit API service, and repository implementations bridging local and remote sources.
Step 4: Configure Dependency Injection
Set up Hilt modules for database, network, and repository bindings with appropriate scopes.
Step 5: Build UI with Jetpack Compose
Create ViewModels with StateFlow, Compose screens with state collection, and handle loading/error/success states.
Step 6: Write Tests
Cover domain use cases with JUnit + MockK unit tests and UI screens with Compose + Espresso UI tests.
Architecture Decision Trees
Architecture Selection
App complexity?
├── Simple CRUD (<10 screens, no complex state)
│ → MVVM + Repository — ViewModel → Repository → API/DB
│ → No UseCase layer needed
├── Complex state (real-time, multi-step forms)
│ → MVI with sealed Intent/State classes, reducer pattern
│ → Single state object per screen
└── Large codebase (5+ teams, shared domain)
→ Clean Architecture with strict layer separation
→ Domain module shared across features
DI Strategy
Team preference?
├── Annotation-based → Hilt
│ Pros: compile-time verification, @HiltViewModel, less boilerplate
│ Cons: slower build, kapt/ksp overhead
├── Manual DI → Koin
│ Pros: no annotation processing, fast builds, easy to learn
│ Cons: runtime errors for missing bindings
└── Compiler-assisted → Dagger (raw)
Pros: most control, mature
Cons: steep learning curve, verbose
Navigation Approach
Single-activity?
├── Yes → Jetpack Navigation Compose
│ Type-safe @Serializable routes (Navigation Compose 2.8+), or Navigation 3 for app-owned back stacks
├── Multi-activity → Navigation component with XML
└── Feature-modules → Dynamic feature navigation with NavDeepLink
Image Loading Strategy
Network images needed?
├── Yes, Coil — Kotlin coroutines, Compose integration, memory-efficient
└── Yes, Glide — Mature, animated GIF/WebP, disk cache, OK
Coil preferred for new Compose projects — Kotlin-first and coroutine-based
Background Work Strategy
WorkManager vs Foreground Service vs AlarmManager
├── Deferrable, reliable → WorkManager (constraints, chaining, battery-optimized)
├── User-visible must continue → Foreground Service (notification required)
└── Exact timing needed → AlarmManager exact alarms (need SCHEDULE_EXACT_ALARM / USE_EXACT_ALARM on Android 12+; check canScheduleExactAlarms())
Project Structure
app/
├── src/main/java/com/example/app/
│ ├── App.kt
│ ├── MainActivity.kt
│ ├── data/
│ │ ├── local/
│ │ │ ├── AppDatabase.kt
│ │ │ ├── OrderDao.kt
│ │ │ └── OrderEntity.kt
│ │ ├── remote/
│ │ │ ├── ApiService.kt
│ │ │ └── OrderResponse.kt
│ │ └── repository/
│ │ └── OrderRepositoryImpl.kt
│ ├── di/
│ │ ├── AppModule.kt
│ │ ├── DatabaseModule.kt
│ │ └── NetworkModule.kt
│ ├── domain/
│ │ ├── model/
│ │ │ └── Order.kt
│ │ ├── repository/
│ │ │ └── OrderRepository.kt
│ │ └── usecase/
│ │ └── GetOrdersUseCase.kt
│ └── ui/
│ ├── orders/
│ │ ├── OrderListScreen.kt
│ │ ├── OrderDetailScreen.kt
│ │ └── OrderViewModel.kt
│ └── theme/
└── src/test/
└── ...
MVVM + Clean Architecture
// domain/model/Order.kt
data class Order(
val id: String,
val customerName: String,
val total: Double,
val status: OrderStatus
)
enum class OrderStatus { PENDING, SHIPPED, DELIVERED }
// domain/repository/OrderRepository.kt
interface OrderRepository {
suspend fun getOrders(): Result<List<Order>>
suspend fun getOrder(id: Str
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- references/android-advanced.md
- references/android-architecture.md
- references/android-fundamentals.md
- references/compose-performance.md
- references/hilt-di.md
- references/jetpack-compose.md
- references/testing.md
FAQ
What does the android skill do?
Use when the user asks about Android apps in Kotlin, Jetpack Compose screens, navigation and ViewModel, Hilt, Room, Retrofit/OkHttp, WorkManager or Android testing. Produces Android architecture, Compose UI and data-layer code following current Jetpack guidance. Not for Kotlin language features alone (use lang-kotlin) or shared KMP code (use mobile-kotlin-multiplatform).
How do I install the android skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the android skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…