home / skills / shotaiuchi / dotclaude / context-android
This skill helps you implement Android features, compose UI, and apply MVVM/UDF patterns with Hilt and clean architecture guidance.
npx playbooks add skill shotaiuchi/dotclaude --skill context-androidReview the files below or copy the command above to add this skill to your agents.
---
name: context-android
description: >-
Android development context. Apply when working with Android modules,
.kt files under android/, build.gradle.kts with Hilt/Compose dependencies,
ViewModel, Jetpack Compose, MVVM/UDF patterns.
user-invocable: false
---
# Android Context Rule
Auto-applied context when working on Android development tasks.
## When to Apply
Apply this context when:
- Implementing Android features (ViewModel, Repository, UseCase)
- Creating Jetpack Compose UI
- Setting up Hilt dependency injection
- Applying MVVM/UDF patterns
## Reference Documents
Read and apply patterns from:
| Document | Purpose |
|----------|---------|
| [Clean Architecture](../../references/common/clean-architecture.md) | Layer separation principles |
| [Testing Strategy](../../references/common/testing-strategy.md) | Test patterns and coverage |
| [Android Conventions](../../references/platforms/android/conventions.md) | Naming, structure, idioms |
| [Architecture Patterns](../../references/platforms/android/architecture-patterns.md) | MVVM/UDF implementation |
## External References
| Resource | URL |
|----------|-----|
| Android Architecture Guide | https://developer.android.com/topic/architecture |
| Jetpack Compose | https://developer.android.com/jetpack/compose |
| Hilt | https://developer.android.com/training/dependency-injection/hilt-android |
This skill provides Android development context for code review, feature implementation, and architecture guidance when working inside the android/ module. It applies to Kotlin (.kt) source, build.gradle.kts with Hilt/Compose dependencies, and common Android patterns like ViewModel, Jetpack Compose, and MVVM/UDF. Use it to align code with established Android conventions, dependency injection setups, and Clean Architecture layering.
When active, the skill inspects project structure, Kotlin files, and Gradle configuration to identify Android-specific concerns: DI setup (Hilt), Compose UI components, ViewModel and state flows, and repository/use-case boundaries. It suggests patterns and fixes that match Clean Architecture, MVVM or UDF idioms, and the Android conventions referenced. The skill also highlights testing and module boundaries to keep logic testable and well-separated.
When should I prefer UDF over MVVM?
Use UDF when you want predictable, event-driven state updates and unidirectional flows; prefer MVVM for simpler two-way bindings and classic Android patterns.
How do I scope Hilt bindings for ViewModel dependencies?
Provide repository and data-source bindings with @Singleton or @Provides in modules, and use @HiltViewModel with constructor injection for ViewModels; rely on Activity/Fragment scopes for UI-scoped dependencies.