unity-testability

unity-testability is a skill for Claude Code, Codex from Besty0728/Unity-Skills. It costs 10 tokens per session (329 once invoked), scanned A, original, MIT.

Advice for organizing Unity code so important logic can run as ordinary C# code instead of depending on scenes or GameObjects.

In plain words
What is it for?
Use it to plan testable architecture, extract rules and algorithms, define interfaces, and choose candidate Unity tests.
Why use it?
Unity-specific code is harder to test; separating pure logic makes unit tests easier and clarifies what needs EditMode or PlayMode coverage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

UnitySkills is a REST API-based automation engine that lets AI coding agents control Unity Editor projects, including scenes and other editor operations. It is for developers using Unity with supported coding agents and IDEs. The catalogue skills and commands provide the agent workflows used to operate Unity projects through the engine.

Besty0728/Unity-Skills · 1,707 stars · on GitHub · micostar.cc

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/besty0728/unity-skills/testability
Any agent
npx skills add Besty0728/Unity-Skills --skill testability
Clone the repo
git clone --depth 1 https://github.com/Besty0728/Unity-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unity-testability

README.md
[![agentmods](https://agentmods.dev/badge/skills/besty0728/unity-skills/testability.svg)](https://agentmods.dev/skills/besty0728/unity-skills/testability)
Your own site
<a href="https://agentmods.dev/skills/besty0728/unity-skills/testability"><img src="https://agentmods.dev/badge/skills/besty0728/unity-skills/testability.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 329 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.00329
Opus 5 $0.00005 $0.00164
Sonnet 5 $0.00002 $0.00066
Haiku 4.5 $0.00001 $0.00033

Measured 2d ago against content hash 9b61752b414b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

unity-testability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

SkillsForUnity/unity-skills~/skills/testability/SKILL.md · 39 lines

What it actually says

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Improving testability
  • Extracting logic for unit tests
  • Planning a test strategy
  • 提升可测试性、为单元测试抽取逻辑、规划测试策略

Unity Testability Advisor

Use this skill when deciding what logic should remain in Unity-facing classes and what should move into pure C# code.

Review Questions

  • Can the rule/algorithm run without Transform, GameObject, or scene state?
  • Can config be injected instead of read through static globals?
  • Can runtime decisions be moved to a plain C# class and called from a thin MonoBehaviour?
  • Does this need PlayMode coverage, or is EditMode enough?

Output Format

  • Logic that should move to pure C#
  • Logic that should stay Unity-facing
  • Suggested seams/interfaces
  • Candidate EditMode tests
  • Candidate PlayMode tests

Guardrails

Mode: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).

  • Do not force test seams everywhere if the script is tiny and scene-bound.
  • Prefer a few meaningful seams over abstraction for its own sake.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 39 lines · 10 tokens per session scan A 9b61752b414b

Subscribe to this mod's changes

unity-testability is a skill published in the GitHub repository Besty0728/Unity-Skills (1,707 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 329 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

tests-run

Execute Unity tests (EditMode or PlayMode) and return per-test results. Supports filtering by test assembly, namespace, class, and method. Refreshes the AssetDatabase first; defers execution across domain reloads if scripts changed. Precondition: every open scene must be saved — dirty scenes abort the run.

IvanMurzak/Unity-MCP · 68 tokens

convex-test

Generate convex-test tests for the app's Convex functions.

openclaw/clawhub · 16 tokens

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates setfinalrender — blocking a render whose generated audio mis-voices a word (e.g. the approved "human-vetted" spoken as "human witted"), drops…

gooseworks-ai/goose-skills · 116 tokens

uloop-run-tests

Run Unity Test Runner and report detailed results. Use for EditMode/PlayMode tests, change verification, or failure diagnosis.

hatayama/unity-cli-loop · 30 tokens

gdunit-driver

Run gdUnit4 unit tests and parse results into structured output. Use this skill after writing or modifying code to verify correctness via unit tests, when diagnosing test failures, or when writing new test files. Triggers: "run tests", "test fails", "write a test", any gdUnit4/unit test mention. Supports both GDScript…

valkor-ai/loom · 84 tokens

backend/testing-guide

后端测试编写指南,包括单元测试、集成测试和E2E测试的编写方法和最佳实践.

echoVic/boss-skill · 30 tokens