affaan-m avatar

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-code

Installs 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
1julianoczkowski avatardesign-reviewjulianoczkowski/designer-skillsRun a structured design critique against the brief and codebase. Checks visual hierarchy, consistency, responsiveness, accessibility, and aesthetic fidelity. Us5.9Kskills.sh installs
2affaan-m avatararchitecture-decision-recordsaffaan-m/eccCapture architectural decisions made during Claude Code sessions as structured ADRs. Auto-detects decision moments, records context, alternatives considered, an5.9Kskills.sh installs
3zhanghandong avatarm15-anti-patternzhanghandong/rust-skillsm15 anti pattern5.6Kskills.sh installs
4jeffallan avatarmicroservices-architectjeffallan/claude-skillsDesigns distributed system architectures, decomposes monoliths into bounded-context services, recommends communication patterns, and produces service boundary d5.2Kskills.sh installs
5trkbt10 avatarindexion-refactortrkbt10/indexion-skillsAfter writing code, detect and clean up duplication at three levels — copy-paste blocks, cross-package shared code, unnecessary wrappers, and concept-level SoT 5Kskills.sh installs
6affaan-m avatararchitecture-decision-recordsaffaan-m/everything-claude-codearchitecture decision records4.8Kskills.sh installs