crdts

Explain and demonstrate Conflict-Free Replicated Data Types for distributed systems.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/hung-phan/system-skills --skill crdts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: crdts
Source: https://github.com/hung-phan/system-skills/tree/main/skills/system-review/references/data-systems/crdts
Command: npx skills add https://github.com/hung-phan/system-skills --skill crdts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides comprehensive knowledge and tools to design and implement Conflict-Free Replicated Data Types (CRDTs), solving the challenges of multi-master replication, offline-first apps, and collaborative editing.

Core Features & Use Cases

  • CRDT Education: Offers an in-depth understanding of CRDTs, including their mathematical foundations, different types (e.g., G-Counter, OR-Set), and use cases.
  • Implementation Examples: Provides code snippets and examples for building various CRDT types, such as counters, sets, and text editors.
  • Integration Guidelines: Suggests how to integrate CRDTs into existing systems, particularly for offline-first and multi-region active-active databases.

Quick Start

Explore the CRDT concepts and implementation in the 'crdts' skill unit, focusing on understanding G-Counters and OR-Sets as building blocks for reliable data replication.

Frequently Asked Questions about crdts

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

FAQPage Schema
What are CRDTs and how do they solve data replication conflicts in distributed systems?▼

CRDTs (Conflict-Free Replicated Data Types) are data structures that ensure consistency and availability in distributed systems by allowing concurrent updates without conflicts. They solve multi-master replication issues by mathematically merging divergent data copies automatically.

How do I build offline-first apps with reliable data replication?▼

You can build offline-first apps with reliable data replication by integrating CRDTs like G-Counters and OR-Sets. These data structures allow local operations while disconnected and automatically synchronize changes when network connectivity resumes without manual conflict resolution.

When do I need CRDTs for collaborative text editing?▼

You need CRDTs for collaborative text editing when multiple users concurrently modify the same document across distributed networks. CRDTs ensure every edit operation merges deterministically, preventing data loss and avoiding the need for central locking mechanisms.

Can I use CRDTs for multi-region active-active database replication?▼

Yes, you can use CRDTs for multi-region active-active database replication. They enable concurrent writes across multiple geographic regions by guaranteeing eventual consistency through deterministic merge functions, eliminating the need for distributed locks.

What is the difference between a G-Counter and an OR-Set in CRDT design?▼

A G-Counter is a grow-only counter CRDT used for tracking monotonically increasing values across distributed nodes, while an OR-Set (Observed-Remove Set) allows adding and removing elements by tracking unique tags, making it suitable for dynamic collaborative data.

What are the limitations of using CRDTs for distributed data synchronization?▼

CRDTs for distributed data synchronization require additional metadata to track operations and resolve merges, which increases storage overhead. They also demand strict adherence to mathematical merge rules, and complex state-based CRDTs can consume significant bandwidth during synchronization.