skills/run-tests/SKILL.md
Provides guidelines for running Unity tests using the run_unity_tests tool. Make sure to use this skill whenever running, executing, or re-running tests on the Unity editor. This includes verifying implementations, debugging test failures, running specific test assemblies, or any task that involves the run_unity_tests tool. Even if the user just says "run the tests" or "check if it passes", use this skill.
npx skillsauth add nowsprinting/claude-code-settings-for-unity run-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
unity_play_control, get_unity_compilation_result, run_unity_tests, and run_method_in_unity must be called strictly one at a time — always wait for each call to return before making the next one. Calling them concurrently causes domain-reload conflicts that result in "canceled" or "did not connect within 30 seconds" errors.error or canceled, wait 10 seconds before retrying. Domain reload typically takes several seconds; immediate retry hits the same in-flight reload and fails again. Do not switch tools in the meantime (e.g., calling unity_play_control to verify state) — that just compounds the multiplexed calls. If the same tool returns error or canceled on two consecutive attempts (with the 10-second wait between them), stop and consult the user instead of retrying further.Before running tests, complete the following steps in order:
get_unity_compilation_result tool before proceeding.assemblyNames and testMode for a specific test class, run ${CLAUDE_SKILL_DIR}/scripts/resolve-test-target.sh <test-class-cs-path>. The script prints <assemblyName>\t<testMode> (e.g. MyGame.Tests\tPlayMode). Skip this step when running an already-known assembly.Then use the run_unity_tests tool to run the tests on the Unity editor.
Test execution can take several minutes. Do not re-run while a test is in progress — always wait for it to complete or time out. If a timeout occurs, narrow down the tests using filter settings and re-run.
If the same test(s) fail on two or more consecutive runs, stop and consult the user rather than continuing to fix.
When consulting, clarify:
Read the appropriate resource file based on the situation:
run_unity_tests, unity_play_control, get_unity_compilation_result) is not available or fails with a connection error: Read ${CLAUDE_SKILL_DIR}/resources/troubleshooting-run-unity-tests.mdTestHelper namespace (excluding TestHelper.UI): Read ${CLAUDE_SKILL_DIR}/resources/troubleshooting-test-helper.mdTestHelper.UI namespace: Read ${CLAUDE_SKILL_DIR}/resources/troubleshooting-test-helper-ui.mdtesting
Orchestrates the test-first implementation planning workflow for feature implementation and spec changes. Use this skill whenever plan mode is active and the task involves implementing or adding a new feature, or changing an existing specification. Even if the user only says "plan this" or "how should we implement this", load this skill to ensure the full test-first planning workflow is followed.
testing
Diagnoses and fixes bugs using a test-first workflow (reproduce, diagnose, fix). Use this skill whenever the user reports a bug, describes unexpected behavior, or asks to investigate or fix a defect. Even if the user says "something's broken", "this isn't working", "fix this bug", or "why does X happen", load this skill to guide the full reproduce → diagnose → fix cycle.
development
Creates and modifies Unity scene and prefab files. Use this skill whenever creating, editing, or modifying .unity scene files or .prefab prefab files, or writing editor scripts under Assets/Editor/ that generate or manipulate scenes, prefabs, or scene-bound assets. This includes adding GameObjects, building uGUI hierarchies, wiring up components, and any task that results in changes to .unity or .prefab files.
tools
Provides guidelines for directly editing Unity YAML-serialized asset files for Unity projects. Make sure to use this skill whenever creating, editing, or modifying simple YAML asset files (ScriptableObjects, Materials, etc.) via Edit/Write tools without going through the Unity Editor. This includes adjusting ScriptableObject field values, modifying material shader properties, or any task that results in direct changes to allowlisted Unity YAML asset files. Even for small edits or one-line value changes, load this skill to ensure Unity asset-YAML conventions are followed.