Triggers Unity tests and processes XML output to identify failures.

Install

mkdir -p .claude/skills/unity-test && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14373" && unzip -o skill.zip -d .claude/skills/unity-test && rm skill.zip

Installs to .claude/skills/unity-test

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when users want to run Unity tests or read test results.
60 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Trigger Unity test runs
  • Run tests by name or mode
  • Parse XML test reports
  • Get summary of all test results
  • Create EditMode and PlayMode test templates

How it works

The skill initiates Unity test runs and then reads the resulting XML reports to provide summaries and detailed results, operating in a stateless fire-and-forget manner.

Inputs & outputs

You give it
Test mode (EditMode/PlayMode) and optional filter/test name
You get back
Test run status, XML report file path, or parsed test results (counts, failed names)

When to use unity-test

  • Execute unit tests
  • Read test result XML
  • Check test summary

About this skill

Test Skills

Overview

Kick off Unity tests and read their XML reports. Recipes are stateless fire-and-forget + read pairs — there is no job ID, no polling loop inside a single Unity_RunCommand. Trigger a run in one call, read TestResults/*.xml in a later call.

Mental model

  1. Install tooling/test/test_runner_tool first, once per project, and start every run through it. Do not register a result callback from a Unity_RunCommand body: such a callback can never be cleaned up, and each one rewrites its own old report with every later run's results, so a report captured as "red" becomes a copy of a later green one. It cannot be repaired in place — the failed approaches are listed under Why not inline; do not re-attempt them.
  2. Trigger: test_run or test_run_by_name calls ProjectTestRunner.Run(...), which returns the report path immediately. TestRunnerApi.Execute writes no file on its own; the tool's single permanent callback writes it when the run finishes.
  3. Use a fresh report filename per run, and pass fully-qualified test names. A bare class name matches zero tests, and a run of zero tests reports as a pass — always assert total is non-zero before believing a green.
  4. Read: parse the report yourself once it has settled. test_get_result, test_get_last_result and test_get_summary below are recipe templates under recipes/test/, not callable MCP tools — adapt one into a Unity_RunCommand body, or just parse the XML from the shell, which is usually less work: python3 -c "import xml.etree.ElementTree as ET;print(ET.parse('TestResults/<name>.xml').getroot().attrib)".

Polling across calls is the caller's job, not a recipe's. Only one Test Runner run should be active at a time — the tool returns an ERROR: string if a run it started is still pending. Wait for the report to be whole and fresh — the poll loop in test_run — before starting the next.

Precondition: the Editor must be open and responsive on the intended project before triggering.

PlayMode caveat: a PlayMode run may trigger a domain reload that discards the in-memory callback before it fires, so no XML is written. For reliable PlayMode reports, disable domain reload for the run or use a persistent (compiled) editor runner. EditMode runs do not reload the domain.

Common Mistakes

DO NOT (common hallucinations):

  • test_run_all does not exist → use test_run or test_run_by_name.
  • test_create_template does not exist → use test_create_editmode or test_create_playmode.
  • test_get_status does not exist → use test_get_result (reads the XML, stateless).
  • There is no jobId anywhere. If older docs mention one, ignore them.
  • There is no test_cancel — Unity TestRunnerApi has no public hard-cancel surface.
  • There is no test_smoke_skills — it depended on an upstream REST skill registry that isn't in this pack.

Routing:

  • For compile error checking → editor_get_state (isCompiling field).
  • For test script creation → test_create_editmode / test_create_playmode, then edit via the script module.

Skills

test_run

Kick off tests. Returns { success, started, mode, filter, resultsPath } immediately; the callback writes TestResults/<mode>-mcp.xml when the run ends.

ParameterTypeRequiredDefaultDescription
testModestringNoEditModeEditMode or PlayMode.
filterstringNonullTest-name substring forwarded as Filter.testNames[0].

test_run_by_name

Kick off a single class or fully-qualified method. Returns { success, started, testName, mode, resultsPath }; the callback writes TestResults/<mode>-mcp.xml when the run ends.

ParameterTypeRequiredDefaultDescription
testNamestringYes-Exact class name or Ns.Class.Method.
testModestringNoEditModeEditMode or PlayMode.

test_get_result

Read the newest TestResults/<mode>-*.xml and return parsed counts.

ParameterTypeRequiredDefaultDescription
testModestringNoEditModeWhich XML family to filter on.

Returns: { success, file, total, passed, failed, skipped, inconclusive, failedNames, startTime, endTime, durationSeconds }

test_get_last_result

Newest XML across all modes. No parameters.

Returns: { success, file, mode, total, passed, failed, skipped, inconclusive, failedNames, startTime, endTime, durationSeconds }

test_get_summary

Aggregate every XML report under TestResults/. No parameters.

Returns: { success, totalRuns, totalPassed, totalFailed, totalSkipped, totalInconclusive, allFailedTests, files }

test_list

List available tests.

ParameterTypeRequiredDefaultDescription
testModestringNoEditModeEditMode or PlayMode.
limitintNo100Max tests to list.

test_list_categories

List test categories.

ParameterTypeRequiredDefaultDescription
testModestringNoEditModeEditMode or PlayMode.

test_create_editmode

Write an EditMode test template synchronously.

ParameterTypeRequiredDefaultDescription
testNamestringYes-Class name. No /, \, ...
folderstringNoAssets/Tests/EditorMust start with Assets/ or Packages/.

Returns: { success, path, testName }

test_create_playmode

Write a PlayMode test template synchronously.

ParameterTypeRequiredDefaultDescription
testNamestringYes-Class name. No /, \, ...
folderstringNoAssets/Tests/RuntimeMust start with Assets/ or Packages/.

Returns: { success, path, testName }


RunCommand Examples

Recipe path rule: ../../recipes/test/<command>.md

See ../../recipes/test/<command>.md for C# templates.

When not to use it

  • When the Unity Editor is not open and responsive
  • When a job ID for test runs is expected
  • When a hard-cancel for Unity tests is required

Limitations

  • Requires the Unity Editor to be open and responsive
  • Does not provide a job ID for test runs
  • Cannot hard-cancel Unity test runs

How it compares

This skill provides a programmatic interface to Unity's Test Runner, allowing for automated test execution and result parsing, which differs from manual interaction with the Unity Editor's test UI.

Compared to similar skills

unity-test side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
unity-test (this skill)02moNo flagsIntermediate
webapp-testing3533moReviewIntermediate
ui-ux-expert-skill919moReviewAdvanced
skill-creator1283moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

webapp-testing

anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

353585

ui-ux-expert-skill

fercracix33

Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.

91244

skill-creator

anthropics

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

128200

python-testing-patterns

wshobson

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

77204

dependency-upgrade

wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

26240

playwright-mcp

sfc-gh-dflippo

Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.

33197

Search skills

Search the agent skills registry