android-architecture
/android-architecture
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.
- Author
- HoangNguyen0403 ↗
- Repository
- agent-skills-standard ↗
- Licence
- MIT
- Last repository change
- 22.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.
Original author description
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.
How it works
- Priority: P0 (CRITICAL)
- 1. Layer Your Project (Clean Architecture)
- 2. Modularize by Feature and Core
- 3. Enforce Unidirectional Data Flow (UDF)
- 4. Verify Jetpack Compose Integration
- Anti-Patterns
- Verification
- References
SKILL.md preview
---
name: android-architecture
description: Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.
metadata:
triggers:
files:
- "build.gradle.kts"
- "settings.gradle.kts"
keywords:
- clean-architecture
- module
- layers
- domain
- UDF
- unidirectional
- feature module
- core module
- presentation layer
- data layer
---
# Android Architecture Standards
## **Priority: P0 (CRITICAL)**
## 1. Layer Your Project (Clean Architecture)
- **Domain**: Pure Kotlin (No Android deps). Contains UseCases and Models.
- **Data**: Repository impl, DataSources (API/DB). Maps DTO -> Domain.
- **UI**: ViewModel + Composable. Maps Domain -> UiState.
See [structure & examples](references/implementation.md) for Clean Architecture layer examples.
## 2. Modularize by Feature and Core
- **Feature Modules**: `:feature:home`, `:feature:profile`.
- **Core Modules**: `:core:ui` (Design System), `:core:network`, `:core:database`.
- **App Module**: DI Root and Navigation Guard.
See [structure & examples](references/implementation.md) for module configuration.
## 3. Enforce Unidirectional Data Flow (UDF)
- **Events**: UI -> ViewModel (user actions flow UP).
- **State**: ViewModel -> UI (`StateFlow<UiState>` flows DOWN).
## 4. Verify Jetpack Compose Integration
- **Hosting**: Use `setContent` in Activity (No XML Layouts).
- **State**: Hoist state to ViewModel using `collectAsStateWithLifecycle`.
- **Recomposition**: Ensure Composable parameters `@Stable` or `@Immutable`.
- **Navigation**: Use Compose Navigation with Type-Safe destinations.
## Anti-Patterns
- **No Logic in Activity**: Host Navigation only.
- **No Repo in UI**: Access data exclusively via ViewModel.
- **No Context in Domain**: Keep Logic Pure.
## Verification
- [ ] Domain layer has zero Android framework imports.
- [ ] Each feature module compiles independently.
- [ ] State flows one-way: Events UP, State DOWN.
- [ ] `./gradlew build` succeeds.
## References
- [Structure & Examples](references/implementation.md)
- [Jetpack Compose Best Practices](references/compose-standards.md)
Files in this package (4)
- SKILL.md 2 KB
- evals/evals.json 3 KB
- references/compose-standards.md 2 KB
- references/implementation.md 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · HoangNguyen0403/agent-skills-standard | 100 | MIT |
| lennonpetrick/android-engineering-skills | 100 | MIT |
| TheBushidoCollective/han | 95 | Apache-2.0 |
| new-silvermoon/awesome-android-agent-skills | 90 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version f83f59029d07 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100android-patterns
Defines all implementation patterns for Android features: Unidirectional Data Flow (UDF), ViewModel design, Flow composition, error handling, repository pattern, domain UseCases, and Compose UI patterns. Use this skill whenever implementing a ViewModel, designing state or action… - 100android-clean-architecture
Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project. - 100android-architecture-components-mvvm
Use this skill when structuring production Android applications using ViewModel, StateFlow, LiveData, and Clean Architecture. - 90kotlin-android-architecture
Use this skill to statically review Android app architecture correctness: ViewModel lifecycle and scoping across configuration changes, SavedStateHandle persistence across process death, lifecycle-aware Flow collection… - 90Android Architecture
Structure an Android app cleanly: MVVM/MVI, ViewModel, StateFlow, repositories, navigation and optional DI. Use when a project grows beyond one screen or the user asks for a maintainable structure. - 100kotlin-android
Use when building or fixing a native Android app in Kotlin and Jetpack Compose on the UDF layered architecture — ViewModel/StateFlow, Hilt, Room, Retrofit, coroutines, type-safe Navigation, and the Gradle/AGP surface. NOT shared Android and iOS UI from one Kotlin codebase (that…