What problem does it solve?
This Skill solves the problem of API requests and mutations failing when a user is offline, ensuring that data changes are not lost and are synchronized automatically when connectivity returns, which is critical for mobile and desktop applications used in areas with unreliable network access.
Core Features & Use Cases
- Offline Operation Queue: Persists API requests and mutations to disk when the device is offline, using a file-based storage system that survives app restarts.
- Automatic Retry with Exponential Backoff: Processes queued operations when connectivity returns, with configurable retry strategies including exponential backoff with jitter to prevent thundering herd problems.
- Conflict Resolution: Handles server conflicts (HTTP 409) with multiple strategies including server-wins, client-wins, and manual merge, plus supports operation dependencies for ordered execution like creating a parent folder before a child document.
- Use Case: A field service app used in remote areas with no cellular coverage can queue work orders and photos locally, then automatically sync them to the server when the user returns to civilization, with idempotency keys preventing duplicate records if the connection drops during sync.
Quick Start
Use the offline-queue skill to generate a complete offline operation queue system for your Swift app that persists API mutations to disk when offline and automatically retries them with exponential backoff when connectivity returns.