android-clean-architecture

Enforce clean-architecture dependency rules for Android and Kotlin Multiplatform projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean Architecture patterns for Android and Kotlin Multiplatform projects, providing clear module boundaries, dependency rules, and layered data/domain/presentation design to improve testability and maintainability.

Core Features & Use Cases

  • Defines a practical module layout for app, core, domain, data, presentation, and optional feature modules.
  • Enforces unidirectional dependencies (domain → core, data → domain, presentation → domain) and promotes UseCases and repository patterns.
  • Supports dependency rules and data flow guidelines across the domain, data, and presentation layers to help teams scale Android/KMP apps.

Quick Start

Set up a multi-module Android project with domain, data, and presentation layers following the recommended module layout and dependency rules.

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 or Kotlin Multiplatform project using clean architecture?

Structure Android or Kotlin Multiplatform clean architecture by defining strict module boundaries across core, domain, data, and presentation layers. Enforce unidirectional dependency rules where domain depends on core, while data and presentation depend on domain to separate concerns.

What are the dependency rules for data, domain, and presentation layers in Android?

Dependency rules for Android clean architecture enforce a strict unidirectional graph: data and presentation layers depend on the pure domain layer, which only depends on core. This constraint ensures the domain remains framework-agnostic and highly testable.

How do I organize UseCases and Repositories in a Kotlin Multiplatform app?

Organize UseCases and Repositories within the pure domain layer of your Kotlin Multiplatform app. Repositories define data contracts, while UseCases encapsulate single business operations, coordinating data flow between presentation and data layers.

Can I use this clean architecture pattern with Room, SQLDelight, and Ktor stacks?

Yes, this clean architecture pattern supports Room, SQLDelight, and Ktor stacks. It provides specific examples for integrating these frameworks within the data layer as DataSources while maintaining strict separation from the domain and presentation layers.

When should I use a multi-module clean architecture setup for my Android app?

Use a multi-module clean architecture setup for Android apps when you need to improve testability and maintainability at scale. It helps teams enforce dependency rules and manage complex data flow across domain, data, and presentation layers.

How do I wire dependency injection across core, domain, and presentation modules?

Wire dependency injection across modules by providing data layer implementations like Repositories and DataSources from the presentation or app layer. This satisfies the unidirectional dependency graph, injecting dependencies into domain UseCases without coupling them to frameworks.