unity-fix

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

A command for investigating and fixing Unity bugs from the Unity console and project code. It checks common causes such as missing references, broken scripts, coroutine issues, physics setup, and build errors.

In plain words
What is it for?
Use it to inspect console errors and stack traces, find related code, apply a minimal correction, and verify the result through Unity's tools.
Why use it?
It provides an evidence-based path from an error message to a targeted fix and then checks whether the problem is resolved. The quick option is intended for obvious issues.

Command for Claude Code

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-fix
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-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-fix.svg)](https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-fix)
Your own site
<a href="https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-fix"><img src="https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 400 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.00028 $0.00400
Opus 5 $0.00014 $0.00200
Sonnet 5 $0.00006 $0.00080
Haiku 4.5 $0.00003 $0.00040

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

Security

Grade A, and why

unity-fix 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 5d 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-fix.md · 43 lines

What it actually says

/unity-fix — Diagnose and Fix a Bug

Fix the issue described by the user: $ARGUMENTS

Agent Routing

  • Default: use unity-fixer agent (opus — deep investigation)
  • If $ARGUMENTS contains --quick: use unity-fixer-lite agent (sonnet — for obvious fixes)
  • Strip the --quick flag from arguments before passing to the agent

Workflow

Use the selected fixer agent to:

  1. Gather evidence:

    • Read Unity console via read_console MCP for errors, warnings, stack traces
    • Search the codebase for the error message or related code
    • If the user pasted an error, parse it for file name, line number, and error type
  2. Diagnose — check these common Unity causes in order:

    • NullReferenceException → missing reference, destroyed object, execution order
    • Missing Script → file/class name mismatch, asmdef issue
    • Serialization data loss → field renamed without FormerlySerializedAs
    • Coroutine stopped → SetActive(false) or Destroy
    • Physics not working → wrong layers, missing collider/rigidbody
    • Build failure → UnityEditor in runtime, platform defines
  3. Fix — apply the minimal targeted fix. Don't refactor surrounding code.

  4. Verify:

    • Check console via read_console — error should be gone
    • If it was a serialization issue, warn about data that may need re-configuration
    • If it was a build issue, suggest running /unity-build to verify
  5. Explain what caused the bug and how the fix prevents recurrence.

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. 5d ago First seen · 43 lines · 28 tokens per session scan A 93509f96278a

Subscribe to this mod's changes

unity-fix is a command published in the GitHub repository XeldarAlz/everything-claude-unity (21 stars, last pushed 4mo ago), licensed MIT. It adds 28 tokens to every session and 400 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.