mobile-offline-support · aj-geddes — Claude Code skill: what it does, install
A skill for designing offline-first mobile apps with local caching, sync queues, and conflict resolution. It handles connection drops and background sync.
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a claude-codeWhat mobile-offline-support does
The skill provides architecture patterns for mobile apps running without internet access. It covers storage strategies with AsyncStorage and SQLite, alongside sync models for server updates. It also includes dedicated guides for React Native, Android Room, and iOS Core Data.
Storage logic relies on timestamped caching and queued mutations. The instructions explicitly warn against storing unencrypted sensitive data locally. They also forbid unbounded queues. Rapid sync loops drain battery power and should be avoided.
What it helps with
- cache data locally using AsyncStorage or SQLite
- queue outgoing actions until network connectivity returns
- resolve data conflicts between local edits and the server
- set up persistent storage with Android Room or iOS Core Data
Example prompts for the agent
- Create a storage manager class that saves items to AsyncStorage with timestamps.
- Show how to handle conflicts between local Realm changes and incoming server records.
- Build an offline mutation queue that triggers sync when NetInfo detects connectivity.
How to install mobile-offline-support
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a claude-code2Manually: put the files in place
~/.claude/skills/mobile-offline-support/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mobile-offline-support/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a codex2Manually: put the files in place
.agents/skills/mobile-offline-support/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a cursor2Manually: put the files in place
.cursor/skills/mobile-offline-support/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts mobile-offline-support2Manually: put the files in place
.github/skills/mobile-offline-support/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/mobile-offline-supportManually: put the files in place
.devin/skills/mobile-offline-support/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mobile-offline-support
How to install mobile-offline-support in Claude Code?
Run npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a claude-code. The file will be placed in ~/.claude/skills/mobile-offline-support/SKILL.md.
What does the mobile-offline-support skill do?
It guides the assistant in implementing offline-first mobile workflows. The skill sets rules for local persistence, queueing network requests, and resolving edit conflicts.
Which mobile storage engines does the skill reference?
It provides guides for AsyncStorage and SQLite in React Native, alongside iOS Core Data and Android Room.
Source text
SKILL.md · MIT
---
name: mobile-offline-support
description: >
Implement offline-first mobile apps with local storage, sync strategies, and
conflict resolution. Covers AsyncStorage, Realm, SQLite, and background sync
patterns.
---
# Mobile Offline Support
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Design offline-first mobile applications that provide seamless user experience regardless of connectivity.
## When to Use
- Building apps that work without internet connection
- Implementing seamless sync when connectivity returns
- Handling data conflicts between device and server
- Reducing server load with intelligent caching
- Improving app responsiveness with local storage
## Quick Start
Minimal working example:
```javascript
import AsyncStorage from '@react-native-async-storage/async-storage';
import NetInfo from '@react-native-community/netinfo';
class StorageManager {
static async saveItems(items) {
try {
await AsyncStorage.setItem(
'items_cache',
JSON.stringify({ data: items, timestamp: Date.now() })
);
} catch (error) {
console.error('Failed to save items:', error);
}
}
static async getItems() {
try {
const data = await AsyncStorage.getItem('items_cache');
return data ? JSON.parse(data) : null;
} catch (error) {
console.error('Failed to retrieve items:', error);
return null;
}
}
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [React Native Offline Storage](references/react-native-offline-storage.md) | React Native Offline Storage |
| [iOS Core Data Implementation](references/ios-core-data-implementation.md) | iOS Core Data Implementation |
| [Android Room Database](references/android-room-database.md) | Android Room Database |
## Best Practices
### ✅ DO
- Implement robust local storage
- Use automatic sync when online
- Provide visual feedback for offline status
- Queue actions for later sync
- Handle conflicts gracefully
- Cache frequently accessed data
- Implement proper error recovery
- Test offline scenarios thoroughly
- Use compression for large data
- Monitor storage usage
### ❌ DON'T
- Assume constant connectivity
- Sync large files frequently
- Ignore storage limitations
- Force unnecessary syncing
- Lose data on offline mode
- Store sensitive data unencrypted
- Accumulate infinite queue items
- Ignore sync failures silently
- Sync in tight loops
- Deploy without offline testing
© aj-geddes · MIT · aj-geddes/useful-ai-prompts
Similar skills
Everything for Mobile →mobile-offline-support by other authors comes first.