unity-test
Run Unity Test Runner operations asynchronously
How do I install this agent skill?
npx skills add https://github.com/besty0728/unity-skills --skill unity-testIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The unity-test skill provides tools for managing and executing tests within the Unity Editor. It presents a low-risk surface for indirect prompt injection because it creates and executes code based on user-provided input parameters.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerpass
1 file scanned · No issues
What does this agent skill do?
Unity Test Skills
Run and manage Unity Test Runner tests. Parameters come from the schema (GET /skills/schema?names=<skill>&wire=v2); execution and dryRun rules: root SKILL.md.
When to use
- Running EditMode or PlayMode tests
- Discovering or listing tests
- Polling asynchronous test results
- Scaffolding test files
Rules
- Test runs are asynchronous.
test_run,test_run_by_name,test_discover_startand thetest_create_*skills return ajobIdat once. Poll withtest_get_result(jobId)ortest_discover_get_result(jobId). - Unity Test Runner runs one job at a time. Do not start a second
test_runwhile another test job is active. test_runin PlayMode andtest_run_by_namein PlayMode enter Play Mode (MayEnterPlayMode).test_create_editmodeandtest_create_playmodewrite a.csfile and trigger a domain reload. The server is briefly unavailable; retry as the root protocol describes.test_listandtest_list_categoriesreturnpendingDiscovery=truewith adiscoveryJobIdon a cache miss. Polltest_discover_get_result(jobId), then call again.- For compile errors use
debug_check_compilationin the debug module. To edit a generated test, use the script module. test_smoke_skillsuses transient probes, so it does not pollute workflow or batch persistence. It skips any skill withMayTriggerReload.
Pitfalls
test_run_all,test_create_template,test_get_statusandtest_run_asyncdo not exist. Usetest_runortest_run_by_name,test_create_editmodeortest_create_playmode, andtest_get_result.test_discover_get_resultandtest_listboth report counts, butcountmeans different things. Intest_list,countis the number returned andtotalis the number discovered. Intest_discover_get_result,countis the number discovered andreturnedis the number intests. The defaultlimit(100) caps a larger suite: checktruncated, and take the suite size fromtotal(test_list) orcount(discover).test_cancelis best effort: Unity Test Runner has no hard cancel.
Skills
test_run
Run tests asynchronously. Returns a jobId at once.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testMode | string | No | "EditMode" | EditMode or PlayMode |
| filter | string | No | - | Test filter passed to the runner |
Returns: {success, status, jobId, kind, testMode, filter, message}
test_run_by_name
Run specific tests by class or method name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testName | string | Yes | - | Test class or method name |
| testMode | string | No | "EditMode" | EditMode or PlayMode |
Returns: {success, jobId, testName, testMode}
test_get_result
Get the result of a test run.
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | Yes | Job ID from test_run or test_run_by_name |
Returns: {success, jobId, status, totalTests, passedTests, failedTests, skippedTests, inconclusiveTests, otherTests, failedTestNames, failedTestDetails, elapsedSeconds, resultSummary, error}. Each entry in failedTestDetails has name, resultState, message, stackTrace, durationSeconds and output.
test_get_last_result
Get the most recent test run result.
Parameters: none.
Returns: {jobId, status, total, passed, failed, skipped, inconclusive, other, failedNames}
test_cancel
Cancel a running test job, best effort.
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | Yes | Job ID to cancel |
Returns: {success, jobId, status, cancelled, note, warnings}
test_list
List tests through asynchronous discovery.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testMode | string | No | "EditMode" | EditMode or PlayMode |
| limit | int | No | 100 | Max tests to return |
Returns: {success, testMode, discoveryMode, count, total, truncated, tests, pendingDiscovery, discoveryJobId, discoveryStatus}. count is the number returned; total is the number discovered.
test_list_categories
List test categories through asynchronous discovery. Same cache-miss pattern as test_list.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testMode | string | No | "EditMode" | EditMode or PlayMode |
Returns: {success, testMode, discoveryMode, count, categories, pendingDiscovery, discoveryJobId, discoveryStatus, note}
test_discover_start
Start asynchronous discovery and return a discovery jobId. Use it when you want explicit control; otherwise test_list and test_list_categories start discovery on a cache miss.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testMode | string | No | "EditMode" | EditMode or PlayMode |
Returns: {success, status, jobId, kind, testMode, message}
test_discover_get_result
Get the result of a discovery job.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| jobId | string | Yes | - | Discovery job ID |
| limit | int | No | 100 | Max tests in the response |
Returns: {success, jobId, status, testMode, discoveryMode, count, returned, truncated, tests, error}. count is the discovered total; returned is the number in tests.
test_get_summary
Get the aggregated summary across all runs.
Parameters: none.
Returns: {success, totalRuns, completedRuns, totalPassed, totalFailed, totalSkipped, totalInconclusive, totalOther, allFailedTests}
test_smoke_skills
Run a reusable smoke test across the registered skills.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| category | string | No | - | One SkillCategory name. An unknown name is rejected rather than tested as "all". |
| nameContains | string | No | - | Filter skills by partial name |
| excludeNamesCsv | string | No | - | Comma-separated skill names to exclude |
| executeReadOnly | bool | No | true | Execute safe read-only skills directly |
| includeMutating | bool | No | true | Include mutating skills through dryRun smoke testing |
| limit | int | No | 0 | Max skills to inspect; 0 means all |
| runAsync | bool | No | true | Run as a job |
| chunkSize | int | No | 25 | Skills per chunk |
| failureItemLimit | int | No | 50 | Max failure entries reported |
Returns: {success, totalSkills, executedCount, dryRunCount, failureCount, results}
test_create_editmode
Create an EditMode test script template.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testName | string | Yes | - | Test class name |
| folder | string | No | "Assets/Tests/Editor" | Folder for the script |
Returns: {success, status, path, testName, jobId, serverAvailability}. The jobId tracks the compile.
test_create_playmode
Create a PlayMode test script template. Same behavior as test_create_editmode.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| testName | string | Yes | - | Test class name |
| folder | string | No | "Assets/Tests/Runtime" | Folder for the script |
Returns: {success, status, path, testName, jobId, serverAvailability}
Example
Run the EditMode suite and poll with the job ID:
curl -s "http://localhost:<port>/skill/test_run?expectProject=<project>" -d '{"testMode":"EditMode"}'
curl -s --retry 20 --retry-all-errors --retry-delay 2 "http://localhost:<port>/jobs/<jobId>?wait=60"
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/besty0728/unity-skills/unity-test">View unity-test on skillZs</a>