Curated agent skills for Unity multiplayer game development targeting mobile and WebGL2 browsers. Covers Colyseus, Nakama, WebSocket networking, state synchronization, and cross-platform optimization.
Part of the Agent Skills ecosystem — works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and 20+ other coding agents.
See also: unity-shader-agent-skills — companion skills for Unity shader development targeting mobile GPUs and WebGL browsers.
unity-multiplayer-agent-skills/
├── SKILL.md # Core skill — architecture decisions, quick-start patterns
├── CLAUDE.md # Claude Code auto-loaded context
├── skill.json # Machine-readable registry metadata
├── package.json # npm distribution metadata
├── .github/
│ └── copilot-instructions.md # VS Code Copilot / GPT-style agent instructions
├── references/
│ ├── colyseus-integration.md # Colyseus server + Unity SDK deep dive
│ ├── nakama-integration.md # Nakama server + Unity SDK deep dive
│ ├── websocket-networking.md # WebSocket libraries, cross-platform patterns
│ ├── architecture-patterns.md # State sync, prediction, interpolation, topologies
│ ├── webgl2-constraints.md # Platform limitations and workarounds
│ ├── performance-optimization.md # Network, memory, serialization, mobile battery
│ └── deployment-guides.md # Docker, Nginx, scaling, cloud hosting
├── assets/
│ ├── colyseus-room-template.ts # Server-side Colyseus room boilerplate
│ ├── nakama-match-handler-template.ts # Server-side Nakama match handler boilerplate
│ ├── unity-colyseus-manager.cs # Unity client manager for Colyseus
│ ├── unity-nakama-manager.cs # Unity client manager for Nakama
│ └── unity-websocket-client.cs # Standalone WebSocket client with reconnection
├── scripts/
│ └── scaffold-project.sh # Scaffolds a new Colyseus or Nakama project
└── LICENSE
Project-scoped (committed with your repo, shared with team):
npx skills add adevra/unity-multiplayer-agent-skillsUser-scoped (available across all your projects):
npx skills add adevra/unity-multiplayer-agent-skills -gAutomatically detects your installed coding agents (Claude Code, Cursor, Copilot, Codex, Gemini CLI, OpenCode, Roo Code, and 40+ others) and installs the skill to all of them.
# Install to specific agents only
npx skills add adevra/unity-multiplayer-agent-skills -a claude-code -a cursor
# List available skills before installing
npx skills add adevra/unity-multiplayer-agent-skills --listRead skill.json for machine-readable metadata including triggers, capabilities, file index, context requirements, and per-agent install instructions.
The skill activates when your prompt involves:
- Building multiplayer games in Unity (C#) for mobile or WebGL2
- Integrating Colyseus or Nakama as a game server
- WebSocket networking in Unity (especially cross-platform mobile + WebGL)
- Client-server architecture patterns for real-time games
- State synchronization, client-side prediction, lag compensation
- Deploying multiplayer game servers (Docker, cloud)
- Network optimization for mobile or browser constraints
| Topic | Reference file | What you get |
|---|---|---|
| Architecture | architecture-patterns.md |
Client-server topologies, state sync strategies, genre-specific patterns, ECS networking |
| Colyseus | colyseus-integration.md |
Room lifecycle, Schema serialization, Unity SDK API, matchmaking, code examples |
| Nakama | nakama-integration.md |
Auth, multiplayer modes, matchmaking, leaderboards, storage, Unity SDK API |
| WebSocket | websocket-networking.md |
Library comparison (NativeWebSocket, Best WebSockets, unity-websocket), reconnection patterns |
| WebGL2 | webgl2-constraints.md |
No sockets, no threads, WSS requirement, memory limits, conditional compilation |
| Performance | performance-optimization.md |
Delta compression, quantization, MessagePack, object pooling, mobile battery, GC pressure |
| Deployment | deployment-guides.md |
Docker, Nginx WebSocket proxy, Redis scaling, Colyseus Cloud, Heroic Cloud |
- Colyseus vs Nakama — Colyseus for automatic state sync + simpler API; Nakama for full backend (auth, storage, leaderboards, social)
- WebSocket library choice — NativeWebSocket (free, Colyseus-bundled), Best WebSockets (commercial, feature-rich), unity-websocket (ergonomic MonoBehaviour API)
- Serialization format — MessagePack for C# (best general choice), MemoryPack (fastest for float-heavy), FlatBuffers (zero-copy reads)
- Architecture pattern — Prediction + rollback for action games, snapshot + interpolation for MMO, lockstep for RTS
Research compiled from official documentation, GitHub repositories, and technical articles:
- Unity Multiplayer Docs
- Colyseus Documentation
- Nakama Documentation
- Unity WebGL Networking
- Netcode for GameObjects — Latency Patterns
- Netcode for Entities — Prediction
- NativeWebSocket
- Mirror Networking
- MessagePack for C#
Apache-2.0