Token导航 LogoToken导航

Agent Skill · 待分类

multiplayer-sync(多人同步)

multiplayer-sync 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

multiplayer-sync 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在待分类类的 11,209 个 Skill 里排第 6,133。

总安装 485周安装 20GitHub Stars 13下载 158核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:multiplayer-sync(多人同步)
来源仓库:https://github.com/dcl-regenesislabs/opendcl
仓库路径:skills/multiplayer-sync
安装命令:
npx skills add https://github.com/dcl-regenesislabs/opendcl --skill multiplayer-sync
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dcl-regenesislabs/opendcl --skill multiplayer-sync

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在多团队协作场景中同步代码状态或追踪任务进展。可帮助合并变更、识别重复提交或生成同步报告。

安装命令:npx skills add https://github.com/dcl-regenesislabs/opendcl --skill multiplayer-sync。注意避免误操作,建议在沙箱或测试环境中验证后再应用于正式流程。

来源仓库内路径:skills/multiplayer-sync

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dcl-regenesislabs/opendcl --skill multiplayer-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

multiplayer-sync 怎么安装?

在终端执行 npx skills add https://github.com/dcl-regenesislabs/opendcl --skill multiplayer-sync。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

multiplayer-sync 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

multiplayer-sync 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

multiplayer-sync 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

multiplayer-sync 用的人多吗?

公开数据是累计安装 485 次,近一周安装 20 次,下载 158 次,GitHub 13 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

multiplayer-sync 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
multiplayer-sync

多人同步 · 本页

48513需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Multiplayer Synchronization in Decentraland

Decentraland scenes are inherently multiplayer. All players in the same scene share the same space. SDK7 uses CRDT-based synchronization.

Runtime constraint: Decentraland runs in a QuickJS sandbox. No Node.js APIs (fs, http, path, process). Use fetch() and WebSocket for network communication. See the scene-runtime skill for async patterns.

Sync Strategy Decision Tree

Choose the right networking approach based on what you need:

StrategyUse WhenPersistenceExample
syncEntityShared state that all players see and that persists for new arrivalsYes — state survives player join/leaveDoors, switches, scoreboards, elevators
MessageBusEphemeral events that only matter in the momentNo — late joiners miss past messagesChat messages, sound effects, particle triggers
fetch / REST APIReading or writing data to an external serverServer-dependentLeaderboards, inventory, external game state
signedFetchAuthenticated requests that prove player identityServer-dependentClaiming rewards, submitting verified scores
WebSocketReal-time bidirectional communication with a serverConnection-dependentLive game servers, real-time chat, authoritative multiplayer

Decision flow:

  1. Does every player need to see the same state, including late joiners? --> syncEntity
  2. Is it a fire-and-forget event only for players currently in the scene? --> MessageBus
  3. Do you need to talk to an external server? --> fetch or signedFetch
  4. Do you need continuous real-time server communication? --> WebSocket
  5. Combine approaches freely: use syncEntity for world state, MessageBus for effects, and fetch for persistence.

syncEntity Essentials

Import and Basic Usage

import { engine, Transform, MeshRenderer, Material } from '@dcl/sdk/ecs'
import { syncEntity } from '@dcl/sdk/network'
import { Vector3, Color4 } from '@dcl/sdk/math'

Signature: syncEntity(entity, componentIds[], syncId?)

  • entity — the entity to synchronize
  • componentIds[] — array of component IDs to keep in sync (e.g., [Transform.componentId])
  • syncId — unique numeric identifier (required for predefined entities, optional for player-spawned entities)

Enum Sync IDs (Predefined Entities)

Every predefined synced entity MUST have a unique numeric ID. Use an enum to avoid collisions:

enum SyncIds {
  DOOR = 1,
  ELEVATOR = 2,
  SCOREBOARD = 3
}

const door = engine.addEntity()
Transform.create(door, { position: Vector3.create(8, 1, 8) })
MeshRenderer.setBox(door)
syncEntity(door, [Transform.componentId, MeshRenderer.componentId], SyncIds.DOOR)

