android-clean-architecture

Implement Clean Architecture in Android and Kotlin Multiplatform projects.

Updated Nov 19, 2025
One-click install
npx skills add https://github.com/Sake-Team/SmartSake --skill android-clean-architecture-sake-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-clean-architecture
Source: https://github.com/Sake-Team/SmartSake/tree/main/backup/skills/android-clean-architecture
Command: npx skills add https://github.com/Sake-Team/SmartSake --skill android-clean-architecture-sake-team

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers implement Clean Architecture patterns for Android and Kotlin Multiplatform projects, ensuring a robust, maintainable, and scalable codebase.

Core Features & Use Cases

  • Module Structure: Defines a recommended layout and dependency rules for organizing code.
  • Domain Layer: Explains the UseCase pattern, domain models, and repository interfaces.
  • Data Layer: Discusses repository implementations, mapper patterns, and database design with Room and SQLDelight.
  • Dependency Injection: Provides guidance on setting up Koin and Hilt for dependency injection.
  • Error Handling: Offers insights on implementing the Result/Try pattern for error propagation.
  • Quick Start: Follow the instructions in the SKILL.md file to apply Clean Architecture to your project.

Quick Start

Follow the guidelines in the SKILL.md file to apply Clean Architecture to your Android or Kotlin Multiplatform project.

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 modules for Clean Architecture in Android and Kotlin Multiplatform projects?

Clean Architecture organizes code into distinct modules with strict dependency rules, separating domain, data, and presentation layers. This structure ensures a maintainable and scalable codebase by keeping business logic independent from UI and framework dependencies.

What is the best way to implement the UseCase pattern and repository interfaces in a Kotlin domain layer?

The domain layer uses the UseCase pattern to encapsulate business logic and defines repository interfaces to abstract data operations. This approach keeps your Android or Kotlin Multiplatform core completely decoupled from specific database or API implementations.

How do I set up dependency injection with Hilt or Koin for a Kotlin Multiplatform project?

You can set up dependency injection using either Koin or Hilt to provide UseCases and repository implementations. Proper dependency management connects your domain interfaces to concrete data layer implementations without tight coupling.

Can I use Room and SQLDelight together in the data layer of an Android Clean Architecture project?

Yes, the data layer implements repository interfaces and uses mapper patterns to transform data. It supports database design with both Room for Android-specific storage and SQLDelight for shared Kotlin Multiplatform database access.

How do I handle error propagation across layers using the Result pattern in Kotlin?

Implement the Result or Try pattern to propagate errors safely across architectural layers. This method handles exceptions gracefully without breaking application flow, ensuring robust error management from data to domain layers.

Do I need prior experience with Kotlin to apply Clean Architecture principles to my project?

Yes, applying these guidelines requires a solid understanding of Android and Kotlin programming, alongside familiarity with modern architectural patterns. The Skill provides code examples and structure rules but expects foundational platform knowledge.