Agent skill

Cloudflare Do Turn Based Multiplayer

by swyxio in swyxio/skills

Design, implement, debug, or verify a remote turn-based multiplayer game whose rooms run on Cloudflare Durable Objects.

MITAuto-check passedBackend & APIs

Install Cloudflare Do Turn Based Multiplayer

skills CLI
$ npx skills add swyxio/skills --skill cloudflare-do-turn-based-multiplayer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swyxio/skills cloudflare-do-turn-based-multiplayer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cloudflare-do-turn-based-multiplayer .claude/skills/cloudflare-do-turn-based-multiplayer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cloudflare-do-turn-based-multiplayer
GitHub stars
175
Token cost
~1.1k tokens
SKILL.md length
489 words
Files
4 (incl. references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Design, implement, debug, or verify a remote turn-based multiplayer game whose rooms run on Cloudflare Durable Objects.

  • Works in 6 steps: enter one room mutation gate; → re-read state and re-authorize the… → check immutable actionId duplication… → …
  • Room and invite identity
  • SKILL.md covers Establish authority, Serialize mutations, Keep acknowledgement and… and Durable Object and WebSocket…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cloudflare Do Turn Based Multiplayer is an agent skill from swyxio/skills. Design, implement, debug, or verify a remote turn-based multiplayer game whose rooms run on Cloudflare Durable Objects. Use for room and invite identity, reconnectable seats, WebSocket hibernation, concurrent turns, action idempotency, revision conflicts, or cross-browser game-state agreement. Do not trigger for generic Durable Object applications or local-only games.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `agents/openai.yaml`, `references/failure-modes-and-verification.md` and `references/protocol-and-architecture.md`).

It sits in Backend & APIs, covering Realtime and WebSockets. It works with Cloudflare and Cloudflare Durable Objects. The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • Room and invite identity
  • Reconnectable seats
  • WebSocket hibernation
  • Concurrent turns

Example prompts

  • “/cloudflare-do-turn-based-multiplayer”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. enter one room mutation gate;
  2. re-read state and re-authorize the device inside it;
  3. check immutable actionId duplication before checking expectedRevision;
  4. validate the fresh revision and deterministic game rule;
  5. persist the accepted state before acknowledgement or broadcast; and
  6. return the canonical snapshot for acceptance, duplication, or rejection.

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cloudflare Do Turn Based Multiplayer loads about 1.1k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 489 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 489 words, ~1,055 tokens.

Download SKILL.mdSave it as .claude/skills/cloudflare-do-turn-based-multiplayer/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
cloudflare-do-turn-based-multiplayer
description
Design, implement, debug, or verify a remote turn-based multiplayer game whose rooms run on Cloudflare Durable Objects. Use for room and invite identity, reconnectable seats, WebSocket hibernation, concurrent turns, action idempotency, revision conflicts, or cross-browser game-state agreement. Do not trigger for generic Durable Object applications or local-only games.

Cloudflare DO Turn-Based Multiplayer

Model each room as one server-authoritative state machine. Keep the deterministic game reducer independent from Cloudflare transport so rules and concurrency can be tested without Wrangler.

Establish authority

Before editing, identify:

  • the room's deterministic Durable Object ID;
  • the public room code and any private invite credential;
  • how a device resumes and which seats it owns;
  • the persisted room revision and action identity; and
  • how clients recover after an unknown result.

The URL room code is the room selector, not authentication. Store resume credentials per room, exchange private invites for device credentials, and remove invite secrets from the visible URL after exchange. Re-authorize the device against current room state on every mutation.

Read protocol-and-architecture.md when changing URLs, identity, message schemas, persistence, or recovery.

Serialize mutations

Durable Objects serialize events, but handlers can interleave at external await boundaries. For every authoritative action:

  1. enter one room mutation gate;
  2. re-read state and re-authorize the device inside it;
  3. check immutable actionId duplication before checking expectedRevision;
  4. validate the fresh revision and deterministic game rule;
  5. persist the accepted state before acknowledgement or broadcast; and
  6. return the canonical snapshot for acceptance, duplication, or rejection.

A duplicate action returns the prior accepted result without applying side effects again. A stale or illegal action returns its actionId, reason, and canonical snapshot. The client proposes an action; it never submits trusted scores, turn order, or board outcomes.

Keep acknowledgement and recovery explicit

Correlate every syntactically valid mutation with its actionId. Apply snapshots monotonically by revision. Keep a rejected local draft available for repair. After an acknowledgement timeout, treat the result as unknown: reconnect, load the canonical snapshot, and retry only with the same action identity when the protocol permits it.

One in-flight action per client is the simple default. More optimistic behavior requires an explicit conflict and rebase design.

Show full SKILL.md (181 more words)Show less

Durable Object and WebSocket boundaries

  • Use the Hibernation WebSocket API for idle server connections when appropriate.
  • Store only stable identifiers in WebSocket attachments; persistent room state belongs in Durable Object storage.
  • Derive presence from live sockets rather than treating it as game authority.
  • Version and normalize stored room state, then validate cross-field invariants.
  • Put alarm-driven bot or timeout transitions through the same mutation path.
  • Bound message sizes, text, activity rate, and retained action IDs.
  • Parse explicit inbound and outbound protocol allowlists.
  • Hash long-lived device credentials and return room/join/resume responses with Cache-Control: no-store.

Exercise the actual Worker entrypoint and Durable Object binding; a frontend-only development server is not a multiplayer test.

Verify the failure cases that matter

