Skip to content
secondsky avatar

Mobile Offline Support

Offline-first mobile data layer with local caching, a bounded sync queue, and last-write-wins conflict resolution.

CCM score
52 of 100
skills.sh installs
425
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers React Native offline data handling: local reads and writes, server fetch and sync, and queue replay on reconnect
  • Includes a OfflineManager class, a last-write-wins resolveConflict function, and an OfflineIndicator banner component
  • Enforces a 1000-item sync queue cap that discards the oldest entry and warns when the cap is exceeded
  • Points to iOS Core Data and Android Room with WorkManager sync references for native implementations

Install

$ npx -y skills add secondsky/claude-skills --skill mobile-offline-support -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Mobile Offline Support

Build offline-first mobile applications with local storage and synchronization.

React Native Implementation

import AsyncStorage from '@react-native-async-storage/async-storage';
import NetInfo from '@react-native-community/netinfo';

class OfflineManager {
  constructor() {
    this.syncQueue = [];
    this.isOnline = true;
    // Maximum items in sync queue before discarding oldest
    this.MAX_SYNC_QUEUE_LENGTH = 1000;

    NetInfo.addEventListener(state => {
      this.isOnline = state.isConnected;
      if (this.isOnline) this.processQueue();
    });
  }

  /**
   * Fetch data from server.
   * TODO: Replace with actual API endpoint implementation.
   */
  async fetchFromServer(key) {
    try {
      // Example implementation - replace with your API
      const response = await fetch(`${API_BASE_URL}/data/${key}`);
      if (!response.ok) {
        throw new Error(`Server returned ${response.status}`);
      }
      return await response.json();
    } catch (error) {
      console.error('fetchFromServer failed:', error);
      throw new Error(`Failed to fetch ${key}: ${error.message}`);
    }
  }

Details

Repository
github.com/secondsky/claude-skills
Categories
Mobile Apps, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the mobile-offline-support skill do?

mobile-offline-support builds offline-first mobile apps with local storage and synchronization. It covers a sync queue for actions made while offline, conflict resolution between local and server data, and connectivity handling with an offline indicator.

How do I install the mobile-offline-support skill?

Run npx -y skills add secondsky/claude-skills --skill mobile-offline-support -y in your project. After that, the mobile-offline-support skill lets your agent write offline caching, queued sync and conflict handling for React Native code.

Which mobile-offline-support skill topics does it cover for sync conflicts and storage limits?

mobile-offline-support includes last-write-wins conflict resolution and an option to merge changes, plus a capped sync queue that discards the oldest items when full. It also explains how to persist the queue and retry failed syncs.

Does the mobile-offline-support skill cover native iOS or Android storage?

mobile-offline-support points to a reference file for native implementations, including iOS Core Data with a sync manager and Android Room database with WorkManager sync. Its main examples use React Native with AsyncStorage and NetInfo.

More from secondsky/claude-skills

All 116

Similar to Mobile Offline Support

More Mobile Apps