Android Data Layer
Guidance for an offline-first Android data layer built on the Repository pattern, Room, and Retrofit.
- CCM score
- 57 of 100
- skills.sh installs
- 559
- GitHub stars
- 1K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the repository as single source of truth, with Room as local cache and Retrofit as remote fetcher
- Includes sync guidance for stale-while-revalidate reads and an outbox pattern for writes via
WorkManager - Requires remote errors such as no connectivity and 404 to be wrapped in
try-catchor aResulttype - Designed for Android developers wiring Hilt dependency injection into offline-first app architecture
Install
$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill android-data-layer -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Android Data Layer & Offline-First
Instructions
The Data Layer coordinates data from multiple sources.
1. Repository Pattern
- Role: Single Source of Truth (SSOT).
- Logic: The repository decides whether to return cached data or fetch fresh data.
- Implementation:
class NewsRepository @Inject constructor( private val newsDao: NewsDao, private val newsApi: NewsApi ) { // Expose data from Local DB as the source of truth val newsStream: Flow<List<News>> = newsDao.getAllNews() // Sync operation suspend fun refreshNews() { val remoteNews = newsApi.fetchLatest() newsDao.insertAll(remoteNews) } }
2. Local Persistence (Room)
- Usage: Primary cache and offline storage.
- Entities: Define
@Entitydata classes. - DAOs: Return
Flow<T>for observable data.
Details
- Repository
- github.com/new-silvermoon/awesome-android-agent-skills
- Category
- Mobile Apps
- First seen
- Jun 3, 2026
Questions
What does the android-data-layer skill do?
android-data-layer guides an agent through implementing the Android Data Layer with the Repository pattern, Room for local storage and Retrofit for remote data. It covers offline-first synchronization, where the repository acts as the single source of truth.
How do I install the android-data-layer skill?
Run npx -y skills add new-silvermoon/awesome-android-agent-skills --skill android-data-layer -y in your project. Once installed, android-data-layer lets the agent follow its Room, Retrofit and Hilt binding patterns when you work on data code.
Which skills are in the Mobile Apps category with android-data-layer?
The Mobile Apps category on Claude Marketplaces lists vercel-react-native-skills, animate-expo, write-swift, firebase-crashlytics and xcode-project-setup. android-data-layer focuses on Android data persistence and synchronization rather than cross-platform UI or Apple tooling.
Does android-data-layer explain how to handle offline writes?
Yes, android-data-layer describes an Outbox Pattern for writes, where changes are saved locally, marked as unsynced and pushed to the server with WorkManager. It also explains stale-while-revalidate reads that show local data first and refresh it in the background.
More from new-silvermoon/awesome-android-agent-skills
All 17- Android Retrofit520
- Coil Compose492
- Xml To Compose Migration469
- Compose Navigation437
- Rxjava To Coroutines Migration365
- Android Testing901
- Gradle Build Performance839
- Compose Ui803
- Android Gradle Logic767
- Android Architecture741
- Kotlin Concurrency Expert713
- Compose Performance Audit631
- Android Accessibility615
- Android Emulator Skill609
- Android Viewmodel609
- Android Coroutines607
Similar to Android Data Layer
More Mobile Appsandroid-retrofitnew-silvermoon/awesome-android-agent-skills520 installsExpert Retrofit guide for type-safe Android HTTP, covering service definitions, coroutines, OkHttp, and Hilt wiring.
mobile-offline-supportsecondsky/claude-skills428 installsOffline-first mobile data layer with local caching, a bounded sync queue, and last-write-wins conflict resolution.
android-architecturenew-silvermoon/awesome-android-agent-skills741 installsLayered Android architecture guide using Clean Architecture, Hilt injection, and multi-module layout.
android-developmentdpconde/claude-android-skill779 installsProduction Android app guidance using Kotlin, Compose, MVVM, Hilt, and Room, modeled on NowInAndroid.
android-kotlin-developmentaj-geddes/useful-ai-prompts1.5K installsNative Android app guidance in Kotlin covering MVVM with Jetpack, Compose UI, and Retrofit and Room integration.