android-clean-architecture

Structure Android and Kotlin Multiplatform modules with Clean Architecture dependency rules.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/samymity/bridge-ventures-backend --skill android-clean-architecture-samymity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-clean-architecture
Source: https://github.com/samymity/bridge-ventures-backend/tree/main/.claude/skills/android-clean-architecture
Command: npx skills add https://github.com/samymity/bridge-ventures-backend --skill android-clean-architecture-samymity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cleanly separating responsibilities in Android and Kotlin Multiplatform codebases to prevent tightly coupled modules and business logic leaking into UI or framework layers.

Core Features & Use Cases

  • Module boundaries & dependency rules: Enforce a strict direction of dependencies so domain remains pure Kotlin.
  • UseCases and Repository pattern: Model each business operation as a UseCase and define repository interfaces in the domain.
  • Data layer implementations: Coordinate local and remote data with Room/SQLDelight for persistence and Ktor for networking.
  • Mappers, DI, and error handling: Convert entities/DTOs to domain models, wire dependencies with Koin or Hilt, and propagate errors consistently to presentation.

Example use case: You’re building a “catalog” feature where the UI needs reactive item lists, offline caching, and remote refresh; you want UseCases to own orchestration while repositories combine local database flows with remote Ktor calls.

Quick Start

Ask the AI to generate a clean Android + Kotlin Multiplatform module skeleton that follows the skill’s dependency rules and includes a domain UseCase plus a repository backed by Room (Android) and SQLDelight (KMP) with Ktor remote fetching.

Frequently Asked Questions about android-clean-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate business logic from the UI in an Android Kotlin Multiplatform app?

Separate business logic from the UI by establishing a strict clean architecture dependency direction, keeping the domain layer pure Kotlin, and modeling operations as UseCases. This prevents tightly coupled modules and business logic leaking into framework layers.

How do I structure an Android repository pattern with Room and Ktor?

Structure the repository pattern by defining repository interfaces in the domain layer. Implementations coordinate local data sources using Room or SQLDelight with remote Ktor networking calls, converting entities to domain models using mappers for consistent presentation.

Can I use Hilt or Koin for dependency injection in Kotlin Multiplatform clean architecture?

Yes, you can wire dependencies using Koin or Hilt within this clean architecture setup. Consistent dependency injection coordinates the data layer implementations and propagates errors consistently across the domain, data, and presentation layers.

What is the best way to combine offline caching and remote refresh in Android?

The best way to combine offline caching and remote refresh is using UseCases to own orchestration while repositories combine local database flows from Room or SQLDelight with remote Ktor calls, ensuring reactive item lists update consistently.

When should I keep my Android domain layer pure Kotlin without framework dependencies?

Keep your domain layer pure Kotlin without framework dependencies when establishing clean module boundaries for Android and KMP apps. This strict separation of concerns prevents tightly coupled modules and ensures business logic remains testable and platform-agnostic.