test
Skill12 starsChanged 8 months agoMITView on GitHub
Run Unity unit/integration tests and check for runtime errors.
179 other projects use a version of this.
Adopted by
Most recently taken up by
- tyrantpiper/travel-pwatheir own version, first seen Nov 8, 2026
- phuthuycoding/kanban-flowtheir own version, first seen Nov 8, 2026
- pche-broken-artist/forge-of-thoughttheir own version, first seen Nov 8, 2026
- PMDevSolutions/Flaviantheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use agent-context-isolation, agentica-infrastructure and 10 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.
parcadeiSkillagent-context-isolation
Agent Context Isolation
Also in 3 projects that use this
parcadeiSkillagentica-infrastructure
Reference guide for Agentica multi-agent infrastructure APIs
Also in 3 projects that use this
- +10 more from parcadei
Other versions179 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 179
- react/react★ 252ksame name
- facebook/react★ 252ksame name
- apache/skywalking★ 25ksame name
- livewire/livewire★ 24ksame name
- NVIDIA/TensorRT★ 13ksame name
- FalkorDB/FalkorDB★ 10ksame name
- FastLED/FastLED★ 7.5ksame name
- fleetdm/fleet★ 7.2ksame name
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
169 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 repository29 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
- recordSkill
- self-reviewSkill
- tech-researchSkill
- timelineSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 154 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Run the check for the project's channel: 1A below, or Step 1B in shared/tykit-test-steps.md on tykit.
- Very specific: line 43
Always pass --project-path: without it the CLI picks *some* open Editor, possibly another worktree's.
- Distinctive: line 50
Never launch Unity from the command line (easy to pick the wrong version).
- Distinctive: line 51
If the health check fails, stop and report — do not attempt workarounds
- Distinctive: line 96
Check Editor.log even when all tests pass (it does not depend on the console buffer):
- Distinctive: line 109
Read the failing test and the code under test, say whether the current changes introduced the failure or it was pre-existing, propose a …
- Distinctive: line 113
After tests complete, recommend the next step:
- Very specific: line 120
All pass → run qq-execute-checkpoint.py pipeline-advance --project .
“Common” is measured: kept by at least 6 in 10 of the 154 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 qq scripts as
${CLAUDE_PLUGIN_ROOT}/bin/<name>: they are not on PATH, so a bareunity-test.shexits 127.
The test scripts drive the open Unity Editor from the CLI (the official
unity command/unity job, or tykit HTTP), so the tests can run from here — don't skip them assuming they can't. If the scripts cannot reach an Editor they exit 2 and say why; there is no batch-mode fallback. Report that message and let the user decide (open the Editor, or confirm nothing holds the project lock and ask for--batch). Never add--batchyourself:-batchmodegrabs the project lock and corrupts the Library of an Editor that is open but undetectable.
Channel: the test scripts pick it themselves; you need it only for Steps 1–2.
qq-unity-cli.py channel --project "$PWD"printsunity-cli,tykitornone(shared/unity-live-state.mdexplains them; never open or printLibrary/Pipeline/.unity-pipeline-port— it holds an eval token). Ontykit, or when the Editor is reached only through MCP tools (tykit_mcp, mcp-unity, Unity-MCP), readshared/tykit-test-steps.mdnow: it holds Step 1B and the MCP variants of Steps 2–3.
Arguments: $ARGUMENTS
- (no arguments): the project's default scope (Step 0)
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)
Steps
0. Read project state
qq-project-state.py --prettyExplicit arguments (mode, --filter, --assembly) always win. With no mode argument, default_test_scope (the repo's effective default, derived from policy_profile unless configured) picks the command in Step 3: editmode → EditMode only, all → EditMode, then PlayMode. Tell the user which default you used and why.
1. Editor health check (by channel)
Run the check for the project's channel: 1A below, or Step 1B in shared/tykit-test-steps.md on tykit. 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).- A response with
busyReason: "blocked_by_dialog"(Unity 6000.7+) lists the dialogs: report their titles and buttons to the user.
Rules (every channel):
- Never
killUnity (including Workers) — risks Library corruption and cascade failures - Never launch Unity from the command line (easy to pick the wrong version); ask the user to open it via Unity Hub
- If the health check fails, stop and report — do not attempt workarounds
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'
fi3. 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 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, and its recompile stays queued in Unity — once the run ends it may 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.
4. Check runtime errors
Check Editor.log even when all tests pass (it does not depend on the console 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. Give each a source assessment (e.g. "from a safety test, likely expected") and let the user decide whether to act.
On test failure
Read the failing test and the code under test, say whether the current changes introduced the failure or it was pre-existing, propose a concrete fix, and ask whether to apply it.
Handoff
After tests complete, recommend the next step:
- All tests pass, no runtime errors → "All green. Next step:
<recommended_next>." (from project state) - 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.

