Offline first design
Skill sairam0424/MindForge/.mindforge/skills/offline-first-design
MindForge: The Enterprise Agentic Framework for Claude Code & Antigravity. High-performance autonomous execution, wave-parallelism, and multi-tier governance for production-grade AI engineering.From the repository description
npx -y skills add sairam0424/MindForge --skill offline-first-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, 482 tokens by cl100k_base, as published. Nobody here has run it
Skill — Offline-First Design & Sync Architecture
When this skill activates
This skill activates when designing offline-capable mobile or web applications, including conflict resolution strategies, sync protocols, local-first data patterns, or CRDT-based collaborative features.
Mandatory actions when this skill is active
Before writing any code
- Define conflict resolution strategy (last-write-wins, CRDT, operational transformation, or custom merge logic)
- Choose local storage solution appropriate for data volume and query patterns (SQLite, Realm, WatermelonDB, IndexedDB)
- Design sync protocol with idempotency, versioning, and resumable transfers for unreliable networks
- Establish data model with conflict-free properties where possible (append-only logs, tombstone deletions)
During implementation
- Implement optimistic UI updates with rollback capability — show immediate feedback, reconcile on sync
- Use operation queues with exponential backoff for failed network requests, persist queue to survive app restarts
- Store vector clocks, lamport timestamps, or hybrid logical clocks to track causality across devices
- Implement delta sync to minimize bandwidth — send only changed fields, not entire documents
- Handle edge cases: simultaneous edits on multiple devices, partial sync failures, stale read after write
- Use CRDTs (Automerge, Yjs, or custom implementations) for collaborative editing with automatic conflict resolution
- Implement sync status indicators and manual sync triggers for user transparency
After implementation
- Test offline scenarios exhaustively: airplane mode, flaky networks, background app termination during sync
- Simulate conflict scenarios with multiple devices editing same data simultaneously
- Verify data integrity after sync — no duplicate records, no lost updates, correct conflict resolution
- Measure sync performance: time to sync after reconnection, battery impact, bandwidth usage
Self-check before task completion
- App remains functional offline with clear UI indication of sync status
- Conflicts are resolved correctly according to business rules, with audit trail if needed
- Sync protocol is idempotent — replaying operations produces same result
- Local data persists correctly across app restarts and OS updates
- Background sync works within platform constraints (iOS background fetch, Android WorkManager)
- Edge cases handled: clock skew, partial sync, corrupted local data, schema migrations during offline period
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.