unity-testing

unity-testing is a skill for Claude Code, Codex from Nice-Wolf-Studio/unity-claude-skills. It costs 78 tokens per session (3,768 once invoked), scanned A, original, MIT.

A guide to testing Unity games and tools with the Unity Test Framework, Unity's built-in testing system. It explains Edit Mode tests for code and editor tools, Play Mode tests for running gameplay, and NUnit, the testing library Unity builds on.

In plain words
What is it for?
Writing unit and integration tests, testing MonoBehaviours and coroutines, setting up test assemblies, running tests from the command line, and producing NUnit-compatible test results.
Why use it?
It helps catch errors in gameplay, physics, coroutines, and editor code before release. It also provides a way to run tests automatically in continuous integration systems.

Skill for Claude CodeCodex

Part of the unity plugin — 35 skills 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/nice-wolf-studio/unity-claude-skills/unity-testing
Any agent
npx skills add Nice-Wolf-Studio/unity-claude-skills --skill unity-testing
Clone the repo
git clone --depth 1 https://github.com/Nice-Wolf-Studio/unity-claude-skills

Made for: Claude Code, Codex.

Or install unity, the plugin that ships this one along with the rest of its 35 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nice-wolf-studio/unity-claude-skills/unity-testing.svg)](https://agentmods.dev/skills/nice-wolf-studio/unity-claude-skills/unity-testing)
Your own site
<a href="https://agentmods.dev/skills/nice-wolf-studio/unity-claude-skills/unity-testing"><img src="https://agentmods.dev/badge/skills/nice-wolf-studio/unity-claude-skills/unity-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,768 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.00078 $0.03768
Opus 5 $0.00039 $0.01884
Sonnet 5 $0.00016 $0.00754
Haiku 4.5 $0.00008 $0.00377

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

Security

Grade A, and why

unity-testing 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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/unity-testing/SKILL.md · 498 lines

How it starts

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

Unity Test Framework

Test Framework Overview

The Unity Test Framework (UTF) is Unity's built-in testing solution, integrating a custom version of NUnit (based on NUnit 3.5) adapted for Unity. It enables testing C# code in Edit Mode, Play Mode, and on target platforms (Standalone, Android, iOS).

UTF extends NUnit with Unity-specific attributes ([UnityTest], [UnitySetUp], [UnityTearDown]) that support coroutines, yield instructions, and frame-based execution.

Key capabilities:

  • Edit Mode tests for editor extensions and pure logic
  • Play Mode tests for gameplay, physics, and coroutine-based code
  • Standalone player test builds for platform-specific validation
  • Command-line execution for CI/CD pipelines
  • NUnit XML result output

Source: Unity Test Framework 2.0 Manual


Setup and Configuration

Installing the Test Framework

UTF ships with Unity by default. Open the Test Runner via Window > General > Test Runner.

Creating a Test Assembly

Test code must live in its own assembly definition (.asmdef) that references NUnit.

Create via Window > General > Test Runner (click Create a new Test Assembly Folder) or Assets > Create > Testing > Test Assembly Folder.

This creates a Tests folder with an .asmdef file preconfigured with references to:

  • nunit.framework.dll
  • UnityEngine.TestRunner
  • UnityEditor.TestRunner (Edit Mode only)

Edit Mode Assembly Definition (.asmdef)

{
    "name": "Tests",
    "references": [
        "UnityEngine.TestRunner",
        "UnityEditor.TestRunner"
    ],
    "includePlatforms": ["Editor"],
    "defineConstraints": ["UNITY_INCLUDE_TESTS"],
    "autoReferenced": false
}

Play Mode Assembly Definition (.asmdef)

{
    "name": "Tests.PlayMode",
    "references": [
        "UnityEngine.TestRunner",
        "UnityEditor.TestRunner",
        "MyGameAssembly"
    ],
    "includePlatforms": [],
    "optionalUnityReferences": ["TestAssemblies"],
    "defineConstraints": ["UNITY_INCLUDE_TESTS"],
    "autoReferenced": false
}

Read the full file on GitHub · 498 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 498 lines · 78 tokens per session scan A 4928639d2adc

Subscribe to this mod's changes

unity-testing is a skill published in the GitHub repository Nice-Wolf-Studio/unity-claude-skills (30 stars, last pushed 1mo ago), licensed MIT. It adds 78 tokens to every session and 3,768 once invoked, about $0.0004 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.

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

creating-server-tests

Skill "creating-server-tests" from moorestech/moorestech, covering server test creator, テスト種別の選択, ワークフロー, 1. テスト種別に応じたテンプレートを選択 and 2. 必須ルール.

moorestech/moorestech · 148 tokens

test

Run Unity unit/integration tests and check for runtime errors.

tykisgod/quick-question · 12 tokens

rust-bevy-test-conventions

Conventions and best practice for writing tests in Rust applications using Bevy ECS. Use when writing or creating tests for Bevy systems, components, resources, or game logic in Rust.

kimgoetzke/coding-agent-configs · 44 tokens

ue5-deterministic-sim-tests

Make a game's core loop provable — seeded random streams, a fixed logic timestep, a headless match harness that runs full AI matches without rendering, automation tests for gameplay math, and the evidence artifacts (seeded replays, CSV dumps, logs, screenshots, performance baselines) that let an agent or a reviewer…

LichAmnesia/unreal-engine-agent-skills · 138 tokens

unity-test-runner

Execute and analyze Unity Test Framework tests from the command line. This skill automates test execution for Unity projects by detecting the Unity Editor, configuring test parameters (EditMode/PlayMode), running tests via CLI, parsing XML results, and generating detailed failure reports. Use this when running Unity…

Dev-GOM/claude-code-marketplace · 73 tokens