idorgham/gateflow/expo-offline-sync

Claude Code and agent skill by idorgham/gateflow

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Specialized workflows and patterns for expo-offline-sync.

Install

npx vskill@latest install idorgham/gateflow/expo-offline-sync

SKILL.md

The same SKILL.md was published earlier as idorgham/gateflow/expo-offline-sync.

SKILL: Expo Offline Sync & Queue Management

Purpose

Ensure the GateFlow Scanner and Resident apps remain operational without an active internet connection, synchronizing data reliably once connectivity is restored.

Core Principles

  1. Offline-First: User actions must be recorded locally first (SQLite/WatermelonDB) to ensure zero latency.
  2. Idempotent Retries: Sync operations must be idempotent; multiple attempts at the same sync must not create duplicate records.
  3. Conflict Resolution: Use "Last Write Wins" or timestamp-based merging to resolve conflicts between local and remote states.

Implementation Rules

  • Local Storage: Use expo-sqlite or react-native-mmkv for high-frequency offline logs.
  • Sync Queue: Store actions in a PendingActions table with retryCount and lastError.
  • Background Sync: Trigger sync via expo-task-manager when the device comes back online.

Anti-Patterns

  • Blocking the UI waiting for a network response (always return immediately with "Local Success").
  • Storing large file blobs (photos) in the sync queue; store the file path instead.
  • Retrying infinitely on "Permanent" errors (400 Bad Request); move these to a "Failed" queue for manual review.

Code Examples

Sync Queue Entry (TypeScript)
typescript
interface PendingAction {
id: string; // UUID
type: 'SCAN_LOG' | 'GUEST_INVITE';
payload: string; // JSON stringify
createdAt: number;
status: 'PENDING' | 'SYNCING' | 'FAILED';
}
export const addToQueue = async (action: Omit<PendingAction, 'status'>) => {
await db.executeAsync(
'INSERT INTO pending_actions (id, type, payload, createdAt, status) VALUES (?, ?, ?, ?, ?)',
[action.id, action.type, action.payload, action.createdAt, 'PENDING']
);
};
Exponential Backoff Logic
typescript
const getNextRetry = (count: number) => {
return Date.now() + Math.pow(2, count) * 1000;
};

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
13

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/idorgham/gateflow/expo-offline-sync/badge)](https://verified-skill.com/skills/idorgham/gateflow/expo-offline-sync)

Something wrong with this skill or its page? Tell us.