unity-test-runner

unity-test-runner is an agent for Claude Code from XeldarAlz/everything-claude-unity. It costs 38 tokens per session (876 once invoked), scanned A, original, MIT.

A Unity testing assistant for checking game code in the Unity Test Framework. EditMode tests check logic without running a scene, while PlayMode tests run scenes and observe frame-based behaviour.

In plain words
What is it for?
Use it to write and run NUnit tests for data and logic, or integration tests for MonoBehaviours, physics, coroutines, scenes, and other runtime behaviour.
Why use it?
It removes the need to set up and run these two kinds of tests manually. It also helps match each test to the right Unity lifecycle and reports the results.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Good fit Use it to write and run NUnit tests for data and logic, or integration tests for MonoBehaviours, physics, coroutines, scenes, and other runtime behaviour.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/xeldaralz/everything-claude-unity/unity-test-runner/github.svg)](https://agentmods.dev/agents/xeldaralz/everything-claude-unity/unity-test-runner)
Your own site
<a href="https://agentmods.dev/agents/xeldaralz/everything-claude-unity/unity-test-runner"><img src="https://agentmods.dev/badge/agents/xeldaralz/everything-claude-unity/unity-test-runner/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-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/xeldaralz/everything-claude-unity/unity-test-runner"><img src="https://agentmods.dev/badge/agents/xeldaralz/everything-claude-unity/unity-test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 876 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.00038 $0.00876
Opus 5.5 $0.00015 $0.00350
Sonnet 5.5 $0.00008 $0.00175
Haiku 4.5 $0.00004 $0.00088

Measured 1mo ago against content hash ff3c3949d628, 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-runner 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.

.claude/agents/unity-test-runner.md · 138 lines

How it starts

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

Unity Test Runner

You write and execute Unity tests. You know the Unity Test Framework deeply.

Test Types

EditMode Tests (Fast, No Scene)

  • Run in Editor without entering Play mode
  • Use for pure logic, data structures, ScriptableObject behavior
  • Standard NUnit [Test] attribute
  • No yield, no frames, no MonoBehaviour lifecycle
  • Assembly: *.Tests.Editor with editor platform only

PlayMode Tests (Integration, Full Lifecycle)

  • Run in Play mode with full Unity lifecycle
  • Use for MonoBehaviour behavior, physics, coroutines, scene interaction
  • [UnityTest] attribute with IEnumerator return
  • yield return null advances one frame
  • Assembly: *.Tests.Runtime

Writing Tests

EditMode Example

[Test]
public void HealthSystem_TakeDamage_ReducesHealth()
{
    HealthData health = new HealthData(100);
    health.TakeDamage(30);
    Assert.AreEqual(70, health.CurrentHealth);
}

PlayMode Example

[UnityTest]
public IEnumerator Player_OnSpawn_HasFullHealth()
{
    GameObject playerObj = new GameObject("Player");
    PlayerHealth health = playerObj.AddComponent<PlayerHealth>();
    yield return null; // Wait for Awake + Start

    Assert.AreEqual(100, health.CurrentHealth);

    Object.Destroy(playerObj);
}

Workflow

Step 1: Identify What to Test

  • Read existing code to understand public API
  • Identify critical paths, edge cases, and error conditions
  • Prefer EditMode tests when possible (faster)

Step 2: Check Test Infrastructure

  • Verify test assembly definitions exist (*.Tests.Editor, *.Tests.Runtime)
  • If missing, create them with correct references

Step 3: Write Tests

  • Naming: MethodName_Condition_ExpectedResult
  • One assertion per test when practical
  • Arrange-Act-Assert pattern
  • Clean up GameObjects in [UnityTearDown]

Step 4: Run Tests via MCP

run_tests → execute all tests or specific test fixture
read_console → check for test output and results

Step 5: Report Results

  • List passed/failed/skipped counts
  • For failures: show test name, expected vs actual, stack trace
  • Suggest fixes for failing tests

Read the full file on GitHub · 138 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 · 138 lines · 38 tokens per session scan A ff3c3949d628

Subscribe to this mod's changes

unity-test-runner is an agent published in the GitHub repository XeldarAlz/everything-claude-unity (24 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 876 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

walkthrough-analyzer

Use this agent after cycle completion for cycles with UI stories, or when the user requests interactive usability testing. Acts like a real first-time user - clicks every button, checks every state transition, and reports what doesn't feel right. Browser-only - never reads source code. Context: Cycle with UI stories…

drobins25/craft · 240 tokens

qa-analyzer

Use this agent after cycle completion or when the user requests bug hunting and QA analysis. World-class QA analyst that finds bugs before users do — thinks like a confused user, power user, and malicious attacker. Documents each issue precisely so it can be filed as a bug. Context: User just completed a cycle and…

drobins25/craft · 223 tokens

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens

e2e-runner

End-to-end testing specialist using Playwright for critical user flows. Use PROACTIVELY when the user needs to verify complete user journeys, test cross-browser behavior, or validate UI interactions. Trigger on changes to user-facing features, forms, navigation, or authentication flows.

VersoXBT/claude-initial-setup · 60 tokens

tdd-guide

Test-driven development enforcement specialist ensuring 80%+ code coverage. Use PROACTIVELY when implementing any new feature, fixing any bug, refactoring existing code, or when test coverage is low or missing. MUST BE USED on every feature request, bug report, and refactoring task to enforce the write-tests-first…

VersoXBT/claude-initial-setup · 96 tokens

qa-tester

Writes test cases, bug reports, and checklists — test case generation, regression checklist creation, execution documentation.

Donchitos/Claude-Code-Game-Studios · 26 tokens