game-anti-cheat
Covers how a developer defends their own online game against cheating: server-side input validation, withholding hidden state, lag-compensation limits…
от fcsouza★ 29 звёзд на GitHub
Установить game-anti-cheat в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Game anti-cheat
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.
Requires
game-backend-architecturefor server authority, the message schema and the action validation hookredis-game-patternsfor per-action rate limits
Threats and defences
| 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) |
Procedure
1. Validate every input on the server
Client checks are for feedback. The server repeats every check.
- Syntax. Validate each message against its schema before anything reads it (TypeBox in
game-backend-architecture). Use allowlists: known message types, known fields, bounded numbers and strings. - Size. Bun closes a WebSocket with code 1009 when a message exceeds
maxPayloadLength, which defaults to 16 MB. Set it near your largest valid message. This value is this skill's rule; measure your messages. - Order. Each input carries a sequence number. Drop any number that is not higher than the last one processed on that connection (
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. - Movement. Take a direction, not a position. Re-run the move on the server with the server's speed limit and the world bounds (
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). - Clock. Compute elapsed time from server timestamps. Unreal's movement component discards moves whose timestamp drifts too far from the server's and does most of its timing maths with the server's timestamps. Beyond that, this skill's rule: clamp the step each input claims, and charge it to a per-connection budget of simulated time that banks only a little idle time. A client that claims more input time than the server clock allows is running fast (
consumeInputTime). Move with the step the budget returned, never the raw claim. - Semantics. In
validateAction, check the value makes sense in the current state: cooldown ready, target in range and in line of sight, item owned, enough currency. - Rate. Cap messages per connection in memory (
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). - Record. Every rejection or flag goes to the detection log with the player id from the session, never from the message. One rejection is often lag; a stream of them is evidence.
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().
2. Send each client only what it may know
Compute what each player can perceive on the server and send
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- boilerplate/input-guards.ts
- references/sources.md
FAQ
Что делает скилл game-anti-cheat?
Covers how a developer defends their own online game against cheating: server-side input validation, withholding hidden state, lag-compensation limits, dupe-proof transfers, detection from server data and reports, and enforcement with delayed bans, appeals and refunds to victims. Use when a multiplayer game has speed hacks, wallhacks, aimbots, bots, item or currency dupes, real-money trading, boosting or win trading, or when planning how to detect and ban cheaters.
Как установить скилл game-anti-cheat?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл game-anti-cheat запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…