multiplayer-netcode

multiplayer-netcode is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 42 tokens per session (2,354 once invoked), scanned A, original, Apache-2.0.

A guide to building online multiplayer game networking. It explains how clients and servers exchange inputs and game state while handling delay and cheating risks.

In plain words
What is it for?
Implementing client prediction, server correction, rollback for action games, lag compensation, authoritative servers, bandwidth improvements, and anti-cheat measures.
Why use it?
It helps address problems such as lag, players seeing different game states, excessive network traffic, and clients sending untrusted data.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/medy-gribkov/arcana/multiplayer-netcode
Any agent
npx skills add medy-gribkov/arcana --skill multiplayer-netcode
Clone the repo
git clone --depth 1 https://github.com/medy-gribkov/arcana

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for multiplayer-netcode

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/multiplayer-netcode.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/multiplayer-netcode)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/multiplayer-netcode"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/multiplayer-netcode.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,354 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.02354
Opus 5 $0.00021 $0.01177
Sonnet 5 $0.00008 $0.00471
Haiku 4.5 $0.00004 $0.00235

Measured 3d ago against content hash b7556aae2944, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

multiplayer-netcode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/multiplayer-netcode/SKILL.md · 334 lines

How it starts

The opening of the file, as written. The whole thing — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a multiplayer systems engineer. Build authoritative server architectures with client-side prediction. Optimize for latency, bandwidth, and cheat resistance. Always provide production code.

When to Use

  • Implementing client prediction and server reconciliation
  • Building rollback netcode for fighting or action games
  • Designing server architecture for online games
  • Optimizing bandwidth or fixing rubber-banding
  • Adding anti-cheat to multiplayer systems

Architecture: Client-Server Authoritative

Client A                Server               Client B
  │                       │                     │
  ├─ Input ──────────────►│                     │
  ├─ Predict locally      │                     │
  │                       ├─ Validate           │
  │                       ├─ Simulate           │
  │◄── State snapshot ────┤──── State snapshot ─►│
  ├─ Reconcile            │                     ├─ Interpolate

BAD - Client authoritative (cheatable):

// Client sends position directly
void Update()
{
    transform.position += moveDir * speed * Time.deltaTime;
    SendToServer(transform.position); // Server trusts this
}

GOOD - Server authoritative with prediction:

// Client sends inputs, predicts locally, server validates
void Update()
{
    var input = new InputPayload
    {
        Tick = _currentTick,
        Movement = GetMovementInput(),
        Timestamp = NetworkTime.time
    };
    SendInputToServer(input);
    PredictLocally(input);  // Immediate response
    _inputHistory.Add(input);
    _currentTick++;
}

Client Prediction & Reconciliation

public class PredictionSystem
{
    private readonly CircularBuffer<PlayerState> _stateBuffer;
    private readonly CircularBuffer<InputPayload> _inputBuffer;
    private int _lastServerTick;

    public void OnServerState(PlayerState serverState)
    {
        _lastServerTick = serverState.Tick;
        PlayerState predicted = _stateBuffer.Get(serverState.Tick);

        // Compare server state with our prediction
        float error = Vector3.Distance(predicted.Position, serverState.Position);

        if (error > 0.01f)
        {
            // Prediction was wrong, reconcile
            Reconcile(serverState);
        }
    }

    private void Reconcile(PlayerState serverState)
    {
        // Reset to server state
        PlayerState current = serverState;

        // Re-simulate all inputs since server tick
        for (int tick = serverState.Tick + 1; tick <= _currentTick; tick++)
        {
            InputPayload input = _inputBuffer.Get(tick);
            current = Simulate(current, input);
            _stateBuffer.Set(tick, current);
        }

        ApplyState(current);
    }

    private PlayerState Simulate(PlayerState state, InputPayload input)
    {
        return new PlayerState
        {
            Tick = input.Tick,
            Position = state.Position + input.Movement * _moveSpeed * _tickRate,
            Velocity = input.Movement * _moveSpeed
        };
    }
}

Read the full file on GitHub · 334 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 334 lines · 42 tokens per session scan A b7556aae2944

Subscribe to this mod's changes

multiplayer-netcode is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 2,354 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.