← ClaudeAtlas

android-offline-first-synclisted

Use this skill whenever building or reviewing an Android feature that involves offline-first data (DB as source of truth), periodic/background sync (WorkManager), cache staleness/TTL policy, or condition-based alerts/notifications (e.g. extreme weather, price drops, stock-outs, low battery). Trigger this for ANY Android app domain — weather, fitness, news, finance, IoT, delivery tracking — not just weather specifically. Also trigger when the user mentions "offline mode", "offline-first", "cache invalidation", "periodic sync", "background refresh", "stale data", "sync status", "WorkManager", or "alert system" in an Android/Kotlin context. This is a feature/capability skill (the pattern of HOW to build the behavior), not a tech-stack tutorial — pair it with whatever networking/DB/DI libraries the project already uses.
rajedev/AIWeatherApp · ★ 0 · Web & Frontend · score 62
Install: claude install-skill rajedev/AIWeatherApp
# Android Offline-First, Background Sync & Alerting This skill covers three tightly-coupled capabilities that show up in almost every data-driven Android app: **offline-first caching**, **periodic background sync**, and **condition-based alerting**. They're grouped together because they share one architectural decision — the local DB is the single source of truth, and everything else (network, WorkManager, notifications) exists to keep that DB fresh and to react to what's in it. Domain-agnostic by design: swap "weather" for "stock price", "flight status", "delivery ETA", "fitness metric" — the pattern doesn't change, only the entity and the alert condition do. ## When to go deeper - Building the reactive cache/repository layer → read `references/offline-first-repository.md` - Designing the periodic sync worker (scheduling, constraints, battery/network tradeoffs) → read `references/background-sync-workmanager.md` - Designing condition-based alerts/notifications on top of synced data → read `references/alerting-notifications.md` Read only the file(s) relevant to what the user is asking — don't load all three for a narrow question. ## Core mental model (always apply this first) ``` UI observes DB (Flow) ──never talks to network directly ▲ │ writes Repository ── decides IF/WHEN to fetch, based on staleness policy │ ▼ Remote API (Retrofit/Ktor/whatever) ── only source of truth for "what's true right now"