Capacitor Offline First
Offline-first Capacitor data design using local SQLite, an outbox sync queue, and conflict resolution rules.
- CCM score
- 66 of 100
- skills.sh installs
- 1.2K
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers local SQLite as the source of truth via
@capgo/capacitor-fast-sql, with outbox sync, delta pulls, and tombstone deletes - Includes setup for iOS ATS local networking and Android localhost cleartext, plus
networkStatusChangeand Appresumesync triggers - Enforces idempotency keys on every mutation and treats fetch failures as offline, since
connectedalone does not prove reachability - Designed for apps that must read and write without internet and need service workers avoided in native builds
Install
$ npx -y skills add cap-go/capgo-skills --skill capacitor-offline-first -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Offline-First Capacitor Apps
When to Use
TRIGGER when:
- The app must read and write while offline and sync later
- Choosing local storage (Preferences vs SQLite vs IndexedDB) for user data
- Writes are duplicated, lost, or overwritten during sync
- Cached data vanishes on iOS after low-storage events
- A service worker was added and native plugins stopped working (
Plugin not implemented)
Do not use:
- Replacing
@capacitor-community/sqlite/ Ionic secure storage:sqlite-to-fast-sql - Getting new web code to devices (OTA):
capgo-live-updates - Encryption key storage, SSL pinning:
capacitor-security - Query speed / bridge overhead tuning:
capacitor-performance
Decisions (make these before writing code)
Details
- Repository
- github.com/cap-go/capgo-skills
- Categories
- Mobile Apps, Databases
- First seen
- Jun 3, 2026
Questions
What does the capacitor-offline-first skill do?
The capacitor-offline-first skill designs and implements offline-first data in Capacitor apps. It uses a local SQLite source of truth through @capgo/capacitor-fast-sql, an outbox sync queue, delta pulls, and conflict resolution. It also handles network detection with @capacitor/network and background sync.
How do I install the capacitor-offline-first skill?
Run npx -y skills add cap-go/capgo-skills --skill capacitor-offline-first -y in a project. Once installed, the agent can build offline data storage that keeps working without internet and syncs later.
Why does my Capacitor app lose data offline on iOS?
The capacitor-offline-first skill explains that localStorage and IndexedDB can be evicted by iOS under storage pressure. It moves record storage to SQLite via @capgo/capacitor-fast-sql, with small settings kept in @capacitor/preferences.
Why does Plugin not implemented appear after I add a service worker?
The capacitor-offline-first skill notes that a service worker can block Capacitor plugin injection in native WebViews. It recommends removing the service worker from native builds and keeping it only for the PWA build.
What do I need to set up before using capacitor-offline-first?
The skill needs @capgo/capacitor-fast-sql and @capacitor/network installed, followed by npx cap sync. It also requires iOS ATS local networking and Android localhost cleartext setup.
More from cap-go/capgo-skills
All 41- Capacitor Keyboard1.1K
- Capacitor Ci Cd1.1K
- Tailwind Capacitor1.1K
- Capacitor Apple Review Preflight1K
- Capacitor Mcp1K
- Framework To Capacitor956
- Capgo Live Updates943
- Konsta Ui918
- Cocoapods To Spm881
- Capacitor App Upgrades859
- Cordova To Capacitor851
- Capgo Cli Usage817
- Capacitor Plugin Upgrades815
- Capacitor Plugin Spm Support800
- Capgo Native Builds798
- Capgo Release Workflows793
- Sqlite To Fast Sql793
- Capgo Release Management792
- Capacitor App Upgrade V7 To V8785
- Capgo Cloud776
- Capgo Organization Management768
- Ionic Enterprise Sdk Migration760
- Capacitor Plugin Upgrade V7 To V8724
- Skill Creator717
Similar to Capacitor Offline First
More Mobile Appsmobile-offline-supportaj-geddes/useful-ai-prompts547 installsOffline-first mobile app patterns covering local storage, sync, and conflict handling for React Native, iOS, and Android.
capacitor-best-practicescap-go/capgo-skills3K installsStructured review guide for Capacitor app configuration, plugin usage, and release readiness across iOS and Android.
cloudkitdpearson2699/swift-ios-skills3.6K installsSync CloudKit, iCloud key-value, and iCloud Drive data in iOS/macOS apps with conflict, error, and account handling.
swift-actor-persistenceaffaan-m/ecc12K installsThread-safe Swift persistence built on actors, pairing an in-memory cache with atomic file-backed storage.