Predefined entities (with a sync ID) persist after the creating player leaves. Player-created entities (no sync ID) are removed when the player disconnects.

Auto-Generated IDs (Player-Spawned Entities)

Entities created at runtime by players do not need an explicit sync ID:

function createProjectile() {
  const projectile = engine.addEntity()
  Transform.create(projectile, { position: Vector3.create(4, 1, 4) })
  MeshRenderer.setSphere(projectile)
  syncEntity(projectile, [Transform.componentId])
  return projectile
}

Custom Synced Components

Define custom components and sync them between players:

import { engine, Schemas } from '@dcl/sdk/ecs'
import { syncEntity } from '@dcl/sdk/network'

const ScoreBoard = engine.defineComponent('scoreBoard', {
  score: Schemas.Int,
  playerName: Schemas.String,
  lastUpdated: Schemas.Int64
})

const board = engine.addEntity()
ScoreBoard.create(board, { score: 0, playerName: '', lastUpdated: 0 })
syncEntity(board, [ScoreBoard.componentId])

function addScore(points: number) {
  const data = ScoreBoard.getMutable(board)
  data.score += points
  data.lastUpdated = Date.now()
}

Player-Specific Data

Use PlayerIdentityData to distinguish players:

import { engine, PlayerIdentityData } from '@dcl/sdk/ecs'

engine.addSystem(() => {
  for (const [entity] of engine.getEntitiesWith(PlayerIdentityData)) {
    const data = PlayerIdentityData.get(entity)
    console.log('Player:', data.address, 'Guest:', data.isGuest)
  }
})

Schema Types

Available schema types for custom components:

TypeUsage
Schemas.Booleantrue/false
Schemas.IntInteger numbers
Schemas.FloatDecimal numbers
Schemas.StringText strings
Schemas.Int64Large integers (timestamps)
Schemas.Vector33D coordinates
Schemas.QuaternionRotations
Schemas.Color3RGB colors
Schemas.Color4RGBA colors
Schemas.EntityEntity reference
Schemas.Array(innerType)Array of values
Schemas.Map(valueType)Key-value maps
Schemas.Optional(innerType)Nullable values
Schemas.Enum(enumType)Enum values

Parent-Child Sync Relationships

For synced entities with parent-child relationships, use parentEntity() instead of setting Transform.parent:

import { syncEntity, parentEntity, getParent, getChildren, removeParent } from '@dcl/sdk/network'

const parent = engine.addEntity()
const child = engine.addEntity()

syncEntity(parent, [Transform.componentId], 1)
syncEntity(child, [Transform.componentId], 2)

// Use parentEntity() — NOT Transform.parent
parentEntity(child, parent)

const parentRef = getParent(child)
const childrenArray = Array.from(getChildren(parent))

// Remove parent relationship
removeParent(child)

Connection State

Check if the player is connected to the sync room:

import { isStateSyncronized } from '@dcl/sdk/network'

engine.addSystem(() => {
  if (!isStateSyncronized()) return // wait for sync
  // safe to read/write synced state
})

Note: The function is spelled isStateSyncronized (not "Synchronized") in the SDK.


MessageBus

Send custom messages between players (fire-and-forget, no persistence):

import { MessageBus } from '@dcl/sdk/message-bus'

const bus = new MessageBus()

bus.on('hit', (data: { damage: number }) => {
  console.log('Took damage:', data.damage)
})

bus.emit('hit', { damage: 10 })

syncEntity vs MessageBus

  • syncEntity: state is persistent, late joiners get current state, automatic conflict resolution
  • MessageBus: fire-and-forget, late joiners miss past messages, good for transient effects
  • Combine both: use syncEntity for the door open/closed state, MessageBus for the sound effect when it opens

REST API Calls (fetch)

All network calls must run inside executeTask because the SDK runtime does not support top-level await.

import { executeTask } from '@dcl/sdk/ecs'

