unity-test

A workflow for running and interpreting tests in Unity, a game-development engine. It supports projects whose files include an Assets folder and can use either the closed-editor batch mode or Unity MCP when the editor is open.

In plain words
What is it for?
Running Unity unit tests, checking their logs or XML results, and analyzing the outcome.
Why use it?
It removes the need to decide manually how to run the tests based on whether the Unity Editor is open.

Skill for Claude CodeCodex

Part of the unity-tools-plugin plugin — 2 skills, 2 commands, 2 agents, 1 MCP server 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 skills/toshikiimagawa/unity-claude-code-tools/unity-test
Any agent
npx skills add ToshikiImagawa/unity-claude-code-tools --skill unity-test
Clone the repo
git clone --depth 1 https://github.com/ToshikiImagawa/unity-claude-code-tools

Made for: Claude Code, Codex.

Or install unity-tools-plugin, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 2 agents, 1 MCP server.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 676 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.00027 $0.00676
Opus 5 $0.00014 $0.00338
Sonnet 5 $0.00005 $0.00135
Haiku 4.5 $0.00003 $0.00068

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

Security

Grade A, and why

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

plugins/unity-tools-plugin/skills/unity-test/SKILL.md · 103 lines

How it starts

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

Unity Test

Execute Unity tests and analyze the test results. Supports batch mode (when Editor is closed) and Unity MCP (when Editor is open).

When to Use

Use this skill when:

  • User requests to run tests in a Unity project
  • User wants to validate unit tests
  • User runs the /test command

Prerequisites

  • Unity Editor must be installed via Unity Hub
  • Current directory must be a valid Unity project (contains Assets/ folder)
  • Test assemblies must be properly configured in the project
  • For MCP mode: Unity MCP must be installed and running in Unity Editor

Execution Steps

Step 1: Check if Unity Editor is running

Execute the test script to check the project state:

${CLAUDE_PLUGIN_ROOT}/scripts/unity-test.sh "$(pwd)" [test-mode] [filter]

The script outputs:

LOG_MODE:batch|editor

Step 2: Execute tests based on mode

If LOG_MODE is batch (Editor is closed)

The script will run tests in batch mode automatically. Extract:

  • LOG_FILE_PATH: Path to the log file
  • RESULT_FILE_PATH: Path to XML test results (if available)

Then call the test-result agent:

Task: test-result agent
Prompt: {log_file_path} batch
If LOG_MODE is editor (Editor is open)

Use Unity MCP to run tests directly in the Editor:

  1. Run tests using MCP:

    mcp__unity-mcp__run_tests
    

    This returns a job_id for tracking the test execution.

  2. Poll for results:

    mcp__unity-mcp__get_test_job with job_id
    

    Keep polling until the job is complete.

  3. Report the results directly from the MCP response.

Test modes for MCP:

  • EditMode - Editor-based unit tests
  • PlayMode - Runtime tests

Output Format

Success:

[TEST OK] Ran N tests. All passed.

Failure:

[TEST FAILED] M of N tests failed.
- {TestClass}.{TestMethod}: {FailureReason}

Error Handling

If the script fails to find Unity Editor:

  • Inform the user that Unity is not installed or not found
  • Suggest installing Unity via Unity Hub

Read the full file on GitHub · 103 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 · 103 lines · 27 tokens per session scan A 15ad1427791a

Subscribe to this mod's changes

unity-test is a skill published in the GitHub repository ToshikiImagawa/unity-claude-code-tools (2 stars, last pushed 7mo ago), licensed MIT. It adds 27 tokens to every session and 676 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-31.

Related

Other skills, from other repositories

gdunit-driver

Run gdUnit4 unit tests and parse results into structured output. Use this skill after writing or modifying code to verify correctness via unit tests, when diagnosing test failures, or when writing new test files. Triggers: "run tests", "test fails", "write a test", any gdUnit4/unit test mention. Supports both GDScript…

valkor-ai/loom · 84 tokens

card-test

Canonical recipe for writing engine cast-pipeline tests. Use GameScenario + GameRunner::cast(...).resolve() and assert via CastOutcome deltas. Covers the six test-harness foot-guns (hand-written TargetRef vectors, incomplete modal target submission, wrong-point hand baseline, inline-keyword cards, AST-internal flag…

phase-rs/phase · 101 tokens

godot

Develop, test, build, and deploy Godot 4.x games. Use when working with Godot Engine, GDScript, GdUnit4 testing, PlayGodot automation, or exporting games to web/desktop. Covers CI/CD pipelines and deployment to Vercel/GitHub Pages/itch.io.

Randroids-Dojo/skills · 67 tokens

roblox-testing

Testing, debugging, and profiling Roblox experiences — Developer Console, Output, logging discipline, pcall and assertion patterns, TestEZ unit tests, the MicroProfiler (client and server), Scene Analysis, Script Profiler, memory diagnostics, network debugging, Luau type checking, and connection cleanup. Use when…

nonlooped/roblox-suite · 80 tokens

unity-testing

Unity 6 testing guide. Use when writing unit tests, integration tests, or doing TDD with Unity Test Framework. Covers Edit Mode and Play Mode tests, NUnit attributes ([Test], [UnityTest], [SetUp], [TearDown]), testing MonoBehaviours and coroutines, and CI/CD integration. Based on Unity 6.3 LTS documentation.

Nice-Wolf-Studio/unity-claude-skills · 78 tokens

unity-tests-write

Use when writing Unity tests, including EditMode tests, PlayMode tests, performance testing, and code coverage.

DmitriyYukhanov/claude-plugins · 25 tokens