unity-test

unity-test is a skill for Claude Code from ToshikiImagawa/unity-claude-code-tools. It costs 27 tokens per session (676 once invoked), scanned A, original, MIT.

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 Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the unity-tools-plugin plugin — 2 skills, 2 commands, 2 agents, 1 MCP server shipped together

Good fit Running Unity unit tests, checking their logs or XML results, and analyzing the outcome.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ToshikiImagawa/unity-claude-code-tools
Claude Code
/plugin install unity-tools-plugin

Made for: Claude Code.

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.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/toshikiimagawa/unity-claude-code-tools/unity-test/github.svg)](https://agentmods.dev/skills/toshikiimagawa/unity-claude-code-tools/unity-test)
Your own site
<a href="https://agentmods.dev/skills/toshikiimagawa/unity-claude-code-tools/unity-test"><img src="https://agentmods.dev/badge/skills/toshikiimagawa/unity-claude-code-tools/unity-test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unity-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/toshikiimagawa/unity-claude-code-tools/unity-test"><img src="https://agentmods.dev/badge/skills/toshikiimagawa/unity-claude-code-tools/unity-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00027 $0.00676
Opus 5.5 $0.00011 $0.00270
Sonnet 5.5 $0.00005 $0.00135
Haiku 4.5 $0.00003 $0.00068

Measured 1mo ago against content hash 15ad1427791a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 9mo ago), licensed MIT. It adds 27 tokens to every session and 676 once invoked, about $0.0001 per session on Opus 5.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

tests-run

Execute Unity tests (EditMode or PlayMode) and return per-test results. Supports filtering by test assembly, namespace, class, and method. Refreshes the AssetDatabase first; defers execution across domain reloads if scripts changed. Precondition: every open scene must be saved — dirty scenes abort the run.

IvanMurzak/Unity-MCP · 68 tokens

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

godot-gdscript-headless-testing

Run GDScript test suites from the command line with godot --headless, using a SceneTree/MainLoop runner script that exits non-zero on failure so CI can gate merges. Use when a Godot project needs unit tests without opening the editor, when wiring a CI job (GitHub Actions or similar) that must fail the build on a…

gamedev-skills/awesome-gamedev-agent-skills · 111 tokens

unity-testability

Advise on Unity testability.

Besty0728/Unity-Skills · 10 tokens

unity-testing

Use when writing or running Unity tests - Unity Test Framework EditMode vs PlayMode, test assembly definitions, testing plain C# and ScriptableObjects, PlayMode scene/physics/input tests, batchmode CLI with result XML, coverage, and the dotnet test fallback when no editor is installed.

makifbaysal/tasktrooper · 62 tokens

web-game-performance-and-testing

Use when working on any browser game (Phaser, PixiJS, three.js, Babylon.js, PlayCanvas, Excalibur, KAPLAY) - requestAnimationFrame with clamped delta and visibility pause, zero-allocation frame loops, measuring in DevTools, bundle and asset size budgets, Vitest with seeded RNG and injected time, and a seeded…

makifbaysal/tasktrooper · 87 tokens