ue5-gameplay-state-ownership

ue5-gameplay-state-ownership is a skill for Claude Code, Codex from LichAmnesia/unreal-engine-agent-skills. It costs 120 tokens per session (1,400 once invoked), scanned A, original, MIT.

A guide for deciding where gameplay data should live in Unreal Engine 5, based on how long the data must survive and which systems need it.

In plain words
What is it for?
Use it to assign runtime state to a Pawn, Controller, PlayerState, GameState, GameMode, or engine subsystem before declaring variables.
Why use it?
It prevents data from disappearing when a player-controlled character is replaced, or from incorrectly surviving into a new round or level. Moving state later can require changing every system that reads it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to assign runtime state to a Pawn, Controller, PlayerState, GameState, GameMode, or engine subsystem before declaring variables.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership
Install

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.

Any agent
npx skills add LichAmnesia/unreal-engine-agent-skills --skill ue5-gameplay-state-ownership
Clone the repo
git clone --depth 1 https://github.com/LichAmnesia/unreal-engine-agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for ue5-gameplay-state-ownership

README.md
[![agentmods](https://agentmods.dev/badge/skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership/github.svg)](https://agentmods.dev/skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership)
Your own site
<a href="https://agentmods.dev/skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership"><img src="https://agentmods.dev/badge/skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership/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.

agentmods 80×15 button for ue5-gameplay-state-ownership

Your own site · 80×15
<a href="https://agentmods.dev/skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership"><img src="https://agentmods.dev/badge/skills/lichamnesia/unreal-engine-agent-skills/ue5-gameplay-state-ownership.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,400 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.01400
Opus 5 $0.00060 $0.00700
Sonnet 5 $0.00024 $0.00280
Haiku 4.5 $0.00012 $0.00140

Measured 12d ago against content hash cb3444c42dc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ue5-gameplay-state-ownership 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 12d 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.

skills/ue5-gameplay-state-ownership/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gameplay State Ownership

Almost every "where should this live?" question in UE5 has one correct answer, and it is determined by a single property: how long the state must survive.

The classes exist at different lifetimes. State placed in a class that dies sooner than the state needs is lost; state placed in a class that outlives it leaks into the next round and appears as a bug that only shows up on the second playthrough. Both are decided at the moment the variable is declared, and both are cheap then and expensive later — moving state is not a refactor of one field, it is a refactor of everything that reads it.

The default failure is putting things on the Pawn, because the Pawn is what you have a pointer to. A Pawn is one of the shortest-lived things in the project.

Assign by lifetime, before declaring the variable

  1. Ask how long the state must live, in these terms: shorter than one possession, one possession, the whole match, across level transitions, or across sessions. That answer selects the owner almost by itself. See references/lifetime-table.md.
  2. Ask who needs to read it. State that many unrelated systems read from a deep object graph is a sign the owner is too low in the hierarchy.
  3. Never place state on a Pawn that must survive the Pawn. Destruction, respawn, and possession changes all end a Pawn's life while the game continues.
  4. Distinguish "match rules" from "match state". The rules object and the shared state object are different, and putting observable state in the rules object is a common error with a delayed cost.
  5. Prefer a subsystem over a singleton or static. Subsystems have defined lifetimes and deterministic teardown; a static has neither, and gives you state that survives things it should not. See references/subsystems.md.
  6. Record the assignment in the project context file, with the lifetime that justified it. The lifetime is the reason; without it the table is unmaintainable.

Read the full file on GitHub · 108 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 12d ago First seen · 108 lines · 120 tokens per session scan A cb3444c42dc3

Subscribe to this mod's changes

ue5-gameplay-state-ownership is a skill published in the GitHub repository LichAmnesia/unreal-engine-agent-skills (5 stars, last pushed 28d ago), licensed MIT. It adds 120 tokens to every session and 1,400 once invoked, about $0.0006 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-31.

Related

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.

IvanMurzak/Unity-MCP · 49 tokens

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).

IvanMurzak/Unity-MCP · 59 tokens

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…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

motion

How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.

OpenDCAI/GameFactory-3A · 0 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

threejs-exposure-color-grading

Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.

scottstts/Threejs-Awesome-Graphics-Agent-Skills · 60 tokens