android-clean-architecture

Organize Android and Kotlin Multiplatform modules with domain, data, and presentation layers.

1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/aayushsoam/clawbot-plus --skill android-clean-architecture-aayushsoam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-clean-architecture
Source: https://github.com/aayushsoam/clawbot-plus/tree/main/skills/android-clean-architecture
Command: npx skills add https://github.com/aayushsoam/clawbot-plus --skill android-clean-architecture-aayushsoam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android app and Kotlin Multiplatform projects often struggle with tangled module boundaries and unclear data flow. This Skill provides a structured blueprint for implementing Clean Architecture, defining module boundaries, dependency inversion, and Data/Domain/Presentation separations to improve testability and maintainability.

Core Features & Use Cases

  • Recommended Module Structure: app, core, domain, data, presentation, design-system, feature modules
  • Dependency Rules: app depends on presentation, domain, data, core; domain must NEVER depend on data or UI; data depends on domain
  • Domain Layer Patterns: UseCase pattern, domain models, repository interfaces
  • Data Layer & DI: repository implementations, data sources, and DI wiring with Koin/Hilt

Quick Start

Follow the recommended module layout and dependency rules to structure or refactor your Android/KMP project for clean architecture.

Frequently Asked Questions about android-clean-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an Android app for clean architecture?

Android clean architecture organizes modules into app, core, domain, data, presentation, and feature layers. This structure enforces dependency inversion and separates domain logic from data and UI, improving testability and maintainability across your project.

What dependency rules should I follow for Android clean architecture?

Android clean architecture requires the domain layer to never depend on data or UI modules. The app depends on presentation, domain, data, and core, while the data layer depends on domain interfaces, enforcing strict dependency inversion.

Can I use clean architecture with Kotlin Multiplatform projects?

Yes, clean architecture applies to both Android apps and Kotlin Multiplatform projects. It structures shared KMP code using domain models, repository interfaces, and UseCase patterns to ensure testability and maintainability across platforms.

How do I implement the domain layer in a Kotlin app?

Implement the domain layer using the UseCase pattern, domain models, and repository interfaces. This isolates core business logic from data sources and UI frameworks, maintaining strict separation of concerns and improving testability.

Does this clean architecture approach support dependency injection frameworks?

Yes, the data layer integrates with dependency injection frameworks like Koin or Hilt. DI wiring connects repository implementations and data sources to domain layer interfaces, completing the dependency inversion setup for your Android app.

Why does my Android app need a data layer if the domain layer handles business logic?

The data layer provides repository implementations and data sources that fulfill the domain layer's repository interfaces. Without it, UseCases cannot retrieve or persist data, breaking the dependency inversion required by clean architecture.