android-clean-architecture

Implement Clean Architecture patterns for Android and Kotlin Multiplatform projects.

12|4|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TeiNam/kiro-with-harness --skill android-clean-architecture-teinam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-clean-architecture
Source: https://github.com/TeiNam/kiro-with-harness/tree/main/skills/android-clean-architecture
Command: npx skills add https://github.com/TeiNam/kiro-with-harness --skill android-clean-architecture-teinam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires room, sqldelight, ktor, koin, hilt, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers implement Clean Architecture patterns, which provide a modular and maintainable structure for Android and Kotlin Multiplatform projects.

Core Features & Use Cases

  • Module Structure: Provides a recommended layout for Android and KMP projects, including domain, data, presentation, and core layers.
  • Dependency Rules: Defines clear rules for dependencies between different modules.
  • Domain Layer: Explains UseCase and Domain Model patterns, including implementation examples.
  • Data Layer: Covers Repository implementation, including local and remote data sources, and examples using Room, SQLDelight, and Ktor.
  • Dependency Injection: Shows how to set up Koin and Hilt for dependency injection.
  • Error Handling: Provides guidelines on using the Result/Try pattern for error propagation.
  • Anti-Patterns: Lists common anti-patterns to avoid in Android development.
  • Quick Start: Get started by following the recommended module structure and implementing UseCases and Repositories.

Quick Start

Implement Clean Architecture in your Android or KMP project by following the module structure and implementing UseCases and Repositories as outlined in the Skill.

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?

Clean architecture structures Android and Kotlin Multiplatform projects into domain, data, presentation, and core layers. This modular layout defines clear dependency rules between modules to ensure maintainability and separation of concerns.

How do I implement the Repository pattern with Room, SQLDelight, and Ktor in Kotlin?

Implement the Repository pattern by wrapping local data sources like Room and SQLDelight alongside remote sources using Ktor. The repository coordinates these sources to provide a single data access point for your domain layer.

Should I use Koin or Hilt for dependency injection in my Android clean architecture project?

Both Koin and Hilt are supported for dependency injection in Android clean architecture projects. Koin offers a Kotlin-first approach, while Hilt provides compile-time safety, allowing you to choose based on your project's specific needs.

How do UseCases work in the domain layer of an Android application?

UseCases in the domain layer encapsulate single business logic operations. They orchestrate data flow by calling repositories, keeping your application logic isolated from both the UI and data implementation details.

What is the best way to handle errors in Kotlin clean architecture?

The best way to handle errors in Kotlin clean architecture is using the Result or Try pattern. This approach safely propagates exceptions across module boundaries, allowing the presentation layer to manage failures gracefully.

What are common clean architecture anti-patterns to avoid in Android development?

Common clean architecture anti-patterns in Android include leaking data layer details into the domain and bypassing UseCases for business logic. Following strict module dependency rules prevents these architectural violations.