What problem does it solve?
This Skill solves inconsistent and fragile data-flow behavior by providing a clear pattern for how repositories, data sources, interactors, and UI should coordinate loading, error, refresh, and retry using DataState and UiState contracts.
Core Features & Use Cases
- Defines a DataState/UiState workflow: pairs model streams with loading/error status and standardizes refresh/retry behavior across layers.
- Guides repository and layering contracts: keeps contracts in the domain layer and concrete implementations in the data layer, including how to structure Types.kt and use-case bridges.
- Provides offline-first read patterns: explains Room-first non-paged reads and Room-backed paged reads (including relationship collection variants) so UI stays responsive while network refreshes opportunistically.
- Establishes mutation-specific rules: separates mutation-only flows (toggle/save/delete/rate) from offline-first read guidance to avoid conflating responsibilities.
- Lists practical implementation red flags and dispatching rules: helps prevent common anti-patterns like raw repository returns, incorrect threading, and improper cache merging.
Quick Start
Implement or review your repository and data-source orchestration using DataState to wrap model Flow(s) with loading/error state, and apply the offline-first non-paged or paged read pattern appropriate to your screen.