coherence-retrofit

Adds coherence multiplayer to existing single-player Unity games using proxy patterns.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/cmitchellVFS/Scrabble --skill coherence-retrofit-cmitchellvfs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coherence-retrofit
Source: https://github.com/cmitchellVFS/Scrabble/tree/main/.claude/skills/coherence-retrofit
Command: npx skills add https://github.com/cmitchellVFS/Scrabble --skill coherence-retrofit-cmitchellvfs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding multiplayer to a finished single-player Unity game usually means either forking the codebase or scattering authority checks through every gameplay file. This Skill provides structural patterns that keep gameplay code network-unaware while solo and multiplayer modes share one codebase. ## Core Features & Use Cases - Two-level proxy pattern: Wraps each networked entity in a coherence-aware proxy holding [Sync] properties and [Command] methods, so gameplay classes never reference networking. - Static-mode predicates: Provides IsSinglePlayerOrHost, IsOnlineClient, and IsOnlineHost helpers for the rare host-only branching (spawning, economy mutations). - Save isolation and passthrough sync: Keeps multiplayer sessions from overwriting solo saves, and syncs gameplay fields via get/set passthrough properties so remote replicas see authority state without gameplay changes. - Use Case: You have a working single-player Unity game and want co-op multiplayer. Apply the proxy pattern to networked entities, gate host-only logic with the static predicates, and route saves through session-aware slots — without rewriting gameplay code. ## Quick Start Use the coherence-retrofit skill to add multiplayer to my single-player Unity game while keeping solo mode working from the same codebase.

Frequently Asked Questions about coherence-retrofit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add multiplayer to an existing single-player Unity game?▼

Wrap each networked entity in a proxy component holding [Sync] properties and [Command] methods, leaving gameplay classes unchanged. Use static predicates like IsSinglePlayerOrHost to gate the few host-only operations such as spawning and economy mutations.

How do I keep solo and multiplayer modes in one Unity codebase?▼

Use a delegation pattern where gameplay code stays network-naive and a thin proxy layer decides whether to run locally or forward to the authority. Solo mode works because a null proxy falls back to local authority, so no forking is needed.

Should I put [Sync] fields directly on Unity gameplay classes?▼

No. Putting [Sync] fields on gameplay classes couples them to coherence permanently. Instead, create a separate proxy component whose [Sync] property is a get/set passthrough to the gameplay field, so deleting the proxy leaves gameplay fully functional.

Why does my synced state not update on remote clients in coherence?▼

This happens when remote replicas read a local-only gameplay field that only the authority's update loop maintains. Fix it by syncing the gameplay field itself through a passthrough proxy rather than relying on animator parameters or authority-side state machines.

How do I stop multiplayer sessions from overwriting solo save files?▼

Route saves through a session-aware slot selector: online clients write received host state to a temporary session file that is discarded afterward, while the solo save path is never touched by multiplayer sessions.

When should I use [Command] instead of [Sync] in coherence?▼

Use [Command] for one-shot events like sounds, damage spikes, and effects, and [Sync] for persistent state like health or entity state enums. Sending commands for continuous state bloats bandwidth, while polling a getter for events can miss same-frame occurrences.