android-clean-architecture

Organizes Android and Kotlin Multiplatform projects into clean architectural layers with strict module boundaries.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/idiaz01/enterprise-superpowers --skill android-clean-architecture-idiaz01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-clean-architecture
Source: https://github.com/idiaz01/enterprise-superpowers/tree/main/content/skills/android-clean-architecture
Command: npx skills add https://github.com/idiaz01/enterprise-superpowers --skill android-clean-architecture-idiaz01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android and Kotlin Multiplatform projects often struggle with tangled layers and unclear dependencies, making maintenance, testing, and evolution painful as apps grow.

Core Features & Use Cases

  • Module Structure: Organize code into app, core, domain, data, presentation, and optional feature modules to improve testability and reuse.
  • Dependency Rules: Enforce directionality (app/presentation -> domain -> data) and prevent domain from depending on data or UI.
  • Domain Layer & UseCases: Define domain interfaces and UseCase patterns to encapsulate business logic.
  • Data Layer: Implement repository patterns, data sources, mappers, and networking/data persistence strategies.
  • Dependency Injection: Support Koin or Hilt integration for scalable wiring.
  • Quality Practices: Avoid common anti-patterns like leaking domain into UI or using global scopes.

Quick Start

Set up the architectural skeleton in your Android/KMP project by creating module folders (app, core, domain, data, presentation, design-system) and applying the dependency rules described above.

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 with clean architecture layers?

Structure an Android app with clean architecture by organizing code into app, core, domain, data, and presentation modules. This modular separation enforces strict dependency directionality, meaning presentation depends on domain but domain never depends on data or UI layers.

What is the correct dependency direction for Android clean architecture?

The correct dependency direction for Android clean architecture flows from app and presentation layers through domain to the data layer. This structure prevents the domain layer from depending on data or UI, encapsulating business logic safely and enabling strict testability.

Can I use Koin or Hilt for dependency injection in a modular Android architecture?

Yes, you can use Koin or Hilt for dependency injection in a modular Android architecture. Integrating these frameworks supports scalable wiring across isolated feature modules while maintaining clear architectural boundaries and strict layer separation.

How do I implement the domain layer and use cases in Kotlin Multiplatform?

Implement the domain layer in Kotlin Multiplatform by defining domain interfaces and UseCase patterns to encapsulate business logic. This approach keeps core business rules isolated and testable while preventing domain logic from leaking into UI components.

What are common anti-patterns when applying clean architecture to Android projects?

Common anti-patterns in Android clean architecture include leaking domain logic into UI components and using global scopes. Structuring modules with strict boundaries and clear directions prevents these issues and ensures your domain layer remains isolated and testable.

Does clean architecture work for Kotlin Multiplatform projects?

Yes, clean architecture works for Kotlin Multiplatform projects. It organizes KMP code into strict modular layers like domain, data, and presentation to improve testability and reuse across multiple platforms without tangled layer dependencies.