What problem does it solve? Deciding how to structure a Repository that combines a remote API and a local Room KMP cache without breaking the single source of truth is a recurring source of architectural inconsistency in Kotlin Multiplatform projects. This Skill provides concrete rules, decision criteria, and code examples for building offline-first repositories. ## Core Features & Use Cases - Offline-first coordination: Defines how the Repository reads exclusively from the LocalDataSource (Room KMP) while the RemoteDataSource (Ktor) only synchronizes the local cache. - Flow vs suspend decisions: Provides automatic decision rules for when an operation should return Flow<Result<T, DomainError>> versus a suspend function. - Layer boundaries and mapping: Enforces that DTOs and Room entities never leak outside Infrastructure, with mappers translating to Domain entities. - Use Case: When creating a new Repository for a Domain entity, follow the checklist to define the Port in Domain, implement DataSources in Infrastructure, and ensure writes persist locally before reporting success. ## Quick Start Ask the AI to create an offline-first Repository for a Domain entity following the repository-pattern skill, with Flow-based observation from Room and suspend functions for sync operations.