peer-to-peer-multiplayer

peer-to-peer-multiplayer is a skill for Claude Code from SummerEngine/summer-engine-agent. It costs 88 tokens per session (3,901 once invoked), scanned A, original, MIT.

A network architecture for building a peer-to-peer multiplayer game with the host making authoritative decisions. Peer-to-peer means players connect directly rather than through a dedicated game server.

In plain words
What is it for?
Use it when starting a cooperative or other multiplayer game with host authority, player connections, state synchronization, prediction, and interpolation.
Why use it?
It establishes ownership, message routing, and responsive remote-player rendering before game logic makes the network harder to change.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Part of the summer plugin — 80 skills, 2 commands, 2 hooks, 1 MCP server shipped together

Good fit Use it when starting a cooperative or other multiplayer game with host authority, player connections, state synchronization, prediction, and interpolation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer
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.

Any agent
npx skills add SummerEngine/summer-engine-agent --skill peer-to-peer-multiplayer
Clone the repo
git clone --depth 1 https://github.com/SummerEngine/summer-engine-agent

Made for: Claude Code.

Or install summer, the plugin that ships this one along with the rest of its 80 skills, 2 commands, 2 hooks, 1 MCP server.

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 peer-to-peer-multiplayer

README.md
[![agentmods](https://agentmods.dev/badge/skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer/github.svg)](https://agentmods.dev/skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer)
Your own site
<a href="https://agentmods.dev/skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer"><img src="https://agentmods.dev/badge/skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for peer-to-peer-multiplayer

Your own site · 80×15
<a href="https://agentmods.dev/skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer"><img src="https://agentmods.dev/badge/skills/summerengine/summer-engine-agent/peer-to-peer-multiplayer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,901 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00088 $0.03901
Opus 5 $0.00044 $0.01951
Sonnet 5 $0.00018 $0.00780
Haiku 4.5 $0.00009 $0.00390

Measured 11d ago against content hash b9cebc940650, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

peer-to-peer-multiplayer 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 11d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/multiplayer-and-networking/peer-to-peer-multiplayer/SKILL.md · 374 lines

How it starts

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

/peer-to-peer-multiplayer — Build a P2P Game From the Ground Up

Overview

Multiplayer is architecture, not a feature. Bolting it onto a single-player game is 5× harder than starting multiplayer-first. This skill walks the four layers in order. Skip any of them and you'll spend the rest of development paying for it in cheat-vulnerable state, desync bugs, and "why is the other player teleporting" reports.

The four layers, top-down:

  1. NetworkManager — the autoload that owns peer IDs, connection lifecycle, message routing.
  2. Authoritative state — the decision matrix for which fields the host owns vs. which the client renders.
  3. Three routing patterns — host→client, client→host, client→client. Each has different rules.
  4. Real-time rendering — prediction + interpolation so the local player feels responsive while remote state catches up.

Build them in that order. Don't write a single piece of game logic until layers 1 + 2 exist.

Step 0 — Should it be P2P at all?

Ask the user before anything else:

Are players connecting through Steam friends / Epic friends / a private invite link, or do they need matchmaking at scale (1000s of concurrent matches)?

Answer Architecture
Friend-invite / small lobby (≤8 players) P2P with host authority. This skill.
Matchmaking + anti-cheat + scale Dedicated client-server. Different skill (/summer:client-server-multiplayer).
MMO / persistent world Custom server. Out of scope for this skill.

If P2P is right, continue. Otherwise, stop and route to the right skill.

Layer 1 — NetworkManager

A single autoload that owns the network. Nothing else in the game touches MultiplayerAPI directly.

May I create autoloads/network_manager.gd and register it as a Summer Engine autoload?

class_name NetworkManager
extends Node

# ── Signals (all game systems listen here, not to MultiplayerAPI directly) ──
signal connection_succeeded
signal connection_failed(reason: String)
signal peer_joined(peer_id: int)
signal peer_left(peer_id: int)
signal session_ended

const DEFAULT_PORT := 7777
const MAX_PEERS := 8

var is_host: bool = false
var local_peer_id: int = 0
var peers: Dictionary = {}  # peer_id -> { name, ready, ... }

func host(port: int = DEFAULT_PORT) -> Error:
    var peer := ENetMultiplayerPeer.new()
    var err := peer.create_server(port, MAX_PEERS)
    if err != OK:
        connection_failed.emit("create_server failed: %s" % error_string(err))
        return err
    multiplayer.multiplayer_peer = peer
    is_host = true
    local_peer_id = 1
    _wire_signals()
    connection_succeeded.emit()
    return OK

func join(address: String, port: int = DEFAULT_PORT) -> Error:
    var peer := ENetMultiplayerPeer.new()
    var err := peer.create_client(address, port)
    if err != OK:
        connection_failed.emit("create_client failed: %s" % error_string(err))
        return err
    multiplayer.multiplayer_peer = peer
    is_host = false
    _wire_signals()
    return OK

func leave() -> void:
    if multiplayer.multiplayer_peer:
        multiplayer.multiplayer_peer.close()
        multiplayer.multiplayer_peer = null
    is_host = false
    local_peer_id = 0
    peers.clear()
    session_ended.emit()

func _wire_signals() -> void:
    multiplayer.peer_connected.connect(_on_peer_connected)
    multiplayer.peer_disconnected.connect(_on_peer_disconnected)
    multiplayer.connected_to_server.connect(_on_connected_to_server)
    multiplayer.connection_failed.connect(_on_connection_failed)
    multiplayer.server_disconnected.connect(_on_server_disconnected)

func _on_peer_connected(id: int) -> void:
    peers[id] = { "name": "Player %d" % id, "ready": false }
    peer_joined.emit(id)

func _on_peer_disconnected(id: int) -> void:
    peers.erase(id)
    peer_left.emit(id)

func _on_connected_to_server() -> void:
    local_peer_id = multiplayer.get_unique_id()
    connection_succeeded.emit()

func _on_connection_failed() -> void:
    connection_failed.emit("connection refused or timed out")

func _on_server_disconnected() -> void:
    leave()

Read the full file on GitHub · 374 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. 11d ago First seen · 374 lines · 88 tokens per session scan A b9cebc940650

Subscribe to this mod's changes

peer-to-peer-multiplayer is a skill published in the GitHub repository SummerEngine/summer-engine-agent (59 stars, last pushed today), licensed MIT. It adds 88 tokens to every session and 3,901 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

self-evolve

Capture reusable patterns from a finished project and lift them into framework-level priors (contracts, modules, skeletons) that future projects inherit. Run only when the user explicitly requests self-evolution; the orchestrator executes the workflow.

tettethu/VibeGame · 50 tokens

artist-self-evolve

Distill stable art-generation patterns from a completed project, so future projects produce comparable assets without re-discovering the prompts. Lead-dispatched only — orchestrator invokes this skill from its self-evolve flow with a game-slug message; do not self-trigger.

tettethu/VibeGame · 62 tokens

vibegame-build

Run VibeGame's standard end-to-end game development workflow with reviewer gates. Use when the user wants to create a game from zero or evolve an existing game across multiple stages.

tettethu/VibeGame · 42 tokens

vibegame-start

Resume a VibeGame orchestrator session after vibegame start. Use at the beginning of a Claude or Codex session to inspect team runtime state, repair missing persistent members, load goal and GDD context, inspect tasks, and ask the user what to do next.

tettethu/VibeGame · 61 tokens

vibegame-edit

Iterate broadly on an existing game, on top of vibegame-build. Use when the user asks to change an existing game's art style, genre, or core rules. Not for local tuning such as numbers or game feel. Orchestrator only.

tettethu/VibeGame · 57 tokens

hearth-art

Give a Hearth game real art and sound — importing and slicing spritesheets, animations, procedural sprites and sounds, autonomous CC0 asset sourcing (Kenney, itch.io, OpenGameArt, Freesound, Google Fonts) with licensing rules, and pixel-art discipline (never stretch; read the art before using it). Use when the game…

echoo19/hearth · 89 tokens