Defends multiplayer games against cheating: server-side validation, hidden state, lag-compensation limits, dupe-proof transfers, detection from server data, and enforcement with delayed bans and appeals.
Ships in game-dev. 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.
This skill is defensive. It names each cheat class only as far as you need to pick the countermeasure.
Everything here assumes the server is the authority: the client sends what it wants to do, the server decides what happens. A design where clients report results or each hold the full world state cannot be fixed by the steps below.
game-backend-architecture for server authority, the message schema and the action validation hookredis-game-patterns for per-action rate limits| Threat | What the defender needs to know | Defence |
|---|---|---|
| Movement (speed, teleport, wall clipping) | The client claims a position or runs its clock fast | Never accept a position. Re-simulate each input from a direction at the server's speed, on the server's clock; charge input time against wall time (step 1) |
| Aim (aimbot, triggerbot) | Each input is a legal input; only the pattern over many is not | The server decides every hit (step 3). Detect from server-side statistics, confirm by human review (Detect) |
| Information exposure (wallhack, map hack, revealed cards) | Anything sent to the client is readable | Send each client only what it may know (step 2). Never ship hidden data "for the UI later" |
| Tampering (memory edits, forged packets) | The user controls the client and the network | Schema-validate every message; validate its meaning against server state (step 1). Client hardening only raises cost |
| Replay and duplication | The same request sent twice, or two requests racing | Rising sequence numbers per connection (step 1); idempotent, locked transactions for anything of value (step 4) |
| Botting | Scripted input from automation or a headless browser | Server-side behaviour statistics; client signals as weak features only; isolate flagged accounts (Detect, Enforce) |
| Economy abuse and real-money trading | Value farmed or moved between accounts | Append-only transfer ledger, graph tracing from one report, reversal of illicit transfers (step 4, Enforce) |
| Boosting and collusion (account sharing, win trading) | Accounts change hands or queue together to fix results | Policy in the terms; review of account and queue patterns; rank and reward reversion (Detect, Enforce) |
Client checks are for feedback. The server repeats every check.
game-backend-architecture). Use allowlists: known message types, known fields, bounded numbers and strings.maxPayloadLength, which defaults to 16 MB. Set it near your largest valid message. This value is this skill's rule; measure your messages.acceptSequence). This stops a naive replay of captured inputs (this skill's rule). Sequence numbers must not wrap: send an unbounded integer, never a counter that rolls over.simulateMove). If the client predicts, compare its reported end position with yours: the server's result wins, a small error needs no correction, a large one gets a correction, and a jump past a teleport distance also raises a flag (checkClaimedPosition; the flag is this skill's rule).consumeInputTime). Move with the step the budget returned, never the raw claim.validateAction, check the value makes sense in the current state: cooldown ready, target in range and in line of sight, item owned, enough currency.takeMessage): one socket lives on one instance, so a Redis round trip per message is waste (this skill's rule). Cap costly actions per player in Redis (redis-game-patterns, pattern 3).Copy boilerplate/input-guards.ts for steps 3, 4, 5 and 7. Its limits are placeholders, not sourced numbers. Pass the server's time from a monotonic clock (performance.now()), not Date.now().
Compute what each player can perceive on the server and send nothing else. VALORANT withholds an opponent behind a wall until they could become visible. To avoid pop-in it sends a little early, by growing each actor's bounds by its velocity times a look-ahead longer than expected ping, and it treats "maybe visible" as visible.
game-state-sync (step 8). The grid is a range filter only. For secrecy, follow it with a visibility test: line of sight, room or zone, fog of war, team.The server decides every hit. With lag compensation the server keeps past world states, rewinds targets to where the shooter saw them, and tests the hit there. The cost is that a target can be hit just after reaching cover.
RollbackBuffer (game-state-sync).clampClaimedTime, which requires that value). Clamping per connection, and using round-trip rather than one-way time because the server can measure it from ping and pong, is this skill's rule.Dupes come from two requests racing or one request applied twice (this skill's rule).
game-backend-architecture ("What lives where"): lock both players rows with SELECT ... FOR UPDATE in id order, then change inventory and currencies.spendCurrency and record each applied operation in processed_events in the same transaction (postgres-game-schema). A repeated operation id then fails on the primary key instead of paying twice.40P01 (deadlock) as game-backend-architecture does. If you choose Serializable isolation instead, also retry on 40001 and treat nothing read as valid until the transaction commits.game-economy-design, step 10).Detection runs on data the server already has. The client cannot fake what it never computes.
gameplay-analytics.betterauth-integration: the admin plugin's banned, banReason, banExpires; the session check runs once, so use the kick fan-out for open sockets). Rank and reward reversion. A restricted matchmaking pool: Riot pushed levelling bots into a queue where their low rating matched them against each other (in matchmaking-system, a separate pool key per trust tier). Browsers expose no stable hardware id, so plan account-level enforcement only (this skill's rule).This section is this skill's rule; no source opened states it for browsers. The player controls the JavaScript engine, DevTools, extensions and the network. Everything in the bundle or in a received message can be read, and anything sent can be forged. Minifying or obfuscating the bundle raises the cost of reading it and protects nothing. Every rule lives on the server.
Client signals still worth logging, as weak features beside server data:
navigator.webdriver, which is true when automation controls the browser.isTrusted === false; script-dispatched events and HTMLElement.click() set it to false.The client can spoof each of these, so none is ban evidence alone. Send them as a game message; the server tracks them with the session's player id through gameplay-analytics. Read the privacy section before shipping any of them.
maxPayloadLength at the 16 MB default.boilerplate/input-guards.ts: copy when wiring server-side input checks: sequence check, movement re-simulation with speed and teleport tolerance, simulated-time budget with a capped idle bank, claimed-timestamp clamp, per-connection message budget. Pure functions with no imports; the limits are placeholders to tune.references/sources.md: read when you need the page behind a rule here.game-state-sync for the area-of-interest grid, sequence numbers and RollbackBuffergame-backend-architecture for the trade transaction and the kick fan-outredis-game-patterns for per-action rate limitsmatchmaking-system for separate pools per trust tiergameplay-analytics for the detection event pipelinegame-economy-design for faucets, sinks and exploit reviewbetterauth-integration for ban fields, moderator roles and session revocationmmo-design for griefing and anti-social playWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/game-dev:game-anti-cheatfrom game-dev
npx claudepluginhub fcsouza/agent-skills --plugin game-dev39 skills in this plugin
/betterauth-integrationCovers the game-specific layer of Better Auth: player, moderator and admin roles, session checks on game routes and WebSocket handshakes, and keeping the auth session apart from the game session. Use when a game needs player login, moderator or admin powers, or authenticated real-time connections, and the project uses Better Auth./bullmq-game-queuesBackground job design for game backends on BullMQ and Redis: one queue per game domain, idempotent reward fulfilment, and cron schedulers for daily rewards and season ends. Use when a game needs matchmaking requests, reward grants, match results, notifications or analytics processed off the request path, or recurring and timed jobs such as daily login rewards, leaderboard snapshots and season rollovers./Other plugins' skills for the same job