Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill mobile-offline-support -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/mobile-offline-support/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mobile-offline-support/

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.

From the same set149

real-time-features Equips coding assistants with architectural patterns for WebSockets, Server-Sent Events, and long polling. Useful for chat apps, live feeds, and collaborative workspaces. CX Codex +1 543installs web-performance-audit This skill measures page load times, finds bottlenecks and points at what to fix. Useful after a big release or when users complain about slowness. CX Codex +1 543installs semantic-versioning A skill for automated SemVer versioning: conventional commits, semantic-release and changelog generation. CX Codex +1 542installs browser-debugging A skill for chasing client-side bugs: JavaScript errors, broken layouts, slow pages. Useful when something misbehaves and the cause isn't obvious. CX Codex +1 540installs design-system-creation A skill that lays out a design system: tokens, components, docs and governance. Useful once you have more than one interface or team. CX Codex +1 537installs gcp-cloud-run Guides container deployments to Google Cloud Run with gcloud CLI and Terraform. Useful when releasing stateless HTTP backends. CX Codex +1 535installs Causal Inference A skill that walks your agent through causal effect estimation: propensity scores, instrumental variables, causal graphs. Useful when a randomized experiment isn't an option. CX Codex +1 534installs code-generation-template A skill for generating code from templates: project scaffolding, boilerplate, AST-based generation and template engines. Useful when you need to produce repetitive code fast. CX Codex +1 532installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor