test
Skill11 starsChanged 2 months agoMITView on GitHub
Run Unity unit/integration tests and check for runtime errors.
- Sends data out
98 other projects use a version of this.
Adopted by
Most recently taken up by
- Kangentic/kangentictheir own version, first seen Oct 5, 2026
- crbnos/carbontheir own version, first seen Oct 4, 2026
- vericontext/vibeframetheir own version, first seen Oct 4, 2026
- thekinv21/NotificationServicetheir own version, first seen Oct 3, 2026
- domengabrovsek/agent-configtheir own version, first seen Oct 2, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
Used with
Projects with it also use develop, perf and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bamechoSkilldevelop
开发实施阶段详细规则;进入开发实施时读取;包含执行流程、代码规范、一致性审计、方案包迁移
Also in 6 projects that use this
MicrosoftSkillperf
Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-router.
Also in 6 projects that use this
nicolasestremSkilldocument
Create focused documentation for specific components or features
Also in 8 projects that use this
BugRogerSkillproject
Project lifecycle management. Dispatches to Ada.
Also in 6 projects that use this
vltingSkillscope
Interactive planning + orchestration. Approval-gated workflow covering saga→epic→task hierarchy via progressive scoping.
Also in 5 projects that use this
bitwize-music-studioSkilltutorial
Provides interactive guided album creation for new users. Use when the user is new to the plugin or asks for a walkthrough of the album creation process.
Also in 3 projects that use this
Other versions98 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 98
- NVIDIA/TensorRT★ 13ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- crbnos/carbon★ 2.7ksame name
- jsmastery-pro/skills★ 1.4ksame name
- getsentry/sentry-java★ 1.4ksame name
- bitwize-music-studio/claude-ai-music-skills★ 531same name
- boshu2/agentops★ 447same name
- platformplatform/PlatformPlatform★ 440same name
- owainlewis/blueprint★ 410same name
- OyadotAI/oya-browser★ 350same name
88 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-testsSkill
- best-practiceSkill
- bootstrapSkill
- briefSkill
- changesSkill
- claude-code-reviewSkill
- claude-plan-reviewSkill
- codex-code-reviewSkill
- codex-plan-reviewSkill
- commit-pushSkill
- depsSkill
- design-researchSkill
- designSkill
- doc-driftSkill
- doc-syncSkill
- doc-tidySkill
- executeSkill
- explainSkill
- full-briefSkill
- goSkill
- grandmaSkill
- planSkill
- post-design-reviewSkill
- self-reviewSkill
- tech-researchSkill
- timelineSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 8 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 80 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Run Unity unit/integration tests and check for runtime errors.
- Very specific: line 44
Script invocation: All qq scripts are available as bare commands (e.g.
- Very specific: line 45
Python command: Use python3 on macOS/Linux.
- Very specific: line 47
Editor.log path: Use source "${CLAUDE_PLUGIN_ROOT}/scripts/platform/detect.sh" && qq_get_editor_log_path to get the correct path for the …
- Very specific: line 53
If qq-project-state.py is available, read it before choosing test scope:
- Distinctive: line 77
Run the check for the project's channel (see the table above).
- Very specific: line 86
Always pass --project-path: without it the CLI picks *some* open Editor, possibly another worktree's.
- Distinctive: line 93
Verify tykit is reachable and talking to the correct Unity instance.
- Very specific: line 163
When POST commands time out but /ping still works, the main thread is blocked.
- Distinctive: line 188
If the health check fails, stop and report — do not attempt workarounds
- Distinctive: line 189
If the channel is none, skip to Step 3 — the test script will exit 2 with a reason if it cannot reach an Editor
- Distinctive: line 259
Read the failing test's source file and the code under test
- Distinctive: line 261
Ask the user whether to apply the fix automatically
- Distinctive: line 265
After tests complete, recommend the next step:
- Very specific: line 268
if recommended_next is /qq:doc-drift → "All green.
- Very specific: line 269
if recommended_next is /qq:commit-push → "All green.
- Very specific: line 275
All pass → run qq-execute-checkpoint.py pipeline-advance --project .
“Common” is measured: kept by at least 6 in 10 of the 80 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Respond in the user's preferred language (detect from their recent messages, or fall back to the language setting in CLAUDE.md).
Run Unity unit/integration tests and check for runtime errors.
This skill can ALWAYS run while a Unity Editor is open on the project — it drives the running Editor (the official Unity CLI
unity command/unity jobon projects that run Unity's Pipeline server, or tykit HTTP on tykit projects). Never skip it with the assumption that tests "cannot run from CLI" — they can.There is no automatic batch-mode fallback. If the scripts cannot reach an Editor they exit 2 and print why. That is the intended answer, not an obstacle to work around:
-batchmodegrabs the project lock and corrupts the Library of an Editor that is open but undetectable. Do not re-run with--batchon your own initiative — report the exit-2 message and let the user decide (open the Editor, or confirm nothing holds the lock and ask for--batch).
Which channel the project uses — the test scripts pick it themselves; you only need it for the health check in Step 1 and the console clear in Step 2:
Project has Channel Reference Library/Pipeline/.unity-pipeline-port(Unity's Pipeline server is running) and theunityCLIofficial Unity CLI shared/unity-cli-reference.md;unity command --project-path "$PWD" --query <keyword> --detail full --jsonlists a command's parametersTemp/tykit.json(and no live Pipeline descriptor, or nounityCLI to drive it)tykit shared/tykit-reference.mdneither none — Step 3's script exits 2 and says why — Exact answer (descriptor valid, owned by this project, its pid alive; the CLI found):
qq-unity-cli.py channel --project "$PWD". Overview of both channels (and when to query the live Editor at all):shared/unity-live-state.md.🔴 Never open,
cat,grepor printLibrary/Pipeline/.unity-pipeline-port. It holds an eval token that grants arbitrary C# execution inside the Editor. Check only that it exists; qq's scripts read just itsport/pid/projectPathfields.MCP backends (tykit channel, or no channel): if the built-in
tykit_mcptools are available (unity_health,unity_console,unity_run_tests, and — new in v0.5.0 —unity_main_thread_health,unity_focus_window,unity_dismiss_dialogfor recovery), use them first. If only third-party MCP tools are available (run_testsfrom mcp-unity, ortests-runfrom Unity-MCP), use those instead of the tykit/script commands below. On the official-CLI channel use the scripts in Step 3 — they carry the safeguards described there.
Arguments: $ARGUMENTS
- (no arguments): Run both EditMode and PlayMode
editmode/edit: EditMode onlyplaymode/play: PlayMode only--filter "TestName": Filter by test name (tykit: semicolon-separated for multiple; official CLI: one value)--assembly "Asm.Tests": Filter by assembly (tykit: semicolon-separated for multiple; official CLI: one value, not together with--filter)--timeout 300: How long to wait for results, in seconds (default chosen by the script per channel)--job <jobId>: Official CLI, EditMode only — resume waiting for a run that was already submitted (use the exact resume command the script printed; it keeps the same filter)
Examples:
/qq:test→ Run EditMode + PlayMode/qq:test play→ PlayMode only/qq:test editmode --filter "Health"→ Filter by name/qq:test --assembly "Game.PlayerSystem.Tests"→ Filter by assembly
Platform Notes
- Script invocation: All qq scripts are available as bare commands (e.g.
unity-test.sh) via the pluginbin/directory on PATH. If a bare command fails with "command not found", fall back to${CLAUDE_PLUGIN_ROOT}/bin/<command>. - Python command: Use
python3on macOS/Linux. On Windows (Git Bash), usepythoninstead (python3is not available). Thebin/wrappers handle this automatically. - Process inspection:
ps -p PID -o args=is macOS/Linux only. On Windowswmichas been removed since Windows 11 24H2; usetasklist //FI "PID eq $PID" //V(in Git Bash the switches need a double slash, or MSYS rewrites/FIinto a path). On the official-CLI channel you never need this: qq's scripts check the Editor pid recorded in the Pipeline descriptor themselves. - Editor.log path: Use
source "${CLAUDE_PLUGIN_ROOT}/scripts/platform/detect.sh" && qq_get_editor_log_pathto get the correct path for the current OS.
Steps
0. Read qq project state first when available
If qq-project-state.py is available, read it before choosing test scope:
qq-project-state.py --prettyInterpret the result like this:
policy_profile=core→ keep the default lighterpolicy_profile=feature→ normal defaultpolicy_profile=hardening→ prefer the stronger defaultdefault_test_scopeis the current repo's effective no-argument default
Rules:
- Explicit user arguments always win
--filter/--assemblyalways win- With no explicit mode:
default_test_scope=editmode→ run EditMode onlydefault_test_scope=all→ run EditMode first, then PlayMode
- Tell the user which default you chose and why if it came from
policy_profile
1. Editor health check (by channel)
Run the check for the project's channel (see the table above). If the channel is none, skip to Step 3 — the test script makes the final call and exits 2 with a reason if it cannot reach an Editor.
1A. Official Unity CLI
unity command --project-path "$PWD" --json --no-banner --timeout 20 editor_status- Healthy: top-level
successistrue,data.result.projectPathis this project,data.result.compilingisfalseanddata.result.playModeisstopped(Step 3's script waits for a compile to finish and stops Play mode itself, and says so). - Always pass
--project-path: without it the CLI picks some open Editor, possibly another worktree's. Do not useunity status --project-pathto decide ownership — it is a substring filter. No Pipeline instance found for project→ the Pipeline server is not running for this project: ask the user to start it (Unity menu Window/Pipeline/Start Server).timed out after …→ the Editor's CLI execution gate is occupied: a test run in progress, a modal dialog, or a wedged command. The Editor GUI may still respond. Ask the user to look for a dialog in the Unity window; exiting Play mode or restarting the Editor frees a wedged gate (Window/Pipeline/Stop Server goes through the same gate and will not get in). Do not kill Unity yourself.- A response with
busyReason: "blocked_by_dialog"(Unity 6000.7+) lists the dialogs: report their titles and buttons to the user.
1B. tykit (only when the channel is tykit)
Verify tykit is reachable and talking to the correct Unity instance.
1B-a. Read port + PID
TYKIT_JSON="Temp/tykit.json"
PORT=$("${QQ_PY:-python3}" -c "import json; print(json.load(open('$TYKIT_JSON'))['port'])")
TYKIT_PID=$("${QQ_PY:-python3}" -c "import json; print(json.load(open('$TYKIT_JSON'))['pid'])")1B-b. Verify PID is the main Unity Editor (not a Worker)
The most common port-stealing culprit is AssetImportWorker — it can overwrite tykit.json with its own PID, leaving the port pointing at a process that isn't running TykitServer.
# macOS / Linux; on Windows (Git Bash) use: tasklist //FI "PID eq $TYKIT_PID" //V
PROC_ARGS=$(ps -p "$TYKIT_PID" -o args= 2>/dev/null || true)
if [ -z "$PROC_ARGS" ]; then
echo "PID $TYKIT_PID is dead — tykit.json is stale"
# STOP: delete stale tykit.json, ask user to reopen Unity
fi
IS_WORKER=$(echo "$PROC_ARGS" | grep -cE "AssetImportWorker|UnityPackageManager|UnityHelper" || true)
if [ "$IS_WORKER" -ne 0 ]; then
echo "PID $TYKIT_PID is a subprocess ($PROC_ARGS), not the main Unity Editor"
# STOP: ask user to restart Unity manually (never kill — risks Library corruption)
fi1B-c. GET health check (/ping)
PING=$(curl -s --connect-timeout 3 --max-time 5 "http://localhost:$PORT/ping" 2>/dev/null) || true
if [ -z "$PING" ]; then
echo "tykit on port $PORT not responding to /ping"
# STOP: ask user to check Unity window for modal dialogs
fi1B-d. POST health check (compile-status)
/ping responds from the listener thread without touching Unity API. A modal dialog or domain reload can block the main thread, causing POST commands to hang while /ping still works. Verify POST works:
CS=$(curl -s --connect-timeout 5 --max-time 15 -X POST "http://localhost:$PORT/" \
-d '{"command":"compile-status"}' -H 'Content-Type: application/json' 2>/dev/null) || true
if [ -z "$CS" ]; then
echo "tykit POST timed out — ping works but commands do not"
# STOP: Diagnose by priority:
# 1. Re-check PID (step 1B-b) — Worker is the #1 cause
# 2. Check for Unity modal dialogs blocking the main thread
# 3. Wait 30s for domain reload to finish, then retry
else
echo "tykit healthy: port=$PORT pid=$TYKIT_PID"
fiTo discover tykit commands: curl -s -X POST http://localhost:$PORT/ -d '{"command":"commands"}' -H 'Content-Type: application/json' or '{"command":"describe-commands"}' for full schemas. For tykit usage beyond tests (scene editing, prefab workflow, runtime reflection, recovery from hangs), see shared/tykit-reference.md.
Diagnostic table:
| Symptom | Likely cause | Action |
| PID dead | Unity closed but tykit.json not cleaned up | Delete stale tykit.json, ask user to reopen |
| PID is AssetImportWorker | Worker subprocess stole the port on restart | Ask user to restart Unity manually |
| PID is UnityPackageManager/UnityHelper | Other Unity subprocess inherited the port | Ask user to restart Unity manually |
/ping timeout | Unity hung or not listening | Ask user to check Unity window |
/ping OK but POST timeout | Modal dialog / stalled domain reload / package resolve blocking main thread | Call GET /health to confirm → run recovery flow below |
1B-e. Recovery when main thread is blocked (tykit v0.5.0+ only)
When POST commands time out but /ping still works, the main thread is blocked. These endpoints run on the HTTP listener thread and bypass the queue, so they work even when POST commands don't:
# 1. Confirm main thread is blocked
curl -s --connect-timeout 3 --max-time 5 "http://localhost:$PORT/health"
# Look at mainThreadBlocked and hint fields
# 2. Try bringing Unity to foreground (Windows only) — fixes 90% of stalls
# (Unity background-throttles domain reload / package resolve when unfocused)
curl -s --connect-timeout 3 --max-time 5 "http://localhost:$PORT/focus-unity"
# 3. If that fails, try dismissing a modal dialog (Windows only)
curl -s --connect-timeout 3 --max-time 5 "http://localhost:$PORT/dismiss-dialog"
# 4. After recovery, retry your POST commandBuilt-in tykit_mcp equivalent: unity_main_thread_health, unity_focus_window, unity_dismiss_dialog MCP tools. Prefer unity_health and stop if it reports ok: false.
Third-party MCP users (mcp-unity / Unity-MCP): These recovery endpoints are tykit-specific and have no equivalent in third-party MCPs. If POST hangs, the only options are (a) manually clicking/closing the Unity window, (b) waiting for domain reload to finish, or (c) switching to tykit direct HTTP / built-in tykit_mcp. Third-party backends manage their own connection, so skip the rest of this step for them.
Rules (every channel):
- Never
killUnity (including Workers) — risks Library corruption and cascade failures - Never hardcode Unity paths — use
find_unityfromunity-common.shor let the user specify - Never launch Unity from command line — easy to pick wrong version; ask user to open via Unity Hub
- If the health check fails, stop and report — do not attempt workarounds
- If the channel is none, skip to Step 3 — the test script will exit 2 with a reason if it cannot reach an Editor
- Never add
--batchyourself. It is an explicit opt-in to grabbing the project lock; only the user can accept that risk
2. Clear Console + Mark Editor.log position
source "${CLAUDE_PLUGIN_ROOT}/scripts/platform/detect.sh"
EDITOR_LOG="$(qq_get_editor_log_path)"
BASELINE=$(wc -l < "$EDITOR_LOG")
# official Unity CLI channel:
unity command --project-path "$PWD" --json --no-banner clear_console
# tykit channel (PORT from Step 1B):
if [ -n "$PORT" ]; then
curl -s --connect-timeout 5 --max-time 15 -X POST http://localhost:$PORT/ \
-d '{"command":"clear-console"}' -H 'Content-Type: application/json'
fiBuilt-in
tykit_mcp: Useunity_consolewithaction: "clear"when available.Third-party MCP backends: Skip this step — neither mcp-unity nor Unity-MCP has a console-clear equivalent. Runtime error checking (Step 4) uses Editor.log directly and does not depend on console state.
3. Run tests
Select command based on arguments:
| Argument | Command |
(none) + default_test_scope=all | unity-unit-test.sh |
(none) + default_test_scope=editmode | unity-test.sh editmode |
editmode | unity-test.sh editmode |
playmode | unity-test.sh playmode |
| with filter/assembly | unity-test.sh <mode> --filter "X" or unity-test.sh <mode> --assembly "Y" |
- With no arguments, use
default_test_scopefrom project state - With arguments, call
unity-test.shand pass all arguments through - The script picks the channel and the default wait (
--timeout) itself; only pass--timeoutwhen the user asks for one - Official CLI: a full EditMode run can take 10+ minutes. Run the script with the Bash tool's
run_in_background, or, if a wait is cut short, resume the same run with the command the script printed at submission (unity-test.sh editmode --job <jobId>, plus the same filter). Never re-run to "retry" a wait — that submits the whole suite again and cancels the run in flight. PlayMode cannot be resumed: let the run finish in Unity before re-running. Do not edit scripts while an official-CLI EditMode run is in flight: the auto-compile hook cannot see a detached test job (it only sees PlayMode runs). Its recompile waits on the busy channel (the hook gives up after ~50 s) but stays queued in Unity, and once the run ends it may recompile and reload the domain before the script has collected the result (test_job_lost). - Do not drive the run yourself on the official-CLI channel — no hand-written
run_teststhroughunity command, and none of theunityCLI's own test / build / run subcommands (they start a second, batch-mode Editor on the same project). The script passes-- --timeout 86400(the command's own 300 s default wedges the Editor's whole CLI channel when it fires on a long suite) and judges the result bySummary.Failedand the skip count — exit codes andsuccessfields alone report green for a run with failures. - Official CLI only: skipped tests must be listed in the expected-skips file (
unity.expected_skipsinqq.yaml, default.qq/unity-expected-skips.txt; one NUnit FullName per line), otherwise a skip fails the run.unity.min_tests.editmode/unity.min_tests.playmodeinqq.yamlset a minimum test count for unfiltered runs. - Exit codes: 0 passed; 1 tests failed (or fewer than the minimum ran); 2 no trustworthy verdict. Before deciding what to do with a non-zero exit, read
failure_categoryin.qq/state/test.json:editor_not_detected/unity_cli_unavailable— zero tests ran; not a test failure and not something to retry with--batch. Relay the script's message and stop.test_failed/test_count_below_floor— a real red result (named in the output).test_in_flight/editor_mismatch— nothing was submitted (another run in progress, or the Editor answering belongs to another project). Report it; do not loop.editor_busy— the Editor's CLI channel was busy or blocked by a modal dialog. This can happen after the submission too: if the script printed an EditMode jobId, the run may still be going — answer any dialog in Unity, then resume with the--jobcommand the script printed (never re-run). A busy reply to a PlayMode submission may still have queued the run: check Unity before re-running. Otherwise nothing was submitted; report it and do not loop.test_timeout_or_blocked/test_job_lost/test_run_error/test_verdict_untrusted/unity_cli_transport— the run may have happened but there is no verdict. Report it; ontest_timeout_or_blockedfor EditMode, resume with--job; ontest_job_lost(a compile or domain reload in Unity dropped the job), wait until Unity is idle before re-running.unsupported_filter/invalid_arguments— fix the arguments (nothing was submitted).config_error— fixqq.yaml, or the expected-skips file (UTF-8 text, or UTF-16 with a BOM); when it is reported after the run, the tests ran but the skips could not be checked.allreports a definite failure (exit 1) even when the other mode gave no verdict; that mode's reason is inruns[]and in the summary.
- On failure, analyze the cause and determine whether it was introduced by the current changes or was pre-existing
Built-in
tykit_mcp(tykit channel): Useunity_run_testsfirst. Pass mode, filter, assembly, and timeout as tool parameters. When no mode argument is given, preserve the sequencing: run EditMode first, check the result, and only proceed to PlayMode if EditMode passes. On failure, apply the same analysis as below.Third-party MCP backends (tykit channel or no channel): If the built-in bridge is not available, use
run_tests(mcp-unity) ortests-run(Unity-MCP) instead of the scripts above. Pass mode, filter, assembly, and timeout as tool parameters. When no mode argument is given, preserve the sequencing: run EditMode first, check the result, and only proceed to PlayMode if EditMode passes. On failure, apply the same analysis as below.
4. Check runtime errors
Even if all tests pass, runtime errors may still occur. Check via Editor.log (not dependent on the console API buffer):
tail -n +$((BASELINE + 1)) "$EDITOR_LOG" | \
grep -iE "NullReferenceException|Exception:|Error\b" | \
grep -v "^UnityEngine\.\|^Cysharp\.\|^System\.Threading\.\|^ at \|CompilerError\|StackTrace" | \
sort -uShow all errors to the user — do not filter or omit any. For each error, include a source assessment (e.g., "exception from TaskEdgeCaseTests safety test, likely expected behavior"), and let the user decide whether action is needed.
On test failure
- Analyze the failure output and identify the failing test name and assertion
- Read the failing test's source file and the code under test
- Propose a concrete fix
- Ask the user whether to apply the fix automatically
Handoff
After tests complete, recommend the next step:
- All tests pass, no runtime errors:
- if
recommended_nextis/qq:doc-drift→ "All green. Next up is/qq:doc-driftbefore shipping." - if
recommended_nextis/qq:commit-push→ "All green. Ready for/qq:commit-push." - otherwise → "All green. Based on current state, the next step is
<recommended_next>."
- if
- Tests pass but runtime errors found → "Tests passed but found N runtime errors. Want me to investigate, or continue with the next recommended step?"
- Test failures were fixed → "Fixed N failures. Want to re-run
/qq:testto confirm, or proceed to/qq:doc-drift?"
--auto mode: skip asking:
- All pass → run
qq-execute-checkpoint.py pipeline-advance --project . --completed-skill "/qq:test" --next-skill "<recommended_next>"(use the actualrecommended_nextfrom project state, not a hardcoded value), then continue withrecommended_next - Failures → auto-fix → re-run
/qq:test(max 3 attempts, then stop and ask user)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

