Claude-skill-registry android
Build, review, and refactor Android mobile apps (Kotlin) using modern Android patterns. Use for tasks like setting up Gradle modules, Jetpack Compose UI, navigation, ViewModel/state management, networking (Retrofit/OkHttp), persistence (Room/DataStore), DI (Hilt/Koin), testing, performance, release builds, and Play Store readiness.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/android" ~/.claude/skills/majiayu000-claude-skill-registry-android && rm -rf "$T"
manifest:
skills/data/android/SKILL.mdsource content
android
Use this skill when working on Android client (大前端 / 移动端) codebases.
Defaults (unless repo dictates otherwise)
- Language: Kotlin
- UI: Jetpack Compose (if legacy XML exists, follow existing structure)
- Architecture: MVVM + unidirectional data flow (UDF)
- Async: Kotlin Coroutines + Flow
- DI: Hilt if present; otherwise keep consistent with current
Project structure (recommended)
: application module (entry, navigation, composition root)app/
: shared utilities and platform abstractions (optional)core/
: API + persistence implementationsdata/
: use-cases, business models (pure Kotlin)domain/
: feature modules or packages (UI + presentation)feature/<name>/
Workflow
- Establish constraints
- Min/target SDK, build system, existing modules.
- Compose vs XML, single-module vs multi-module.
- Define app flows
- Identify screens and navigation graph.
- Define state models per screen and their events/actions.
- Data layer design
- API models vs domain models (mapping boundaries).
- Retrofit service interfaces + OkHttp interceptors (auth, logging).
- Caching strategy: memory vs disk (Room/DataStore).
- UI & state
- Compose: keep Composables stateless where possible; state hoisted to ViewModel.
- ViewModel exposes
and accepts events/intents.StateFlow<UiState> - Handle loading/error/empty states explicitly.
- Error handling
- Normalize errors (network, auth, validation) to domain-friendly types.
- Avoid leaking Retrofit/Room types into UI.
- Performance & UX
- Avoid recomposition traps; use stable models and
.remember - Images: Coil; pagination for long lists; debounce inputs.
- Accessibility basics: content descriptions, large text support.
- Quality gates
- Unit tests for domain and ViewModels.
- UI tests where meaningful (Compose testing).
- Lint/detekt/ktfmt if configured; keep build green.
Output expectations when making changes
- Keep diffs localized; avoid broad refactors unless requested.
- Add/adjust tests when changing behavior.
- For new features: include navigation entry, UI state contract, and data wiring.