sincronizacao-e-armazenamento-offline-first

Synchronizes local SQLite databases with remote servers using Delta-State CRDTs and LWW conflict resolution.

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill sincronizacao-e-armazenamento-offline-first-ryanzucchi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sincronizacao-e-armazenamento-offline-first
Source: https://github.com/Ryanzucchi/Eldritch_Lich/tree/main/.agents/skills/sincronizacao-e-armazenamento-offline-first
Command: npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill sincronizacao-e-armazenamento-offline-first-ryanzucchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writers and app users lose work when offline edits are overwritten by naive file-level sync. This Skill defines how to keep local SQLite and vector databases consistent with a remote server through incremental, transaction-level replication instead of replacing database files. ## Core Features & Use Cases - Offline Mutation Logging: Records local changes in a mutation log with logical vector clocks so edits made without internet are preserved. - Delta-State CRDT Sync: On reconnection, exchanges only the missing logical deltas with the server and applies them inside protected transactions. - LWW Conflict Resolution: Resolves simultaneous edits to the same field using physical timestamps and vector clocks, archiving the losing change. - Hybrid Search QoS: Offloads heavy GraphRAG and summarization workloads to the cloud when the client device lacks GPU or battery headroom. - Use Case: A novelist edits a character sheet on a laptop without internet; upon reconnecting, the changes merge with server state without data loss or duplicated rows. ## Quick Start Apply this skill to synchronize my local SQLite database with the remote server after reconnecting to the internet.

Frequently Asked Questions about sincronizacao-e-armazenamento-offline-first

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a local SQLite database with a remote server offline-first?▼

Record every local change in a mutation log with vector clocks while offline, then on reconnection exchange state vectors with the server and apply only the missing deltas inside protected transactions. Never download or replace the physical database file.

What is Delta-State CRDT synchronization?▼

Delta-State CRDT synchronization sends only the incremental differences (deltas) between replicas instead of full state. The client computes its vector clock, the server replies with missing transaction deltas, and the client applies them sequentially in atomic batches.

How does Last-Write-Wins resolve sync conflicts?▼

Last-Write-Wins compares physical timestamps synchronized via NTP plus logical vector clocks for the same field edited on two devices. The edit with the most recent timestamp is persisted, while the losing change is discarded or archived in a reconciliation history table.

When should I not use offline-first CRDT sync?▼

Avoid it for real-time keystroke-level collaborative typing in the same paragraph, which needs a dedicated rich-text CRDT editor skill, and for LGPD hard-delete operations that require physical removal of data blocks rather than logical replication.

Why does database file replacement cause data loss in offline-first apps?▼

Downloading the server's database file overwrites all offline modifications made on the device, causing irreversible loss. Replication must occur strictly at the level of logical transactions and incremental mutation logs, never raw file substitution.

How do I prevent duplicate rows after reconnection sync?▼

Track logical record IDs and vector clocks consistently so the server can deduplicate incoming mutations. Duplicates typically appear when logical ID tracking fails during the reconnection handshake, so validate the mutation log before applying batches.