cap-go avatar

Capacitor Offline First

This is your blueprint for building Capacitor apps that work offline. It covers the full stack: network detection with the Capacitor Network plugin, local storage with Fast SQL, and a complete sync manager that handles pending changes and conflict resolution. The architecture is practical, separating online/offline modes with a service layer that transparently falls back to cached data. Worth noting that Fast SQL requires platform-specific setup (localhost networking on iOS, cleartext exceptions on Android), so budget time for that. The sync strategy is timestamp-based with soft deletes, which works for most apps but might need adjustment if you have complex multi-user conflict scenarios.

skills.sh installs
1.1K
GitHub stars
77
last updated
Aug 21, 2026

Install

$ npx -y skills add cap-go/capgo-skills --skill capacitor-offline-first --agent claude-code

Installs into .claude/skills of the current project.

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)

Sponsors

Details

Repository
github.com/cap-go/capgo-skills
Categories
Documentation, Mobile Development, Databases
First seen
Jun 3, 2026

More from cap-go/capgo-skills

All 41
1mblode avatartypography-auditmblode/agent-skillsAudits web typography against 78 rules in 10 categories: font selection and @font-face setup, sizing and measure, punctuation, spacing and rhythm, hierarchy, al1.1Kskills.sh installs
2forcedotcom avatarexternal-diagram-visual-generateforcedotcom/sf-skillsAI-powered image generation for Salesforce visuals via Nano Banana Pro. Use this skill when the user needs rendered PNG/SVG output such as visual ERDs (Entity R1.1Kskills.sh installs
3asyrafhussin avatartypescript-react-patternsasyrafhussin/agent-skillsTypeScript best practices for React development. Use when writing typed React components, hooks, events, refs, or generic components. Triggers on tasks involvin1.1Kskills.sh installs
4alirezarezvani avatarui-design-systemalirezarezvani/claude-skillsUI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handof1.1Kskills.sh installs
5kostja94 avataralternatives-page-generatorkostja94/marketing-skillsWhen the user wants to create, optimize, or audit alternatives or comparison content (page or blog article). Also use when the user mentions "alternatives page,1.1Kskills.sh installs
6azurecosmosdb avatarcosmosdb-best-practicesazurecosmosdb/cosmosdb-agent-kitAzure Cosmos DB performance optimization and best practices guidelines for NoSQL, partitioning, queries, and SDK usage. Use when writing, reviewing, or refactor1.1Kskills.sh installs