android-clean-architecture

Enforce clean architecture module boundaries and dependency rules in Android and Kotlin Multiplatform projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android and Kotlin Multiplatform projects often struggle with unclear module boundaries and inconsistent dependencies, leading to tight coupling and hard-to-test code. This Skill provides structured guidance to implement and enforce clean architecture across the app, domain, and data layers, promoting separation of concerns and testability.

Core Features & Use Cases

  • Clear module boundaries (app, domain, data, presentation) and explicit dependency rules.
  • UseCase/Repository patterns with domain models and data sources; easy DI with Koin or Hilt.
  • Practical guidance for common data layer implementations (Room, SQLDelight, Ktor) and layered data flow.

Quick Start

Provide a starter Android/KMP project layout and wire a basic UseCase to a Repository to verify the 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 enforce module boundaries in Android Kotlin projects?

Enforce module boundaries in Android Kotlin projects by defining explicit dependency rules across app, domain, data, and presentation layers, ensuring the domain layer never depends on data or presentation modules. This separation promotes testability and prevents tight coupling.

What is the correct way to structure Domain and Data layers in clean architecture?

Structure clean architecture layers by separating Domain logic with UseCases and Repositories from the Data layer containing data sources. This pattern ensures domain models remain independent of data implementations like Room or SQLDelight, maintaining clear separation of concerns.

Does Kotlin Multiplatform support clean architecture with SQLDelight and Ktor?

Kotlin Multiplatform supports clean architecture by organizing Domain, Data, and presentation modules with shared logic. It integrates with SQLDelight and Ktor for the data layer while keeping domain UseCases platform-agnostic and fully testable across targets.

How do I wire dependency injection across multiple modules in Android?

Wire dependency injection across Android modules using Hilt or Koin to provide UseCases, Repositories, and DataSources to the presentation layer. This setup ensures modules remain decoupled while facilitating easy testing and modular component provisioning.

Why must the domain layer not depend on the data layer in clean architecture?

The domain layer must not depend on the data layer to protect business logic from external changes like database or API swaps. Keeping domain models and UseCases independent ensures core rules remain testable and reusable across different data source implementations.