Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

yjs-nextjs

БесплатноБез исполняемых скриптовНе проверен

Corrects the wrong defaults a capable model has when building Yjs collaborative editing into a Next.js 16 App Router app with tRPC v11 and shadcn/ui — pinned…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

Yjs in Next.js 16, tRPC, and shadcn/ui

Yjs 13.6.31 in an App Router codebase — the decisions collaborative editing forces and how to settle them, written so an agent applies them while writing or reviewing code. Each rule names the wrong default it corrects; there is no rule for things the model already gets right.

Most of these failures are silent. Yjs converges, the editor keeps working, and the data loss surfaces later as "my change reverted" — so the rules below lead with the evidence of the failure, most of it measured directly against Yjs 13.6.31 rather than asserted.

When to Apply

  • Building collaborative editing, presence, or offline sync into a Next.js 16 App Router app
  • Choosing shared types for a document model, or reviewing one that loses edits under concurrency
  • Deciding where the sync backend runs, or wiring tRPC procedures alongside a Yjs provider
  • Persisting Y.Doc state to a database, or compacting stored updates
  • Binding a Yjs document to React — provider lifecycle, subscriptions, Strict Mode, SSR
  • Wiring Tiptap or shadcn/ui form controls to a live document
  • Debugging a document that syncs but duplicates, blanks, or reverts content

This skill does not cover general Next.js App Router patterns (use the nextjs skill), general tRPC usage (trpc), or shadcn/ui component conventions (shadcn) — only where those intersect with a CRDT.

Version Pin

Rules target Yjs 13.6.31 with y-websocket 3.0.0, y-protocols 1.0.7, and y-indexeddb 9.0.12. Yjs is mid-migration to v14 under the @y/* scope, and several packages have already moved latest or main onto that prerelease track — @y/[email protected] depends on yjs@^14.0.0-7. See host-pin-the-yjs-13-track before installing anything.

Rule Categories

# Category Prefix Covers
1 Sync Topology & Dependencies host- Where the sync loop runs, which backend to build on, where the trust boundary sits, which versions are on the v13 track
2 Binary Transport & Persistence wire- Moving Uint8Array updates across JSON boundaries and into storage
3 Modeling State in Shared Types model- Which shared type per field — decides whether concurrent edits merge or destroy each other
4 Doc Lifecycle & React Binding react- One document across renders, Strict Mode, subscriptions, the server boundary
5 Undo, Snapshots & Offline Load hist- Origin-scoped history, garbage collection, load ordering
6 Awareness & Cursors pres- Ephemeral presence and positions that survive concurrent edits
7 Editor & Form Integration ui- Tiptap and shadcn/ui form controls against a live document

Quick Reference

1. Sync Topology & Dependencies

2. Binary Transport & Persistence

3. Modeling State in Shared Types

Полный SKILL.md на GitHub

Установить yjs-nextjs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdassets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/hist-scope-undo-by-origin.mdreferences/hist-snapshots-require-gc-disabled.mdreferences/hist-wait-for-indexeddb-sync.mdreferences/host-authorize-rooms-not-updates.mdreferences/host-pin-the-yjs-13-track.mdreferences/host-route-handlers-cannot-upgrade.mdreferences/host-trpc-is-not-the-sync-channel.mdreferences/host-vercel-lacks-instance-affinity.mdreferences/host-websocket-server-is-not-production.mdreferences/model-nested-types-not-plain-objects.mdreferences/model-seed-the-document-once.mdreferences/model-yarray-has-no-move.mdreferences/model-ytext-only-for-prose.mdreferences/pres-awareness-is-ephemeral.mdreferences/pres-relative-positions-for-cursors.mdreferences/react-keep-yjs-client-only.mdreferences/react-stable-doc-and-provider.mdreferences/react-subscribe-via-usesyncexternalstore.mdreferences/ui-do-not-drive-inputs-from-the-doc.mdreferences/ui-tiptap-collaboration-wiring.mdreferences/wire-base64-not-superjson.mdreferences/wire-compaction-needs-a-doc-roundtrip.mdreferences/wire-rehydrate-to-uint8array.mdreferences/wire-send-updates-not-state.md

FAQ

Что делает скилл yjs-nextjs?

Corrects the wrong defaults a capable model has when building Yjs collaborative editing into a Next.js 16 App Router app with tRPC v11 and shadcn/ui — pinned to Yjs 13.6.31. Covers the decisions whose failure mode is silence rather than an error — plain objects in a Y.Map discarding concurrent edits, updates that vanish because a JSON boundary turned a Uint8Array into a number array, undo that reverts a colleague's paragraph, initial content seeded once per client, and carets thrown to the end of a shadcn Input on every remote keystroke. Also covers where the sync loop can actually run, since route handlers cannot upgrade, Vercel Functions have no instance affinity, and tRPC subscriptions are one-way — plus which packages have already moved to the Yjs 14 prerelease track. Use when writing, reviewing, or debugging collaborative editing, presence, offline sync, or CRDT persistence in this stack.

Как установить скилл yjs-nextjs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл yjs-nextjs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить yjs-nextjs с