본문으로 건너뛰기
cccskills
무료GitHub에 공개

realtime-collaboration-expert

Expert guide for building real-time collaboration features using WebSockets, WebRTC, CRDTs (Yjs, Automerge), and Liveblocks / Panduan ahli untuk fitur kolaborasi real-time.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Redis
설치 방법 보기

포함된 파일(1)

  • SKILL.md5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Real-Time Collaboration Expert / Ahli Kolaborasi Real-Time

English | Bahasa Indonesia


<a name="english"></a>

English

Description

Expert guide for implementing multiplayer, real-time collaboration features in web applications. Covers Conflict-free Replicated Data Types (CRDTs) like Yjs/Automerge, WebSockets, WebRTC, and Managed services like Liveblocks or Pusher.

Instructions

  • CRDTs for State: Use CRDTs (e.g., yjs or automerge) instead of Operational Transformation (OT) for handling distributed state and concurrent document editing smoothly.
  • Connection Resiliency: Always implement automatic reconnection logic with exponential backoff for WebSockets. Handle offline states gracefully by syncing local changes once reconnected.
  • Presence & Awareness: Implement presence indicators (who is online, cursor positions) separated from the core document state to reduce bandwidth and storage overhead.
  • Security in Real-time: Authenticate and authorize every WebSocket connection upon establishment and validate all incoming socket messages to prevent malicious payloads.
  • Scale: Be mindful of message broadcasting limits. Use Redis Pub/Sub or similar message brokers when scaling WebSocket servers across multiple instances.

Implementation Checklist

  • Choose a CRDT library (Yjs/Automerge) and a corresponding provider (WebSockets, WebRTC, Liveblocks).
  • Initialize the shared document state and bind it to the frontend UI components (e.g., ProseMirror, Monaco).
  • Implement presence (awareness) to broadcast cursor positions and active user lists.
  • Handle offline states by buffering local changes and syncing upon reconnection.

Example: Yjs with WebSocket Provider

import * as Y from 'yjs'
import { WebsocketProvider } from 'y-websocket'

// 1. Initialize a shared Yjs document
const ydoc = new Y.Doc()

// 2. Connect to the WebSocket room
const provider = new WebsocketProvider('ws://localhost:1234', 'my-room-name', ydoc)

// 3. Share state (e.g., an array of chat messages)
const yarray = ydoc.getArray('messages')
yarray.observe(event => {
  console.log('Messages updated:', yarray.toArray())
})

Orchestration & Integration

  • Integrates with: state-management-expert, event-driven-architect, mcp-server-architect.

Trigger Conditions

Active whenever the user is building multiplayer features, live cursors, document co-editing, real-time chats, or working with WebSockets, Yjs, or WebRTC.


<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Deskripsi

Panduan ahli untuk mengimplementasikan fitur kolaborasi real-time dan multiplayer pada aplikasi web. Mencakup Conflict-free Replicated Data Types (CRDTs) seperti Yjs/Automerge, WebSockets, WebRTC, dan layanan terkelola seperti Liveblocks atau Pusher.

Instruksi

  • CRDT untuk State: Gunakan CRDT (misalnya yjs atau automerge) daripada Operational Transformation (OT) untuk menangani state terdistribusi dan pengeditan dokumen secara bersamaan dengan lancar.
  • Ketahanan Koneksi: Selalu terapkan logika penyambungan ulang otomatis dengan exponential backoff untuk WebSockets. Tangani offline state dengan baik dengan menyinkronkan perubahan lokal setelah tersambung kembali.
  • Presence & Awareness: Terapkan indikator kehadiran (siapa yang sedang online, posisi kursor) yang dipisahkan dari status dokumen inti untuk mengurangi overhead bandwidth dan penyimpanan.
  • Keamanan Real-time: Lakukan autentikasi dan otorisasi setiap koneksi WebSocket pada saat tersambung dan validasi semua pesan socket yang masuk untuk mencegah payload berbahaya.
  • Skalabilitas: Perhatikan batas penyiaran (broadcasting) pesan. Gunakan Redis Pub/Sub atau message broker serupa saat meningkatkan (scaling) server WebSocket di beberapa instans.

Checklist Implementasi

  • Pilih pustaka CRDT (Yjs/Automerge) dan provider yang sesuai (WebSockets, WebRTC, Liveblocks).
  • Inisialisasi state dokumen bersama dan ikat ke komponen UI frontend (misal: ProseMirror, Monaco).
  • Implementasikan presence (kesadaran) untuk menyiarkan posisi kursor dan daftar pengguna aktif.
  • Tangani state offline dengan melakukan buffer perubahan lokal dan sinkronisasi ulang saat terhubung kembali.

Contoh: Yjs dengan Provider WebSocket

import * as Y from 'yjs'
import { WebsocketProvider } from 'y-websocket'

// 1. Inisialisasi dokumen Yjs bersama
const ydoc = new Y.Doc()

// 2. Hubungkan ke ruangan WebSocket
const provider = new WebsocketProvider('ws://localhost:1234', 'nama-ruangan-saya', ydoc)

// 3. Berbagi state (misal: array pesan chat)
const yarray = ydoc.getArray('messages')
yarray.observe(event => {
  console.log('Pesan diperbarui:', yarray.toArray())
})

Integrasi Orkestrasi

  • Terintegrasi dengan: state-management-expert, event-driven-architect, mcp-server-architect.

Kondisi Pemicu

Aktif setiap kali pengguna sedang membangun fitur multiplayer, kursor langsung (live cursors), pengeditan dokumen bersama, obrolan real-time, atau bekerja dengan WebSockets, Yjs, atau WebRTC.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

roedyrustam의 스킬 모두 보기

이 스킬의 문제 신고