executeTask(async () => {
  try {
    const response = await fetch('https://api.example.com/data')
    if (!response.ok) {
      console.error('HTTP error:', response.status)
      return
    }
    const data = await response.json()
    console.log('Response:', data)
  } catch (error) {
    console.error('Network error:', error)
  }
})

Signed Fetch (Authenticated Requests)

signedFetch attaches a cryptographic signature proving the player's identity:

import { signedFetch } from '~system/SignedFetch'

executeTask(async () => {
  try {
    const response = await signedFetch({
      url: 'https://example.com/api/action',
      init: {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ action: 'claimReward', amount: 100 })
      }
    })
    if (!response.ok) {
      console.error('HTTP error:', response.status)
      return
    }
    const result = JSON.parse(response.body)
    console.log('Result:', result)
  } catch (error) {
    console.log('Request failed:', error)
  }
})

WebSocket Connections

For full WebSocket patterns (reconnection, heartbeat, message format), see {baseDir}/references/networking-patterns.md.

Basic Connection

executeTask(async () => {
  const ws = new WebSocket('wss://example.com/ws')

  ws.onopen = () => {
    console.log('Connected to WebSocket')
    ws.send(JSON.stringify({ type: 'join', playerId: 'player123' }))
  }

  ws.onmessage = (event) => {
    const msg = JSON.parse(event.data)
    switch (msg.type) {
      case 'gameState': handleGameState(msg); break
      case 'playerJoin': handlePlayerJoin(msg); break
      case 'playerLeave': handlePlayerLeave(msg); break
    }
  }

  ws.onerror = (error) => console.error('WebSocket error:', error)
  ws.onclose = () => console.log('Disconnected')
})

Player Enter/Leave Events

Detect players entering or leaving the scene:

import { onEnterScene, onLeaveScene } from '@dcl/sdk/src/players'

onEnterScene((player) => {
  console.log('Player entered:', player.userId)
})
onLeaveScene((userId) => {
  console.log('Player left:', userId)
})

Multiplayer Testing

Open multiple browser windows to test multiplayer locally. Each window is a separate player.

Offline Mode

For Decentraland Worlds that do not need multiplayer:

{
  "worldConfiguration": {
    "fixedAdapter": "offline:offline"
  }
}

Troubleshooting

ProblemCauseSolution
State not syncing between playersMissing syncEntity() callEvery entity you want shared must call syncEntity(entity, [ComponentId1, ComponentId2])
Sync ID collisionTwo entities share the same numeric sync IDUse an enum to assign unique IDs to every predefined synced entity
Entity disappears when creator leavesNo sync ID providedAdd a sync ID (third argument) to syncEntity() for entities that should persist
Date.now() values corruptedUsing Schemas.Number for timestampsUse Schemas.Int64 for any number over 13 digits (like Date.now())
State not ready on joinReading synced state before sync completesGuard with if (!isStateSyncronized()) return in your system
MessageBus messages lostLate joiner expecting past messagesMessageBus is fire-and-forget. Use syncEntity for persistent state
Need server-side validation or anti-cheat? See the authoritative-server skill for the headless server pattern.

Important Notes

  • Entities must be explicitly synced via syncEntity(entity, [componentIds]) — pass the componentId of each component to sync
  • CRDT resolution: If two players change the same component simultaneously, last-write-wins
  • No server-side code: Decentraland scenes run entirely client-side with CRDT sync
  • Entity limits apply: Each synced entity counts toward the scene's entity budget
  • Custom schemas must be deterministic: Same component name = same schema across all clients
  • Use Schemas.Int64 for timestamps: Schemas.Number corrupts large numbers (13+ digits). Always use Schemas.Int64 for values like Date.now()
  • For server-authoritative multiplayer with validation and anti-cheat, see the authoritative-server skill

平台分布

Codex

40.22%
按下载量换算64

Claude

30.22%
按下载量换算48

Cursor

17.96%
按下载量换算28

Gemini CLI

9.31%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills