android-clean-architecture

Structure Android and Kotlin Multiplatform projects with clean architecture module boundaries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves tangled dependencies and hard-to-test business logic in Android and Kotlin Multiplatform projects by enforcing a clean separation between domain, data, and presentation.

Core Features & Use Cases

  • Layered module architecture: Establishes boundaries and dependency rules so presentation and data can depend on domain, but domain never depends on frameworks or data details.
  • UseCase and Repository patterns: Defines business operations as UseCases and isolates persistence/network concerns behind repository interfaces.
  • Data layer implementations: Shows how to structure Room (Android), SQLDelight (KMP), and Ktor-based network data sources with consistent mapping to domain models.
  • Error handling and DI integration: Uses Result/Try-style propagation and demonstrates wiring with Koin or Hilt.

Quick Start

Ask the AI to generate an Android or KMP clean architecture module layout (app/core/domain/data/presentation) that follows strict dependency inversion and includes example UseCase, repository interface, mappers, and Room/SQLDelight/Ktor data sources.

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

Android clean architecture structures projects into domain, data, and presentation layers with strict dependency rules. Presentation and data depend on domain, but domain never depends on frameworks, ensuring testable business logic and clear module boundaries.

How do I isolate Room and Ktor data sources behind a repository in Kotlin Multiplatform?

Isolate Room and Ktor data sources by defining repository interfaces in the domain layer. Implement these in the data layer using Room for Android or SQLDelight for KMP, mapping network and database results consistently to pure Kotlin domain models.

Does this clean architecture approach support both Koin and Hilt for dependency injection?

Yes, this clean architecture approach supports both Koin and Hilt for dependency injection. It provides implementation guidance for wiring your UseCases, repositories, and data sources across the domain, data, and presentation layers using either DI framework.

How do I handle errors in UseCases using Kotlin Result-style propagation?

Handle errors in UseCases using Result or Try-style propagation. This approach enforces consistent error handling across module boundaries, ensuring repository failures from Ktor or Room are mapped cleanly without breaking pure Kotlin domain constraints.

What's the best way to enforce pure Kotlin domain constraints in a KMP clean architecture?

Enforce pure Kotlin domain constraints by ensuring the domain layer never depends on frameworks or data details. Define UseCases and repository interfaces using pure Kotlin, keeping all Room, SQLDelight, and Ktor implementations strictly in the data layer.