unity-doctor

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

A diagnostic command that checks the Unity connection, project structure, configuration files, hooks, and installed agent and command definitions. MCP is the connection that lets the coding agent communicate with the Unity Editor.

In plain words
What is it for?
Use it to verify the Unity Editor connection, inspect the .claude directory, check executable hooks and configuration files, and report actionable errors or warnings.
Why use it?
It helps distinguish setup or connectivity problems from problems in the game code itself.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

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

Good fit Use it to verify the Unity Editor connection, inspect the .claude directory, check executable hooks and configuration files, and report actionable errors or warnings.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/xeldaralz/everything-claude-unity/unity-doctor
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.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-doctor.svg)](https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-doctor)
Your own site
<a href="https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-doctor"><img src="https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,059 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.00026 $0.01059
Opus 5 $0.00013 $0.00530
Sonnet 5 $0.00005 $0.00212
Haiku 4.5 $0.00003 $0.00106

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

Security

Grade A, and why

unity-doctor 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 8d 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-doctor.md · 93 lines

How it starts

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

/unity-doctor — Diagnostic Health Check

Run a comprehensive diagnostic check on the everything-claude-unity installation and the Unity project. Report each check as PASS, WARNING, or ERROR with actionable fixes.

Check 1: Unity MCP Server Connectivity

  1. Attempt to call project_info via MCP to get Unity version and project state.
  2. If it succeeds: report Unity version, platform, and play mode state → PASS
  3. If it fails: report the error → ERROR with suggestions:
    • Is the unity-mcp package installed in Unity?
    • Is the Unity Editor running and the project open?
    • Is the MCP server running on the expected port?
    • Check .claude/settings.jsonmcpServers.unityMCP.url

Check 2: .claude/ Directory Integrity

  1. Verify expected directories exist: commands/, agents/, hooks/, skills/, rules/
  2. For each hook in hooks/: check the file exists and is executable (-x permission)
  3. For each command in commands/: verify it has YAML frontmatter with name and description
  4. For each agent in agents/: verify it has YAML frontmatter with name, description, model, and tools
  5. Check .claude/VERSION file exists and report version number
  6. Report counts: X commands, Y agents, Z hooks, W skills, V rules
  7. Any missing directories → ERROR; any invalid frontmatter → WARNING; all good → PASS

Check 3: Hook Registration Completeness

  1. Read .claude/settings.json
  2. For every .sh file in hooks/ directory (excluding _lib.sh):
    • Check it is registered in either PreToolUse or PostToolUse in settings.json
    • Report unregistered hooks → WARNING
  3. For every hook path in settings.json:
    • Check the referenced file exists
    • Report missing files → ERROR
  4. Verify blocking hooks (block-*.sh) are in PreToolUse and warning hooks (warn-*.sh, validate-*.sh, suggest-*.sh) are in PostToolUse
  5. All correct → PASS

Check 4: Unity Project Structure

  1. Check for Assets/ directory → ERROR if missing
  2. Check for ProjectSettings/ directory → ERROR if missing
  3. Check for Packages/manifest.jsonWARNING if missing
  4. Check for CLAUDE.md in project root → WARNING if missing, suggest /unity-init
  5. Search for .asmdef files in Assets/WARNING if none found
  6. Search for test assembly definitions (*Tests*.asmdef) → WARNING if none, suggest /unity-test
  7. All present → PASS

Read the full file on GitHub · 93 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. 8d ago First seen · 93 lines · 26 tokens per session scan A 9941506af967

Subscribe to this mod's changes

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