unity-review

unity-review is a command for Claude Code from XeldarAlz/everything-claude-unity. It costs 22 tokens per session (486 once invoked), scanned A, original, MIT.

A Unity-focused code review command for C# scripts in a Unity game project. It checks Unity serialization, performance, architecture, and common engine-specific mistakes.

In plain words
What is it for?
Use it to review selected files or recently changed Unity scripts. It checks issues such as missing event cleanup, uncached lookups, incorrect null checks, and editor-only code in runtime files.
Why use it?
It helps catch bugs that ordinary code reviews may miss, such as broken saved data after renaming a field or unsafe use of Unity objects. It also points out code that can cause unnecessary allocations or runtime problems.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the everything-claude-unity plugin — 42 skills, 27 commands, 20 agents, 5 hooks shipped together

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 commands/xeldaralz/everything-claude-unity/unity-review
Clone the repo
git clone --depth 1 https://github.com/XeldarAlz/everything-claude-unity

Made for: Claude Code.

Or install everything-claude-unity, the plugin that ships this one along with the rest of its 42 skills, 27 commands, 20 agents, 5 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-review.svg)](https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-review)
Your own site
<a href="https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-review"><img src="https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 486 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.1 $0.00022 $0.00486
Opus 5 $0.00011 $0.00243
Sonnet 5 $0.00004 $0.00097
Haiku 4.5 $0.00002 $0.00049

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

Security

Grade A, and why

unity-review 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 6d 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/commands/unity-review.md · 62 lines

What it actually says

/unity-review — Unity Code Review

Perform a comprehensive code review with Unity-specific checks.

Agent Routing

  • Default: use unity-reviewer agent (sonnet — efficient for standard reviews)
  • If $ARGUMENTS contains --thorough: use opus model for deeper architectural analysis
  • Strip the --thorough flag from arguments before passing to the agent

Scope

If the user specified a scope: review $ARGUMENTS If no scope: review recently changed files (git diff or all .cs files in Assets/Scripts/).

Workflow

Use the unity-reviewer agent to check:

1. Critical Issues (must fix)

  • [SerializeField] field renamed without [FormerlySerializedAs]
  • ?. or is null used on Unity objects (must use == null)
  • UnityEditor namespace in runtime code without #if UNITY_EDITOR
  • MonoBehaviour class name doesn't match file name
  • DOTween not killed in OnDestroy
  • Event subscriptions without matching unsubscribe
  • Naked async void methods

2. Performance Issues (should fix)

  • GC allocations in Update/FixedUpdate/LateUpdate
  • Uncached GetComponent, Camera.main, FindObjectOfType
  • LINQ in gameplay code
  • tag == instead of CompareTag
  • SendMessage / BroadcastMessage
  • Non-cached WaitForSeconds
  • Animator.StringToHash not cached as static readonly

3. Architecture Suggestions (consider)

  • MonoBehaviour inheritance deeper than 2 levels
  • God classes doing too many things
  • Tight coupling between systems
  • Public fields that should be [SerializeField] private
  • Missing [RequireComponent] attributes

4. Unity-Specific Warnings

  • Coroutine lifecycle issues
  • Cross-object execution order dependencies
  • Platform defines without fallback
  • Time.deltaTime in FixedUpdate

Output

Present findings grouped by severity with specific file:line references and suggested fixes. End with a summary: X critical, Y performance, Z suggestions.

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. 6d ago First seen · 62 lines · 22 tokens per session scan A 0d2157690d35

Subscribe to this mod's changes

unity-review is a command published in the GitHub repository XeldarAlz/everything-claude-unity (21 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 486 once invoked, about $0.0001 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.