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.
npx skills add playcanvas/create-playcanvas --skill manage-game-stategit clone --depth 1 https://github.com/playcanvas/create-playcanvasWrote 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.
[](https://agentmods.dev/skills/playcanvas/create-playcanvas/manage-game-state)<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/manage-game-state"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/manage-game-state/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.
<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/manage-game-state"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/manage-game-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Memory Poisoning · line 34 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.00615 |
| Opus 5 | $0.00032 | $0.00308 |
| Sonnet 5 | $0.00013 | $0.00123 |
| Haiku 4.5 | $0.00006 | $0.00061 |
Grade A, and why
manage-game-state 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 10d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- manage-game-state — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Game state and loop
Model the game as a small explicit state machine with one owner of the clock. Every transition names its states; behaviour, input, and the interface read the current state rather than a scatter of booleans.
States and transitions
- Enumerate the states — for example ready, playing, paused, over — and make transitions explicit and total. Do not infer state from side effects.
- Gate the simulation on the active state: advance gameplay, timers, and physics only while playing.
Capture input and pause
- Request pointer lock from a user gesture such as a click, never on load. Treat loss of pointer lock and tab blur as a pause: freeze the simulation and the clock, and resume on the next gesture.
- Make
pointerlockchangeidempotent: whendocument.pointerLockElementis the canvas, transition ready or paused to playing and leave playing unchanged; only transition playing to paused when the element is no longer the canvas. Never implement it as a toggle. Browsers and automation can both report an already-acquired lock, and a duplicate enter event must not pause the game. - Clamp the per-frame delta before integrating anything, as
build-apprequires, so a backgrounded tab or a slow frame cannot inject one large step into movement, cooldowns, or the clock.
Reset
- A reset restores every owned system to its ready values — entities, camera, clock, timers, cooldowns, effects, and overlays — not only the player. Route reset through the same setup the initial state uses, so ready and reset cannot drift apart.
- Transition to
readyexplicitly before releasing pointer lock. Never derive the reset state fromdocument.pointerLockElement; pointer lock is an input side effect, not the state machine. - Define timer semantics once and keep them literal in state and snapshots. A field named
reloadis remaining cooldown time:0means ready, firing assigns a positive duration, and the active loop counts it down to exactly0. Do not expose a normalized readiness value under that name.
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.
- 10d ago First seen · 49 lines · 63 tokens per session scan A 029f50bf3294
manage-game-state is a skill published in the GitHub repository playcanvas/create-playcanvas (53 stars, last pushed today), licensed MIT. It adds 63 tokens to every session and 615 once invoked, about $0.0003 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.
Other skills, from other repositories
gameobject-component-destroy
Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.
unity-version-split
Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).
godot-signals-groups
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…
unity-addressables
Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).
motion
How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.
playtest-report
Generates a structured playtest report template or analyzes existing playtest notes into a structured format. Use this to standardize playtest feedback collection and analysis.