client/.github/skills/android-architecture/SKILL.md
Expert guidance on setting up and maintaining a modern Android application architecture using Clean Architecture and Koin. Use this when asked about project structure, module setup, or dependency injection.
npx skillsauth add ahaodev/heji android-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When designing or refactoring an Android application, adhere to the Guide to App Architecture and Clean Architecture principles.
Structure the application into three primary layers. Dependencies must strictly flow inwards (or downwards) to the core logic.
GetLatestNewsUseCase), Domain Models (pure Kotlin data classes).android.* imports).Use Koin for all dependency injection.
startKoin {}: Initialize Koin in the Application class using startKoin { modules(...) }.module {}: Define dependency modules using Koin DSL.single {}: Provide app-wide singletons (e.g., Network, Database).factory {}: Provide new instances each time.viewModel {}: Provide ViewModel instances.bind: Bind interface to implementation (e.g., single { OfflineFirstNewsRepository() } bind NewsRepository::class).For production apps, use a multi-module strategy to improve build times and separation of concerns.
:core:domain and :core:ui.Domain layer has no Android dependencies.Dispatchers.IO internally if needed).StateFlow (see android-viewmodel skill).development
Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS). Use when adding/modifying features, CRUD modules, API routes/controllers/usecases/repositories, Ent schemas, or web pages/routes.
data-ai
Convert Android XML layouts to Jetpack Compose. Use when asked to migrate Views to Compose, convert XML to Composables, or modernize UI from View system to Compose.
development
Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency usage, fix coroutine-related bugs, improve thread safety, or resolve lifecycle issues in Kotlin/Android code.
development
Debug and optimize Android/Gradle build performance. Use when builds are slow, investigating CI/CD performance, analyzing build scans, or identifying compilation bottlenecks.