persistence-model

Synchronize versioned SQLite data to Cloudflare R2 with batched writes.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/imankha/video-editor --skill persistence-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: persistence-model
Source: https://github.com/imankha/video-editor/tree/main/src/backend/.claude/skills/persistence-model
Command: npx skills add https://github.com/imankha/video-editor --skill persistence-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a robust approach to local data persistence and cloud-backed synchronization for multi-device users, ensuring a single source of truth.

Core Features & Use Cases

  • Versioned Sync: SQLite data is synchronized to Cloudflare R2 with version tracking to prevent data loss and conflicts.
  • Batched Writes: Writes are tracked and batched to optimize network usage and consistency.
  • Cross-Device Persistence: Per-user data can be accessed and synchronized across devices, with conflict handling and offline support.
  • Use Case: A multi-device app can keep a local database in sync with a central cloud copy, maintaining consistency even after reconnects.

Quick Start

Install dependencies, configure access to R2, and run the backend service to enable automatic synchronization.

Frequently Asked Questions about persistence-model

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

FAQPage Schema
How do I sync SQLite with Cloudflare R2 across multiple devices?

You can sync SQLite with Cloudflare R2 by applying versioned batched writes through a TrackedConnection pattern, which handles conflicts and keeps local and remote stores consistent across devices.

What is the best way to handle conflicts in cross-device SQLite synchronization?

Handling conflicts in cross-device SQLite synchronization is best managed through version tracking and batched writes. This approach prevents data loss by enforcing a single source of truth during cloud sync operations.

Does this SQLite cloud sync approach support offline writes and reconnection?

Yes, this SQLite cloud sync approach supports offline writes by batching them locally. It maintains consistency automatically upon reconnection by syncing the batched writes with version tracking to Cloudflare R2.

Why use versioned batched writes for per-user data persistence?

Versioned batched writes optimize network usage and ensure consistency for per-user data persistence. By tracking versions during cloud synchronization, the system prevents data loss and effectively handles cross-device conflicts.

Can I use this persistence model for a database-backed app requiring a single source of truth?

Yes, you can use this persistence model for database-backed apps requiring a single source of truth. It enforces a TrackedConnection pattern and middleware that perform versioned sync to keep local and remote SQLite stores consistent.