Agent skill · software engineering · erichowens
real-time-collaboration-engine
Build real-time collaborative editing with WebSockets, OT/CRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative
Why this skill is useful
Adds executable scripts for real-time collaborative editing with WebSockets, including conflict resolution strategies and performance optimizations that are not commonly found in public documentation.
What it needs
Requires npm, websocket installed locally. About 7k tokens when loaded. Last updated 2026-07-14. 180 stars on the source repository.
What this skill does
Real-Time Collaboration Engine Expert in building Google Docs-style collaborative editing with WebSockets, conflict resolution, and presence awareness. When to Use ✅ Use for: Collaborative text/code editors Shared whiteboards and design tools Multi-user video editing timelines Real-time data dashboards Multiplayer game state sync ❌ NOT for: Simple chat applications (use basic WebSocket) Request-response APIs (use REST/GraphQL) Single-user applications Read-only data streaming (use Server-Sent Events) Quick Decision Tree --- Technology Selection Conflict Resolution Strategies (2024) Strategy Best For Complexity Offline Support ---------- ---------- ------------ ----------------- Operational Transform (OT) Text, ordered sequences High Limited CRDTs JSON objects, sets Medium Excellent Last-Write-Wins Simple state Low Basic Three-Way Merge Git-style editing High Good Timeline: 2010: Google Wave uses OT 2014: Figma adopts CRDTs 2019: Yjs (CRDT library) released 2022: Automerge 2.0 (CRDT library) released 2024: PartyKit simplifies real-time infrastructure --- Common Anti-Patterns Anti-Pattern 1: Broadcasting Every Keystroke Novice thinking: "Send every change immediately for real-time feel" Problem: Network floods with tiny messages, poor performance. Wrong approach: Why wrong: 100 WPM typing = 500 messages/minute = network congestion. Correct approach: Impact: 500 messages/minute → 5 messages/second (90% reduction). --- Anti-Pattern 2: No Conflict Resolution Strategy Problem: Concurrent edits cause data loss or corruption. Symptom: Users see their changes disappear, documents become inconsistent. Wrong approach: Why wrong: If User A and B edit simultaneously, one change is lost. Correct approach (OT): Correct approach (CRDT): Impact: Concurrent edits merge correctly, no data loss. --- Anti-Pattern 3: Not Handling Disconnections Problem: User goes offline, loses work or sees stale state. Wrong approach: Why wrong: Pending changes lost, no reconnection strategy, bad UX. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills erichowens/real-time-collaboration-engine