/netcode
Set up Netcode for GameObjects (NGO 2.x) multiplayer. 搭建 Netcode for GameObjects(NGO 2.x)多人联机。
$ npx -y skills add Besty0728/Unity-Skills --skill netcode --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/netcode
Context preview
The summary Claude sees to decide when to auto-load this skill.
Set up Netcode for GameObjects (NGO 2.x) multiplayer. 搭建 Netcode for GameObjects(NGO 2.x)多人联机。
SKILL.md
netcode.SKILL.mdname: unity-netcode
description: Set up Netcode for GameObjects (NGO 2.x) multiplayer. 搭建 Netcode for GameObjects(NGO 2.x)多人联机。
Triggers
- Scaffolding multiplayer
- Registering network prefabs
- Wiring spawn logic
- Starting host/server/client
- 搭建多人联机、注册网络预制体、连接生成逻辑、启动 host/server/client
Unity Netcode for GameObjects Skills
Automation for Netcode for GameObjects (NGO) multiplayer setup and operations. Every skill is source-verified against NGO 2.x; when the package is absent, each skill returns a `NoNetcode()` error with install instructions. A subset of skills additionally require NGO **2.5.0+** (see [NGO 2.5+ features](#ngo-25-features)) — on an older 2.x install they return a structured "requires 2.5.0+" error instead of a compile error, since AttachableBehaviour/AttachableNode/ComponentController are detected by reflection, not by a dedicated version symbol.
> **Requires**: `com.unity.netcode.gameobjects` (2.x), Unity 6000.0+. > **Strongly recommended**: before calling any `netcode_*` skill, load [netcode-design](../netcode-design/SKILL.md). NGO lifecycle and permission rules are strict; skills alone cannot prevent incorrect business code.
Guardrails
**Operating Mode** (v1.9 three-tier):
- **Approval** (default): query/list/info skills (`netcode_check_setup`, `netcode_get_manager_info`, `netcode_get_transport_info`, `netcode_list_network_objects`, `netcode_get_network_object_info`, `netcode_list_network_prefabs`, `netcode_list_network_behaviours`, `netcode_get_spawn_manager_info`, `netcode_get_scene_manager_info`, `netcode_get_status`, `netcode_version`, `netcode_attachable_info`) run directly. Mutators (create/configure/attach/add) are FullAuto — on `MODE_RESTRICTED`, run the grant protocol.
- **Auto** / **Bypass**: SemiAuto and FullAuto run directly.
- Auto-forbidden in this module:
- `SkillOperation.Delete` → `netcode_remove_manager`, `netcode_remove_network_object`, `netcode_remove_from_prefabs_list`
- `MayTriggerReload = true` → `netcode_add_network_behaviour_script` (writes a new `.cs`, forces script compile + Domain Reload)
- `MayEnterPlayMode = true` → `netcode_start_host`, `netcode_start_server`, `netcode_start_client`, `netcode_shutdown`
These are reachable only under Bypass mode or via a user-managed Allowlist entry; the grant flow returns `MODE_FORBIDDEN`. Runtime control + Behaviour-script generation are the practical reason this module is gated.
- When `com.unity.netcode.gameobjects` is missing, every skill returns a `NoNetcode()` error with install instructions.
**DO NOT** (common hallucinations):
- `netcode_spawn_object` / `netcode_spawn_player` — do not exist. Spawn must happen in runtime code (NetworkBehaviour) via `.Spawn()` or `NetworkManager.SpawnManager.InstantiateAndSpawn`. Skills do not proxy Spawn because Spawn requires a running NetworkManager.
- `netcode_register_scene` — does not exist. Scene registration goes through Build Settings + `EnableSceneManagement`. This module only exposes `netcode_configure_scene_management` for reading/writing the config.
- `netcode_set_tick_rate` / `netcode_set_protocol` as standalone skills — do not exist. Use `netcode_configure_manager` for all NetworkConfig edits.
- Do not assume `netcode_start_host` works in Edit Mode. All Runtime control skills require PlayMode.
- Do not assume `netcode_add_to_prefabs_list` automatically attaches a `NetworkObject` component. Call `netcode_add_network_object` first.
**Routing**:
- Plain GameObject hierarchy creation → `gameobject`
- Attach NetworkObject / NetworkTransform / other networking components → this module
- Generic player-prefab components (Rigidbody / Collider / Animator) → `component`
- Runtime scene switching (LoadScene) → call `NetworkManager.SceneManager.LoadScene` from the generated NetworkBehaviour; this module does not execute it
- Code-level design decisions (RPC direction, NetworkVariable permission) → [netcode-design](../netcode-design/SKILL.md) advisory
Object Targeting
`netcode_add_*` / `netcode_configure_*` skills use the usual target parameters:
- `name` — scene object name
- `instanceId` — Unity InstanceID (exact)
- `path` — hierarchy path `Parent/Child`
Prefer `instanceId` when there is a chance of duplicate names.
Skills
Setup & Validation
| Skill | Purpose | Key Parameters | |-------|---------|----------------| | `netcode_check_setup` | Verify package, NetworkManager, Transport, PlayerPrefab, and PrefabsList consistency | `verbose?` | | `netcode_create_manager` | Create NetworkManager + UnityTransport | `name?` | | `netcode_configure_manager` | Bulk-edit NetworkConfig (TickRate, ConnectionApproval, EnableSceneManagement, NetworkTopology, ...) | `name?`, 15+ optional fields | | `netcode_get_manager_info` | Read NetworkConfig + runtime state | `name?` | | `netcode_remove_manager` | Delete the NetworkManager (must already be Shutdown) | `name?` |
Transport
| Skill | Purpose | Key Parameters | |-------|---------|----------------| | `netcode_set_transport_address` | Direct connection: set Address / Port / ServerListenAddress | `address`, `port`, `serverListenAddress?` | | `netcode_set_relay_server_data` | Relay mode (mutually exclusive with direct connection) | `address`, `port`, `allocationIdBase64`, `keyBase64`, `connectionDataBase64`, `hostConnectionDataBase64?`, `isSecure?` | | `netcode_set_debug_simulator` | Simulate latency / jitter / packet loss (development only) | `packetDelay`, `packetJitter`, `dropRate` | | `netcode_get_transport_info` | Read current transport info | `name?` |
NetworkObject
| Skill | Purpose | Key Parameters | |-------|---------|----------------| | `netcode_add_network_object` | Attach NetworkObject to a GameObject | `name/instanceId/path` + NetworkObject fields | | `netcode_configure_network_object` | Modify fields on an existing NetworkObject | same as above | | `netcode_remove_network_object` | Remove a NetworkObject (must not be currently spawned) | same as above | | `netco
Read more
name: unity-netcode description: Set up Netcode for GameObjects (NGO 2.x) multiplayer. 搭建 Netcode for GameObjects(NGO 2.x)多人联机。
Triggers
- Scaffolding multiplayer
- Registering network prefabs
- Wiring spawn logic
- Starting host/server/client
- 搭建多人联机、注册网络预制体、连接生成逻辑、启动 host/server/client
Unity Netcode for GameObjects Skills
Automation for Netcode for GameObjects (NGO) multiplayer setup and operations. Every skill is source-verified against NGO 2.x; when the package is absent, each skill returns a `NoNetcode()` error with install instructions. A subset of skills additionally require NGO **2.5.0+** (see [NGO 2.5+ features](#ngo-25-features)) — on an older 2.x install they return a structured "requires 2.5.0+" error instead of a compile error, since AttachableBehaviour/AttachableNode/ComponentController are detected by reflection, not by a dedicated version symbol.
> **Requires**: `com.unity.netcode.gameobjects` (2.x), Unity 6000.0+. > **Strongly recommended**: before calling any `netcode_*` skill, load [netcode-design](../netcode-design/SKILL.md). NGO lifecycle and permission rules are strict; skills alone cannot prevent incorrect business code.
Guardrails
**Operating Mode** (v1.9 three-tier):
- **Approval** (default): query/list/info skills (`netcode_check_setup`, `netcode_get_manager_info`, `netcode_get_transport_info`, `netcode_list_network_objects`, `netcode_get_network_object_info`, `netcode_list_network_prefabs`, `netcode_list_network_behaviours`, `netcode_get_spawn_manager_info`, `netcode_get_scene_manager_info`, `netcode_get_status`, `netcode_version`, `netcode_attachable_info`) run directly. Mutators (create/configure/attach/add) are FullAuto — on `MODE_RESTRICTED`, run the grant protocol.
- **Auto** / **Bypass**: SemiAuto and FullAuto run directly.
- Auto-forbidden in this module:
- `SkillOperation.Delete` → `netcode_remove_manager`, `netcode_remove_network_object`, `netcode_remove_from_prefabs_list`
- `MayTriggerReload = true` → `netcode_add_network_behaviour_script` (writes a new `.cs`, forces script compile + Domain Reload)
- `MayEnterPlayMode = true` → `netcode_start_host`, `netcode_start_server`, `netcode_start_client`, `netcode_shutdown`
These are reachable only under Bypass mode or via a user-managed Allowlist entry; the grant flow returns `MODE_FORBIDDEN`. Runtime control + Behaviour-script generation are the practical reason this module is gated.
- When `com.unity.netcode.gameobjects` is missing, every skill returns a `NoNetcode()` error with install instructions.
**DO NOT** (common hallucinations):
- `netcode_spawn_object` / `netcode_spawn_player` — do not exist. Spawn must happen in runtime code (NetworkBehaviour) via `.Spawn()` or `NetworkManager.SpawnManager.InstantiateAndSpawn`. Skills do not proxy Spawn because Spawn requires a running NetworkManager.
- `netcode_register_scene` — does not exist. Scene registration goes through Build Settings + `EnableSceneManagement`. This module only exposes `netcode_configure_scene_management` for reading/writing the config.
- `netcode_set_tick_rate` / `netcode_set_protocol` as standalone skills — do not exist. Use `netcode_configure_manager` for all NetworkConfig edits.
- Do not assume `netcode_start_host` works in Edit Mode. All Runtime control skills require PlayMode.
- Do not assume `netcode_add_to_prefabs_list` automatically attaches a `NetworkObject` component. Call `netcode_add_network_object` first.
**Routing**:
- Plain GameObject hierarchy creation → `gameobject`
- Attach NetworkObject / NetworkTransform / other networking components → this module
- Generic player-prefab components (Rigidbody / Collider / Animator) → `component`
- Runtime scene switching (LoadScene) → call `NetworkManager.SceneManager.LoadScene` from the generated NetworkBehaviour; this module does not execute it
- Code-level design decisions (RPC direction, NetworkVariable permission) → [netcode-design](../netcode-design/SKILL.md) advisory
Object Targeting
`netcode_add_*` / `netcode_configure_*` skills use the usual target parameters:
- `name` — scene object name
- `instanceId` — Unity InstanceID (exact)
- `path` — hierarchy path `Parent/Child`
Prefer `instanceId` when there is a chance of duplicate names.
Skills
Setup & Validation
| Skill | Purpose | Key Parameters | |-------|---------|----------------| | `netcode_check_setup` | Verify package, NetworkManager, Transport, PlayerPrefab, and PrefabsList consistency | `verbose?` | | `netcode_create_manager` | Create NetworkManager + UnityTransport | `name?` | | `netcode_configure_manager` | Bulk-edit NetworkConfig (TickRate, ConnectionApproval, EnableSceneManagement, NetworkTopology, ...) | `name?`, 15+ optional fields | | `netcode_get_manager_info` | Read NetworkConfig + runtime state | `name?` | | `netcode_remove_manager` | Delete the NetworkManager (must already be Shutdown) | `name?` |
Transport
| Skill | Purpose | Key Parameters | |-------|---------|----------------| | `netcode_set_transport_address` | Direct connection: set Address / Port / ServerListenAddress | `address`, `port`, `serverListenAddress?` | | `netcode_set_relay_server_data` | Relay mode (mutually exclusive with direct connection) | `address`, `port`, `allocationIdBase64`, `keyBase64`, `connectionDataBase64`, `hostConnectionDataBase64?`, `isSecure?` | | `netcode_set_debug_simulator` | Simulate latency / jitter / packet loss (development only) | `packetDelay`, `packetJitter`, `dropRate` | | `netcode_get_transport_info` | Read current transport info | `name?` |
NetworkObject
| Skill | Purpose | Key Parameters | |-------|---------|----------------| | `netcode_add_network_object` | Attach NetworkObject to a GameObject | `name/instanceId/path` + NetworkObject fields | | `netcode_configure_network_object` | Modify fields on an existing NetworkObject | same as above | | `netcode_remove_network_object` | Remove a NetworkObject (must not be currently spawned) | same as above | | `netco
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Other skills on unity-skills.
- /addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1. 为 Unity Addressables 1.22.3/2.9.1 提供源码锚定的设计规则。
Open skill - /adr
Record Unity architecture decisions (ADR) with rationale. 记录 Unity 架构决策(ADR)与理由。
Open skill - /animator
Edit Unity Animator Controllers and drive runtime parameters. 编辑 Unity Animator Controller 并驱动运行时参数。
Open skill - /architecture
Advise on Unity gameplay and system architecture. 为 Unity 游戏与系统架构提供建议。
Open skill - /asmdef
Advise on Unity assembly definitions (asmdef). 为 Unity 程序集定义(asmdef)提供建议。
Open skill - /asset
Manage Unity AssetDatabase operations. 管理 Unity AssetDatabase 操作。
Open skill

