From aj-geddes-useful-ai-prompts-4
Guides implementing offline-first mobile apps with local storage (AsyncStorage, Realm, SQLite), sync strategies, and conflict resolution for React Native, iOS, and Android.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:mobile-offline-supportThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Design offline-first mobile applications that provide seamless user experience regardless of connectivity.
Minimal working example:
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)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| React Native Offline Storage | React Native Offline Storage |
| iOS Core Data Implementation | iOS Core Data Implementation |
| Android Room Database | Android Room Database |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Guides offline-first mobile architecture: local DB sync (WatermelonDB, Realm, Hive, SQLite), conflict resolution (LWW, CRDT), optimistic UI, background sync (WorkManager, BGTaskScheduler), connectivity detection. Use for reliable offline apps.
Designs offline-first mobile architectures with local databases, sync engines, conflict resolution, mutation queues, and background sync. For apps that must work without signal.
Implements offline-first React Native apps using AsyncStorage for local storage, sync queues with limits, NetInfo for connectivity, and server sync. Use for offline data handling, sync conflicts, queue management, storage limits, network errors.