
Android Clean Architecture
This walks you through layering an Android or KMP project with proper dependency rules: domain stays pure Kotlin with no framework imports, data implements repositories and talks to Room/SQLDelight/Ktor, and presentation consumes UseCases through ViewModels. The UseCase examples are clean (operator invoke for direct calls), the mapper pattern keeps transformations near the data models, and the Koin/Hilt setup is straightforward. The module structure is opinionated but flexible enough for both monoliths and feature modules. If you've been shoving everything into ViewModels or letting your domain layer import Android classes, this will give you a reset. The convention plugin stubs are a nice touch for KMP builds.
- skills.sh installs
- 6.4K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill android-clean-architecture --agent claude-codeInstalls into .claude/skills of the current project.
Files
Android Clean Architecture
Clean Architecture patterns for Android and KMP projects. Covers module boundaries, dependency inversion, UseCase/Repository patterns, and data layer design with Room, SQLDelight, and Ktor.
When to Activate
- Structuring Android or KMP project modules
- Implementing UseCases, Repositories, or DataSources
- Designing data flow between layers (domain, data, presentation)
- Setting up dependency injection with Koin or Hilt
- Working with Room, SQLDelight, or Ktor in a layered architecture
Module Structure
Recommended Layout
project/
├── app/ # Android entry point, DI wiring, Application class
├── core/ # Shared utilities, base classes, error types
├── domain/ # UseCases, domain models, repository interfaces (pure Kotlin)
├── data/ # Repository implementations, DataSources, DB, network
├── presentation/ # Screens, ViewModels, UI models, navigation
├── design-system/ # Reusable Compose components, theme, typography
└── feature/ # Feature modules (optional, for larger projects)
├── auth/
├── settings/
└── profile/
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Code Review & Quality, Mobile Development, Java & JVM
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Prompt Optimizer6.3K
- Golang Patterns6.3K
- Postgres Patterns6.3K
- Verification Loop6.3K
- Article Writing6.3K
- Django Patterns6.2K
- Cpp Coding Standards6.2K
- Golang Testing6.2K
- Deep Research6.2K
- Java Coding Standards6.2K
- Blender Motion State Inspection6.1K
- Laravel Patterns6.1K
- Rust Patterns6.1K
- Springboot Patterns6.1K
- Context Budget6.1K
- Accessibility6.1K
- Nestjs Patterns6.1K
- Seo6.1K
- Django Security6.1K
- Git Workflow6K
- Python Testing6K
- Strategic Compact6K
- Design System6K
- Browser Qa6K