android-clean-architecture

Organize Android and Kotlin Multiplatform codebases into modular Clean Architecture layers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill android-clean-architecture-maelwalser
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-clean-architecture
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/android-clean-architecture
Command: npx skills add https://github.com/Maelwalser/claude-config --skill android-clean-architecture-maelwalser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides concrete guidance to structure Android and Kotlin Multiplatform projects so business logic remains testable and framework-free, preventing tangled module dependencies, leaking implementation details into the domain, and inconsistent data mapping between layers.

Core Features & Use Cases

  • Module layout & dependency rules: recommended modules (app, core, domain, data, presentation, design-system, feature) and allowed dependency directions to keep domain pure.
  • UseCase and Repository patterns: guidance for defining UseCases in domain, repository interfaces, and implementations that coordinate local and remote data sources.
  • Data layer patterns & tooling: mapping and persistence strategies for Room and SQLDelight, Ktor network client patterns, and DI integration patterns for Koin and Hilt.
  • Error handling & anti-patterns: patterns for Result/Try types, mapping errors to UI state, and a list of common pitfalls to avoid.

Quick Start

Structure a new Android or KMP project with app, core, domain, data, and presentation modules, define repository interfaces in domain, implement repositories and mappers in data, and wire UseCases and ViewModels with dependency injection using Koin or Hilt.

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 and KMP Clean Architecture projects by defining app, core, domain, data, and presentation modules. Establish allowed dependency directions to keep domain logic pure and framework-free, preventing tangled module dependencies and leaking implementation details.

Where should repository interfaces and UseCases go in a KMP Clean Architecture setup?▼

Define repository interfaces and UseCases in the domain module to keep business logic testable. Implement repositories and data mappers in the data module, coordinating local and remote data sources while enforcing dependency inversion rules.

How do I wire dependency injection with Hilt or Koin in a Clean Architecture Android app?▼

Wire dependency injection by connecting UseCases and ViewModels using Koin or Hilt. This integrates persistence and network clients, ensuring domain purity while mapping DTO and entity models across architectural layers.

Does Clean Architecture for KMP support Ktor network clients and SQLDelight persistence?▼

Clean Architecture for KMP supports Ktor network client patterns and persistence strategies for Room and SQLDelight. It guides data layer mapping and tooling integration to coordinate local and remote data sources effectively.

What is the best way to handle errors and map them to UI state in Android Clean Architecture?▼

Handle errors in Android Clean Architecture using Result or Try types to map exceptions to UI state. This prevents inconsistent data mapping between layers and avoids common anti-patterns by enforcing strict module boundaries.

Why does my domain layer have framework dependencies when applying Clean Architecture to Kotlin?▼

Domain layer framework dependencies occur when allowed dependency directions are violated. Keep domain pure by ensuring implementation details remain in data and presentation modules, using repository interfaces to enforce dependency inversion.