At minimum, cover wrong-room credential isolation, private-invite exchange, invalid resume recovery, same-revision concurrent actions, duplicate delivery, disconnect/resume, and two isolated browsers completing turns with identical room state. Add four-player or full-round playthroughs only when supported by the game being changed.

Read failure-modes-and-verification.md for reported lobby/start failures or a release-readiness review. Report exactly which layer passed: pure protocol, local Worker/DO, isolated-browser playthrough, or deployed custom-domain behavior.

© swyxio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in cloudflare-do-turn-based-multiplayer of swyxio/skills.

  • SKILL.md
  • agents/openai.yaml
  • references/failure-modes-and-verification.md
  • references/protocol-and-architecture.md

Open the folder on GitHubat commit 038ef34

Compare with similar skills

Cloudflare Do Turn Based Multiplayer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cloudflare Do Turn Based Multiplayer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloudflare Do Turn Based Multiplayer this skillswyxio/skills175—~1.1kAutomated safety check: PassMIT
Durable Objectshodgef/apiker1274 repos~1.5kAutomated safety check: PassMIT
Cloudflare WorkersEpicenterHQ/epicenter4.8k—~576Automated safety check: PassCustom licence
Durable Objectscloudflare/skills3k2 repos~1.5kAutomated safety check: PassApache-2.0
Nitro Server Toolkitantfu/skills5.9k—~948Automated safety check: PassMIT
Apikerhodgef/apiker127—~1.4kAutomated safety check: PassMIT

Similar skills

  • Durable Objects

    hodgef/apiker

    Create and review Cloudflare Durable Objects. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 4 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Cloudflare Workers

    EpicenterHQ/epicenter

    Cloudflare Workers patterns for Worker runtime APIs, Durable Objects, KV, R2, D1, Queues, WebSockets, streaming responses, bindings, wrangler configuration, and deployment limits.

    4.8k GitHub stars~576 tokensUpdated today
    Backend & APIsAuto-check passed
  • Durable Objects

    cloudflare/skills

    Official

    Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

    3k GitHub starsUsed in 2 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Reference for Nitro v3, the server toolkit behind Nuxt: file routing, route rules, caching, storage, tasks, websockets and deployment presets.

    5.9k GitHub stars~948 tokensUpdated 8 days ago
    Backend & APIsAuto-check passed
  • Apiker

    hodgef/apiker

    Develop, review, and extend the Apiker library — a framework for building serverless REST APIs on Cloudflare Workers + Durable Objects.

    127 GitHub stars~1.4k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Agents SDK

    hodgef/apiker

    Build AI agents on Cloudflare Workers using the Agents SDK. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 3 repos~3k tokens
    Backend & APIsAuto-check passed

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    175 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    175 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    175 GitHub stars~4.3k tokensUpdated 3 days ago
    Auto-check passed
  • Youtube API

    swyxio/skills

    Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

    175 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    175 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    175 GitHub stars~1.8k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Cloudflare Do Turn Based Multiplayer

What does Cloudflare Do Turn Based Multiplayer do?

Design, implement, debug, or verify a remote turn-based multiplayer game whose rooms run on Cloudflare Durable Objects. Cloudflare Do Turn Based Multiplayer is an agent skill from swyxio/skills. Design, implement, debug, or verify a remote turn-based multiplayer game whose rooms run on Cloudflare Durable Objects.

When should I use Cloudflare Do Turn Based Multiplayer?

Cloudflare Do Turn Based Multiplayer fits situations like: room and invite identity; reconnectable seats; webSocket hibernation; concurrent turns.

How do I install Cloudflare Do Turn Based Multiplayer in Claude Code?

Run `npx skills add swyxio/skills --skill cloudflare-do-turn-based-multiplayer -a claude-code`. Or copy the skill folder (cloudflare-do-turn-based-multiplayer in swyxio/skills) into .claude/skills/cloudflare-do-turn-based-multiplayer in your project. Claude Code loads it when a task matches its description.

How do I install Cloudflare Do Turn Based Multiplayer in Codex?

Run `npx skills add swyxio/skills --skill cloudflare-do-turn-based-multiplayer -a codex`. Or copy the skill folder (cloudflare-do-turn-based-multiplayer in swyxio/skills) into .agents/skills/cloudflare-do-turn-based-multiplayer in your project. Codex loads it when a task matches its description.

Can I use Cloudflare Do Turn Based Multiplayer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swyxio/skills --skill cloudflare-do-turn-based-multiplayer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloudflare-do-turn-based-multiplayer, .gemini/skills/cloudflare-do-turn-based-multiplayer, .github/skills/cloudflare-do-turn-based-multiplayer and .opencode/skills/cloudflare-do-turn-based-multiplayer in your project.

What does Cloudflare Do Turn Based Multiplayer need to run?

SKILL.md names no scripts, command-line tools or credentials: Cloudflare Do Turn Based Multiplayer is instructions for the agent only.

Does Cloudflare Do Turn Based Multiplayer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cloudflare Do Turn Based Multiplayer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cloudflare Do Turn Based Multiplayer use?

Cloudflare Do Turn Based Multiplayer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cloudflare Do Turn Based Multiplayer use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.8k tokens, read only when the agent opens those files.

What are the alternatives to Cloudflare Do Turn Based Multiplayer?

Skills that share tags, products or a category with Cloudflare Do Turn Based Multiplayer: Durable Objects (hodgef/apiker, 127 stars), Cloudflare Workers (EpicenterHQ/epicenter, 4.8k stars), Durable Objects (cloudflare/skills, 3k stars) and Nitro Server Toolkit (antfu/skills, 5.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloudflare Do Turn Based Multiplayer?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 175 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

Source: swyxio/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.