[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79ACSMR0V4GGZFKD84ZE05A":3,"skill-same:01M79ACSMR0V4GGZFKD84ZE05A":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M79ACSMR0V4GGZFKD84ZE05A","mobile-offline-support",null,"Offline-first mobile apps with local storage, sync queues, conflict resolution. Use for offline functionality, data sync, connectivity handling, or encountering sync conflicts, queue management, storage limits, network transition errors.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fmobile-offline-support\u002Fskills\u002Fmobile-offline-support\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: mobile-offline-support\ndescription: Offline-first mobile apps with local storage, sync queues, conflict resolution. Use for offline functionality, data sync, connectivity handling, or encountering sync conflicts, queue management, storage limits, network transition errors.\nlicense: MIT\n---\n\n# Mobile Offline Support\n\nBuild offline-first mobile applications with local storage and synchronization.\n\n## React Native Implementation\n\n```javascript\nimport AsyncStorage from '@react-native-async-storage\u002Fasync-storage';\nimport NetInfo from '@react-native-community\u002Fnetinfo';\n\nclass OfflineManager {\n  constructor() {\n    this.syncQueue = [];\n    this.isOnline = true;\n    \u002F\u002F Maximum items in sync queue before discarding oldest\n    this.MAX_SYNC_QUEUE_LENGTH = 1000;\n\n    NetInfo.addEventListener(state => {\n      this.isOnline = state.isConnected;\n      if (this.isOnline) this.processQueue();\n    });\n  }\n\n  \u002F**\n   * Fetch data from server.\n   * TODO: Replace with actual API endpoint implementation.\n   *\u002F\n  async fetchFromServer(key) {\n    try {\n      \u002F\u002F Example implementation - replace with your API\n      const response = await fetch(`${API_BASE_URL}\u002Fdata\u002F${key}`);\n      if (!response.ok) {\n        throw new Error(`Server returned ${response.status}`);\n      }\n      return await response.json();\n    } catch (error) {\n      console.error('fetchFromServer failed:', error);\n      throw new Error(`Failed to fetch ${key}: ${error.message}`);\n    }\n  }\n\n  \u002F**\n   * Sync data to server.\n   * TODO: Replace with actual API endpoint implementation.\n   *\u002F\n  async syncToServer(key, data) {\n    try {\n      \u002F\u002F Example implementation - replace with your API\n      const response = await fetch(`${API_BASE_URL}\u002Fdata\u002F${key}`, {\n        method: 'POST',\n        headers: { 'Content-Type': 'application\u002Fjson' },\n        body: JSON.stringify(data)\n      });\n      if (!response.ok) {\n        throw new Error(`Server returned ${response.status}`);\n      }\n      return await response.json();\n    } catch (error) {\n      console.error('syncToServer failed:', error);\n      throw new Error(`Failed to sync ${key}: ${error.message}`);\n    }\n  }\n\n  async getData(key) {\n    const cached = await AsyncStorage.getItem(key);\n    if (cached) return JSON.parse(cached);\n\n    if (this.isOnline) {\n      const data = await this.fetchFromServer(key);\n      await AsyncStorage.setItem(key, JSON.stringify(data));\n      return data;\n    }\n\n    return null;\n  }\n\n  async saveData(key, data) {\n    await AsyncStorage.setItem(key, JSON.stringify(data));\n\n    if (this.isOnline) {\n      await this.syncToServer(key, data);\n    } else {\n      \u002F\u002F Add to queue\n      this.syncQueue.push({ key, data, timestamp: Date.now() });\n\n      \u002F\u002F Enforce queue bounds - discard oldest if exceeded\n      while (this.syncQueue.length > this.MAX_SYNC_QUEUE_LENGTH) {\n        const discarded = this.syncQueue.shift();\n        console.warn(`Sync queue full - discarded oldest item: ${discarded.key}`);\n      }\n\n      \u002F\u002F Persist trimmed queue\n      await AsyncStorage.setItem('syncQueue', JSON.stringify(this.syncQueue));\n    }\n  }\n\n  async processQueue() {\n    const failedItems = [];\n    for (const item of this.syncQueue) {\n      try {\n        await this.syncToServer(item.key, item.data);\n      } catch (err) {\n        console.error('Sync failed:', err);\n        failedItems.push(item);\n      }\n    }\n    this.syncQueue = failedItems;\n    if (failedItems.length === 0) {\n      await AsyncStorage.removeItem('syncQueue');\n    } else {\n      await AsyncStorage.setItem('syncQueue', JSON.stringify(failedItems));\n    }\n  }\n}\n```\n\n## Conflict Resolution\n\n```javascript\nfunction resolveConflict(local, server) {\n  \u002F\u002F Last-write-wins\n  if (local.updatedAt > server.updatedAt) return local;\n  return server;\n\n  \u002F\u002F Or merge changes\n  \u002F\u002F return { ...server, ...local };\n}\n```\n\n## UI Indicators\n\n```jsx\nfunction OfflineIndicator() {\n  const [isOnline, setIsOnline] = useState(true);\n\n  useEffect(() => {\n    return NetInfo.addEventListener(state => {\n      setIsOnline(state.isConnected);\n    });\n  }, []);\n\n  if (isOnline) return null;\n\n  return (\n    \u003CView style={styles.banner}>\n      \u003CText>You're offline. Changes will sync when connected.\u003C\u002FText>\n    \u003C\u002FView>\n  );\n}\n```\n\n## Best Practices\n\n- Cache frequently accessed data locally\n- Queue actions for later sync\n- Show clear offline indicators\n- Handle sync conflicts gracefully\n- Compress stored data\n- Test offline scenarios thoroughly\n\n## Native Implementations\n\nSee [references\u002Fnative-implementations.md](references\u002Fnative-implementations.md) for:\n- iOS Core Data with sync manager\n- Android Room database with WorkManager sync\n\n## Avoid\n\n- Assuming connectivity\n- Losing data on sync failures\n- Unbounded queue growth\n- Syncing sensitive data insecurely\n","# Mobile Offline Support\n\nBuild offline-first mobile applications with local storage and synchronization.\n\n## React Native Implementation\n\n```javascript\nimport AsyncStorage from '@react-native-async-storage\u002Fasync-storage';\nimport NetInfo from '@react-native-community\u002Fnetinfo';\n\nclass OfflineManager {\n  constructor() {\n    this.syncQueue = [];\n    this.isOnline = true;\n    \u002F\u002F Maximum items in sync queue before discarding oldest\n    this.MAX_SYNC_QUEUE_LENGTH = 1000;\n\n    NetInfo.addEventListener(state => {\n      this.isOnline = state.isConnected;\n      if (this.isOnline) this.processQueue();\n    });\n  }\n\n  \u002F**\n   * Fetch data from server.\n   * TODO: Replace with actual API endpoint implementation.\n   *\u002F\n  async fetchFromServer(key) {\n    try {\n      \u002F\u002F Example implementation - replace with your API\n      const response = await fetch(`${API_BASE_URL}\u002Fdata\u002F${key}`);\n      if (!response.ok) {\n        throw new Error(`Server returned ${response.status}`);\n      }\n      return await response.json();\n    } catch (error) {\n      console.error('fetchFromServer failed:', error);\n      throw new Error(`Failed to fetch ${key}: ${error.message}`);\n    }\n  }\n\n  \u002F**\n   * Sync data to server.\n   * TODO: Replace with actual API endpoint implementation.\n   *\u002F\n  async syncToServer(key, data) {\n    try {\n      \u002F\u002F Example implementation - replace with your API\n      const response = await fetch(`${API_BASE_URL}\u002Fdata\u002F${key}`, {\n        method: 'POST',\n        headers: { 'Content-Type': 'application\u002Fjson' },\n        body: JSON.stringify(data)\n      });\n      if (!response.ok) {\n        throw new Error(`Server returned ${response.status}`);\n      }\n      return await response.json();\n    } catch (error) {\n      console.error('syncToServer failed:', error);\n      throw new Error(`Failed to sync ${key}: ${error.message}`);\n    }\n  }\n\n  async getData(key) {\n    const cached = await AsyncStorage.getItem(key);\n    if (cached) return JSON.parse(cached);\n\n    if (this.isOnline) {\n      const data = await this.fetchFromServer(key);\n      await AsyncStorage.setItem(key, JSON.stringify(data));\n      return data;\n    }\n\n    return null;\n  }\n\n  async saveData(key, data) {\n    await AsyncStorage.setItem(key, JSON.stringify(data));\n\n    if (this.isOnline) {\n      await this.syncToServer(key, data);\n    } else {\n      \u002F\u002F Add to queue\n      this.syncQueue.push({ key, data, timestamp: Date.now() });\n\n      \u002F\u002F Enforce queue bounds - discard oldest if exceeded\n      while (this.syncQueue.length > this.MAX_SYNC_QUEUE_LENGTH) {\n        const discarded = this.syncQueue.shift();\n        console.warn(`Sync queue full - discarded oldest item: ${discarded.key}`);\n      }\n\n      \u002F\u002F Persist trimmed queue\n      await AsyncStorage.setItem('syncQueue', JSON.stringify(this.syncQueue));\n    }\n  }\n\n  async processQueue() {\n    const failedItems = [];\n    for (const item of this.syncQueue) {\n      try {\n        await this.syncToServer(item.key, item.data);\n      } catch (err) {\n        console.error('Sync failed:', err);\n        failedItems.push(item);\n      }\n    }\n    this.syncQueue = failedItems;\n    if (failedItems.length === 0) {\n      await AsyncStorage.removeItem('syncQueue');\n    } else {\n      await AsyncStorage.setItem('syncQueue', JSON.stringify(failedItems));\n    }\n  }\n}\n```\n\n## Conflict Resolution\n\n```javascript\nfunction resolveConflict(local, server) {\n  \u002F\u002F Last-write-wins\n  if (local.updatedAt > server.updatedAt) return local;\n  return server;\n\n  \u002F\u002F Or merge changes\n  \u002F\u002F return { ...server, ...local };\n}\n```\n\n## UI Indicators\n\n```jsx\nfunction OfflineIndicator() {\n  const [isOnline, setIsOnline] = useState(true);\n\n  useEffect(() => {\n    return NetInfo.addEventListener(state => {\n      setIsOnline(state.isConnected);\n    });\n  }, []);\n\n  if (isOnline) return null;\n\n  return (\n    \u003CView style={styles.banner}>\n      \u003CText>You're offline. Changes will sync when connected.\u003C\u002FText>\n    \u003C\u002FView>\n  );\n}\n```\n\n## Best Practices\n\n- Cache frequently accessed data locally\n- Queue actions for later sync\n- Show clear offline indicators\n- Handle sync conflicts gracefully\n- Compress stored data\n- Test offline scenarios thoroughly\n\n## Native Implementations\n\nSee [references\u002Fnative-implementations.md](references\u002Fnative-implementations.md) for:\n- iOS Core Data with sync manager\n- Android Room database with WorkManager sync\n\n## Avoid\n\n- Assuming connectivity\n- Losing data on sync failures\n- Unbounded queue growth\n- Syncing sensitive data insecurely\n",{"name":5,"license":15,"description":7},"main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fmobile-offline-support\u002Fskills\u002Fmobile-offline-support","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill mobile-offline-support",{"tool":36,"command":37},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill mobile-offline-support",{"tool":39,"command":40},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill mobile-offline-support","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fmobile-offline-support\u002Fskills\u002Fmobile-offline-support\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fnative-implementations.md","REFERENCE","参考文档",8082,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fmobile-offline-support\u002Fskills\u002Fmobile-offline-support\u002Freferences\u002Fnative-implementations.md",[51,59,66,73,80,87],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]