/skills-gamedev:unity-multiplayerfrom Game Dev Skills
Builds multiplayer games with Unity Netcode for GameObjects, Relay, Lobby, server authority, and lag compensation. Use when implementing Netcode for GameObjects or sync.
Ships in Game Dev Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Multiplayer game programming is an exercise in distributed systems operating under the constraints of physics and latency. You cannot trust the client; anything calculated on a player's machine—hit detection, movement speed, inventory transactions—will inevitably be hacked. High-performance Unity multiplayer requires a server-authoritative model with Netcode for GameObjects (NGO), Unity Relay & Lobby for NAT traversal, and client-side prediction with server reconciliation to mask network latency for players.
NetworkBehaviour & Ownership:
IsServer, IsClient, and IsOwner:
if (!IsOwner) return; // Only local player handles input
NetworkVariable<T>:
public NetworkVariable<int> Health = new(
100,
NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server // Never allow client writes!
);
NetworkVariable for persistent state (Health, Gold, Position).RPCs for transient one-off events (Sound effects, particle spawns).using Unity.Netcode;
using UnityEngine;
public class NetworkPlayerWeapon : NetworkBehaviour {
[SerializeField] private GameObject bulletPrefab;
[SerializeField] private Transform muzzleTransform;
private void Update() {
if (!IsOwner) return;
if (Input.GetButtonDown("Fire1")) {
// Request firing to the authoritative server
FireWeaponServerRpc(muzzleTransform.position, muzzleTransform.forward);
}
}
[ServerRpc]
private void FireWeaponServerRpc(Vector3 origin, Vector3 direction) {
// Server validation check
if (Vector3.Distance(origin, muzzleTransform.position) > 1.5f) {
Debug.LogWarning($"[Security] Player {OwnerClientId} origin spoofing detected!");
return;
}
// Spawn networked bullet
GameObject bullet = Instantiate(bulletPrefab, origin, Quaternion.LookRotation(direction));
bullet.GetComponent<NetworkObject>().Spawn();
// Notify all clients to play audio/vfx
PlayMuzzleFlashClientRpc();
}
[ClientRpc]
private void PlayMuzzleFlashClientRpc() {
// Play local visual muzzle flash and sound effect
}
}
NetworkVariable write permissions set strictly to Server.NetworkObject.Despawn() on disconnect.DealDamageServerRpc(targetId, 9999) without server-side weapon range, line-of-sight, or ammo validation.NetworkTransform ticks.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
skills-gamedev@skillary is listed by poorvith-mp/skillary — review the source before installing
npx claudepluginhub poorvith-mp/skillary --plugin skills-gamedev48 skills in this plugin
/anti-cheatEnforce server authority and defend against speed hacks, memory editing, and exploits. For networking setup, see unity-multiplayer. Use when defending games against exploits or hacks./blender-add-on-engineerMoved to modernized catalog in skillary. Removed in v4.1./blender-animationRig, skin and animate characters and props, and export clean animation sets to an engine. Use when rigging skeletons, weight painting, or keyframing animations./blender-modelingModel, retopologise, UV unwrap and bake game-ready assets with correct scale, pivots and polycount. Use when creating 3D hard-surface meshes, low-poly props, or UV layouts./blender-toolingBuild Blender Python add-ons, asset validators, exporters and pipeline automation. Use when writing Python scripts, add-ons, or batch tools for Blender./game-aiDesign NPC behaviour: behaviour trees, state machines, pathfinding, perception and difficulty tuning. Use when designing behavior trees, state machines, or enemy AI.