piyushverma0/android-agent-skills/offline-first
Claude Code and agent skill by piyushverma0/android-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Offline-first architecture for Android AI agents. Use this skill whenever the app needs to work without internet, implementing cache-first strategy, local-first data, sync architecture, optimistic UI updates, conflict resolution, network connectivity monitoring, WorkManager background sync, retry logic, pending operations queue, stale-while-revalidate, or any pattern where local data is the source of truth and network data is synced. Triggers on: offline, cache, sync, local-first, network unavailable, background sync, WorkManager, ConnectivityManager, no internet, optimistic update.
Install
npx vskill@latest install piyushverma0/android-agent-skills/offline-firstSKILL.md
The same SKILL.md was published earlier as piyushverma0/android-agent-skills/offline-first.
Offline-First Architecture
Apps that require internet to work lose 30%+ of users. These patterns make your app work everywhere — with or without connectivity.
Core principle: Local DB is source of truth
Rule 1: Single-direction data flow — never mix local + remote in UI
Rule 2: Optimistic UI updates
Rule 3: Network connectivity monitoring
Rule 4: WorkManager for background sync
Rule 5: Pending operations queue — for offline writes
Rule 6: Stale data indicator
Common Mistakes
❌ Showing loading while Room DB loads — DB is fast, show data immediately ❌ UI observing network response directly — UI must only observe local DB ❌ No retry logic for failed sync — use exponential backoff ❌ Running WorkManager sync on unconstrained network — always require CONNECTED ❌ Not handling sync conflicts — decide on server-wins or last-write-wins policy ❌ Clearing local cache on every fresh load — breaks offline experience
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/offline-first/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/piyushverma0/android-agent-skills/offline-first)