Yjs Best Practices
Use this skill when implementing or debugging Yjs features. It helps with Yjs import issues, subdocuments, `YKeyValue`, `Y.Map`, and experimental V2 encoding.
Install
npx skills add liveblocks/skills --skill yjs-best-practicesgit clone --depth 1 https://github.com/liveblocks/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/yjs-best-practices ~/.claude/skills/yjs-best-practicesPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Yjs best practices
## When to use this skill
Use this skill when implementing or debugging [Yjs](https://yjs.dev) features.
## Avoid importing Yjs twice
One of the most common issues when working with Yjs is accidentally importing it
twice in your application. This often happens when mixing CommonJS (CJS) and
ECMAScript Modules (ESM), or when certain bundlers bundle more than one version
of Yjs.
When Yjs is imported twice, the two instances don't share the same class
references, which can lead to synchronization issues and unexpected behavior.
You'll see a Yjs warning in the Console if this happens.
### Fixing duplicate Yjs imports
If you find duplicate Yjs imports, you can:
1. **Use package manager resolution**: Configure your package manager to resolve
Yjs to a single version:
```json
// package.json (npm/yarn)
{
"resolutions": {
"yjs": "^13.6.0"
}
}
```
```json
// package.json (pnpm)
{
"pnpm": {
"overrides": {
"yjs": "^13.6.0"
}
}
}
```
2. **Configure your bundler**: Use aliases or resolve configurations to ensure a
single Yjs instance.
## Avoid subdocuments when possible
It's generally better to avoid subdocuments unless you have a specific use case
that requires them. They are only necessary when:
- You have multiple _very large_ Yjs documents in the same room
- You need to lazy-load documents individually
For most use cases, including **multiple text editors on the same page**,Details
- Skill name
yjs-best-practices- Repository
- liveblocks/skills
- Path
skills/yjs-best-practices/SKILL.md- License
- Apache-2.0
- Repo updated
- 8 September 2026
FAQ
What does the Yjs Best Practices skill do?
Use this skill when implementing or debugging Yjs features. It helps with Yjs import issues, subdocuments, `YKeyValue`, `Y.Map`, and experimental V2 encoding.
How do I install the Yjs Best Practices skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add liveblocks/skills --skill yjs-best-practices. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Yjs Best Practices popular?
It lives in liveblocks/skills, which has 9 GitHub stars and 2 forks.
Related skills
Liveblocks Best Practices
9liveblocks/skills
Use this skill when building, debugging, or answering questions about Liveblocks. Liveblocks gives you the building blocks and infrastructure to enable people and AI to work together inside your app, powering realtime collaboration.
Zemax Python Connect
9Hao-xl/zemax-python-connect
当用户提到 Zemax OpticStudio Python 连接、ZOS-API 配置、独立应用程序、交互扩展、CreateNewApplication、ConnectAsExtension、ZOSAPI_NetHelper.dll、NotAuthorized、PrimarySystem None、Instance Number,或在连接 Python 与 Zemax 时遇到 --replace-current 时使用。
Wechat Miniprogram Skill
9Gourdbaby/wechat-miniprogram-skill
Expert guidelines for Native WeChat Mini Program development focusing on performance, code size, and native compatibility. Use when developing WeChat Mini Programs in native JavaScript.
Cc Claude Codex
9leyuan0602-glitch/cc-claude-codex
Development skill where Claude Code acts as supervisor and Codex acts as executor. Auto-trigger for implementation, debugging, refactoring, testing, and other dev tasks.
Drupal Coding Standards
9ronaldtebrake/drupal-coding-standards-skill
Review code according to Drupal's official coding standards. Provides AI agents with comprehensive guidelines for PHP, JavaScript, CSS, Twig, YAML, SQL, and markup files in Drupal projects. Uses dynamic context discovery to load only relevant standards based on file type being reviewed.
Code Acceptance
9leyuan0602-glitch/cc-claude-codex
Independent code acceptance skill. Use when verifying completed work before committing, merging, or claiming done. Performs test-based verification only: unit tests, E2E tests, and integration tests. Only cares whether outcomes match expectations, not code implementation. Works standalone or as cc-claude-codex Phase 3.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.