home / skills / shotaiuchi / dotclaude / android-architecture
/dotclaude/skills/android-architecture
This skill helps you implement Android MVVM and Repository patterns by applying Google's architecture guides across ViewModels, Repositories, and Compose.
npx playbooks add skill shotaiuchi/dotclaude --skill android-architectureReview the files below or copy the command above to add this skill to your agents.
---
name: Android Architecture
description: This skill should be used when implementing Android features, creating ViewModels, setting up Repositories, using Hilt, implementing Jetpack Compose, or following MVVM/UDF patterns on Android.
references:
- path: ../../references/common/clean-architecture.md
- path: ../../references/common/testing-strategy.md
- path: ../../references/platforms/android/conventions.md
- path: ../../references/platforms/android/architecture-patterns.md
external:
# External IDs are resolved via ~/.claude/references/external-links.yaml
# or project-specific dotclaude/references/external-links.yaml
- id: android-arch-guide # https://developer.android.com/topic/architecture
- id: jetpack-compose-docs # https://developer.android.com/jetpack/compose
- id: hilt-docs # https://developer.android.com/training/dependency-injection/hilt-android
---
**Always respond in Japanese.**
# Android Architecture
MVVM / UDF / Repository patterns based on Google's official Android Architecture Guide.
Read and apply the patterns from the referenced documents to the user's implementation task.
## Reference Documents
- [Clean Architecture Guide](../../references/common/clean-architecture.md)
- [Testing Strategy Guide](../../references/common/testing-strategy.md)
- [Android Conventions](../../references/platforms/android/conventions.md)
- [Architecture Patterns](../../references/platforms/android/architecture-patterns.md)
This skill helps implement Android features using recommended architecture patterns like MVVM, UDF, Repository, and Clean Architecture. It guides creation of ViewModels, Repositories, dependency injection with Hilt, and Jetpack Compose integration to produce testable, maintainable apps. Use it to align code with Google’s Android Architecture guidance and established best practices.
The skill inspects feature designs and code structure to recommend pattern-aligned implementations: where to place UI state in ViewModels, how to define repositories and data sources, and how to wire dependencies with Hilt. It suggests Compose-friendly state flows, unidirectional data flow (UDF) event handling, and boundaries between layers to make testing and evolution easier.
Should I put business rules in ViewModel or Repository?
Place domain and business rules in use-case or domain-layer components (Repository or dedicated use-case classes). ViewModels should orchestrate and adapt domain outputs for the UI, not contain core business logic.
How do I test Compose UIs with UDF?
Keep UI deterministic by exposing StateFlows and one-way event channels. Write unit tests for ViewModel behavior and use Compose testing APIs to assert UI rendering from controlled states and simulated events.