jpskill.com
🛠️ 開発・MCP コミュニティ

mobile-offline-support

Implement offline-first mobile apps with local storage, sync strategies, and conflict resolution. Covers AsyncStorage, Realm, SQLite, and background sync patterns.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o mobile-offline-support.zip https://jpskill.com/download/21472.zip && unzip -o mobile-offline-support.zip && rm mobile-offline-support.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21472.zip -OutFile "$d\mobile-offline-support.zip"; Expand-Archive "$d\mobile-offline-support.zip" -DestinationPath $d -Force; ri "$d\mobile-offline-support.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して mobile-offline-support.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → mobile-offline-support フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
4

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

モバイルオフラインサポート

目次

概要

接続状況に関わらずシームレスなユーザーエクスペリエンスを提供する、オフラインファーストのモバイルアプリケーションを設計します。

使用場面

  • インターネット接続なしで動作するアプリを構築する場合
  • 接続が回復したときにシームレスな同期を実装する場合
  • デバイスとサーバー間のデータ競合を処理する場合
  • インテリジェントなキャッシュでサーバー負荷を軽減する場合
  • ローカルストレージでアプリの応答性を向上させる場合

クイックスタート

最小限の動作例:

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)

リファレンスガイド

references/ ディレクトリにある詳細な実装:

ガイド 内容
React Native Offline Storage React Native オフラインストレージ
iOS Core Data Implementation iOS Core Data 実装
Android Room Database Android Room データベース

ベストプラクティス

✅ DO

  • 堅牢なローカルストレージを実装する
  • オンライン時に自動同期を使用する
  • オフラインステータスを視覚的にフィードバックする
  • アクションをキューに入れて後で同期する
  • 競合を適切に処理する
  • 頻繁にアクセスするデータをキャッシュする
  • 適切なエラー回復を実装する
  • オフラインシナリオを徹底的にテストする
  • 大容量データには圧縮を使用する
  • ストレージ使用量を監視する

❌ DON'T

  • 常に接続されていると仮定する
  • 大容量ファイルを頻繁に同期する
  • ストレージの制限を無視する
  • 不要な同期を強制する
  • オフラインモードでデータを失う
  • 機密データを暗号化せずに保存する
  • 無限にキューアイテムを蓄積する
  • 同期失敗を黙って無視する
  • 密なループで同期する
  • オフラインテストなしでデプロイする
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Mobile Offline Support

Table of Contents

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:

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 React Native Offline Storage
iOS Core Data Implementation iOS Core Data Implementation
Android Room Database 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

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。