unity

A guide for compiling, testing, and controlling Unity projects and C# packages in this repository. Unity is a tool for building games and interactive 3D applications.

In plain words
What is it for?
Use it for C# compilation, test suites, IL2CPP builds, play-mode work, rendering snapshots, screenshots, and Unity scene or asset edits.
Why use it?
It explains which repository driver to use for batch checks and which Unity Editor route to use for play mode, screenshots, and scene changes.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/reactunity/core/unity
Any agent
npx skills add ReactUnity/core --skill unity
Clone the repo
git clone --depth 1 https://github.com/ReactUnity/core

Made for: Claude Code, Codex.

Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00108 $0.05123
Opus 5 $0.00054 $0.02561
Sonnet 5 $0.00022 $0.01025
Haiku 4.5 $0.00011 $0.00512

Measured 2d ago against content hash e5ea586b544c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

.claude/skills/unity/SKILL.md · 198 lines

How it starts

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

Driving Unity from here

Two ways in, and they are two different tools. Pick by whether an Editor is already open on the project.

pnpm unity <cmd> (batch mode) unity <cmd> (open Editor)
Is this repo's driver, scripts/unity/ Unity's own CLI, installed on this machine
Needs the project not open in an Editor the project open, with com.unity.pipeline (both have it)
Speed ~8 s compile, ~70 s EditMode suite 200–600 ms per command, no recompile, no domain reload
Use for compile, the suites, IL2CPP players — anything scriptable, and the only CI-faithful results an Editor the user already has open, play mode, screenshots, scene and asset edits

The second one is not mainly a speed win — it is how you work without closing someone's Editor, and the only way to reach play mode and screenshots. See Unity's own CLI for what it can do and where it must not be used.

This repo used to carry its own version of that: an AgentBridge loopback server plus a pnpm unity bridge client. Both are gone — the Pipeline package does all of it and more. A pnpm unity bridge … invocation found anywhere is stale; the table below says what it became.

The two refuse to fight each other: batch mode checks the project lock first and points at the other tool.

The loop for a C# change

pnpm unity compile tests

8 seconds warm, and it reports file(line,col): CSxxxx: message for every error. Run this after every C# edit under unity/** — it is far cheaper than the test suite and catches the majority of mistakes. Nothing else in this repo type-checks C#; pnpm typecheck is TypeScript only.

Then the suites:

pnpm unity test tests

EditMode then PlayMode (two Unity invocations — -testPlatform All is a game-ci concept that Unity rejects with exit code 4). Narrow it while iterating:

pnpm unity test tests --platform EditMode --filter ReactUnity.Tests.StyleTests

Read the full file on GitHub · 198 lines

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. 2d ago First seen · 198 lines · 108 tokens per session scan A e5ea586b544c

Subscribe to this mod's changes

unity is a skill published in the GitHub repository ReactUnity/core (893 stars, last pushed 5d ago), licensed MIT. It adds 108 tokens to every session and 5,123 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

uloop-execute-dynamic-code

Execute C# with Unity APIs when existing uloop tools cannot inspect or edit enough. Use for reachable scene/component state, scene/prefab/menu automation, and PlayMode checks.

hatayama/unity-cli-loop · 43 tokens

uloop-simulate-mouse-input

Simulate Mouse.current input in PlayMode through Unity Input System. Use for gameplay mouse clicks, long-press (LongPress), movement delta (MoveDelta/SmoothDelta), or scroll. Use --dry-run to check what a Game View coordinate hits in 3D physics before clicking (works in EditMode; no Input System required). Use…

hatayama/unity-cli-loop · 113 tokens

uloop-pause-point

Pauses Unity playback at any source file:line without editing code or recompiling, and returns a snapshot of the locals, parameters, and instance fields at that exact frame. Use for bug investigation, PlayMode/E2E verification, checking variable values at a specific frame, or confirming that a code path executed.

hatayama/unity-cli-loop · 69 tokens

uloop-screenshot

Capture Unity Editor windows or Game View rendering as PNG. Use for visual checks, debugging, documentation, or annotated UI element coordinates.

hatayama/unity-cli-loop · 31 tokens

uloop-simulate-keyboard

Simulate keyboard input in PlayMode through Unity Input System. Use for key presses, holds (via Press --duration or KeyDown/KeyUp), releases, and game controls such as WASD or Space. Requires the Input System package (com.unity.inputsystem).

hatayama/unity-cli-loop · 62 tokens

uloop-simulate-mouse-ui

Simulate PlayMode EventSystem UI mouse actions using screen coordinates. Use for UI clicks, long-presses, or drags from annotated screenshots.

hatayama/unity-cli-loop · 39 tokens