Borrowing it
Nothing to install: this file belongs to vchelaru/XnaFiddle. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vchelaru/XnaFiddle/main/.claude/skills/game-lifecycle/SKILL.mdgit clone --depth 1 https://github.com/vchelaru/XnaFiddleWrote 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/vchelaru/xnafiddle/game-lifecycle)<a href="https://agentmods.dev/skills/vchelaru/xnafiddle/game-lifecycle"><img src="https://agentmods.dev/badge/skills/vchelaru/xnafiddle/game-lifecycle.svg" alt="Measured on agentmods" height="20"></a>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.00084 | $0.06664 |
| Opus 5 | $0.00042 | $0.03332 |
| Sonnet 5 | $0.00017 | $0.01333 |
| Haiku 4.5 | $0.00008 | $0.00666 |
Grade A, and why
game-lifecycle 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Game Lifecycle
The Run flow (Index.razor.cs -> DoCompileAndRun)
CompileAndRun() sets _pendingCompile; TickDotNet() (driven by JS requestAnimationFrame) picks it up and calls DoCompileAndRun(), so compilation runs in the rAF context rather than the Blazor sync context — this avoids a Monitor deadlock on the single WASM thread. Order inside DoCompileAndRun:
- Get C# source from Monaco;
CompilationService.CompileAsync(Roslyn) -> IL bytes. Assembly.Load(result.ILBytes);FindGameTypelocates theGamesubclass.CompileRegisteredShadersAsync()— compiles any.fxtabs to.mgfxvia ShadowDusk. No-ops (and never downloads the ~17 MB DXC wasm) when no shader tabs exist. Thisawaitis outside the synchronous swap window below, on purpose.- Drop the old game:
_game = null(NOTDispose()— see below), thenLibraryRegistry.RunAllCleanups(). GraphicsAdapter.UseReferenceDevice = true(the leak fix — see below), thenActivator.CreateInstance(gameType), thennewGame.Run()which creates the GraphicsDevice + WebGL context.
The window between _game = null and _game = newGame is deliberately await-free. WASM is single-threaded, so the only interleaving points are await boundaries; with none in that window, TickDotNet() cannot run mid-swap and its if (_game == null) return; guard is sufficient (no locking needed). The one await Task.Delay(1) before Run() only flushes the "Loading game..." status to the DOM.
Each Run rebuilds the whole game
A fresh Game/GraphicsDevice is created every Run. The old game is dropped without Dispose() on purpose: disposing the old GraphicsDevice invalidates textures that the Gum UI library caches in static fields, breaking Gum on the next run. GC reclaims the old game eventually — acceptable in a fiddle.
LibraryRegistry.RunAllCleanups() (XnaFiddle.Core/LibraryRegistry.cs) calls CleanUp() on every plugin to reset static state between runs. Notably GameWindowPlugin (XnaFiddle.Core/Plugins/GameWindowPlugin.cs) reflectively clears KNI's static BlazorGameWindow._instances dictionary (the type lives in the browser-only KNI assembly, so it is resolved by name, not a compile-time reference).
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.
- 2d ago First seen · 150 lines · 84 tokens per session scan A 98d562d08064
game-lifecycle is a skill published in the GitHub repository vchelaru/XnaFiddle (13 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 6,664 once invoked, about $0.0004 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-09-04.
Other skills, from other repositories
minecraft-debug-mcp
Operate and debug the live Minecraft bot through its built-in MCP REPL server. Use when work requires starting the bot with pnpm dev, connecting to the local MCP endpoint, inspecting cognitive state/logs/history, injecting synthetic chat/events, or running targeted REPL code against the running brain during…
graphics-api-hooking
Guide for graphics API interception, overlay rendering, and render-pipeline analysis across DirectX, OpenGL, and Vulkan. Use this skill when working with Present or SwapBuffers hooks, DXGI swap chains, shader or draw-call interception, screenshot-sensitive overlays, or graphics debugging in game security research.
console-get-logs
Retrieve Unity Editor logs from the MCP plugin's LogCollector, optionally filtered by log type or time window. Useful for debugging and monitoring Editor activity.
editor-application-get-state
Return the current state of UnityEditor.EditorApplication — playmode, paused state, compilation state, and related flags.
console-clear-logs
Clear the MCP log cache (used by 'console-get-logs') and the Unity Editor Console window. Useful for isolating logs to a specific action by clearing the slate first.
profiler-start
Enable Unity's runtime profiler and open the Profiler window. Idempotent: calling when already enabled returns the current enabled state without error.