unity-testability
GitHub提供Unity代码可测试性建议,指导将逻辑分离至纯C#以便单元测试,规划测试策略并识别EditMode/PlayMode测试场景。
Trigger Scenarios
Install
npx skills add Besty0728/Unity-Skills --skill unity-testability -g -y
SKILL.md
Frontmatter
{
"name": "unity-testability",
"description": "Advise on Unity testability"
}
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.
Version History
-
5ee8388
Current 2026-08-17 04:13
文档精简至6.2KB,新增协议指南和手动模块建议,更新版本锚点至2.6.0。
-
25d511e
2026-08-13 09:16
压缩描述文本并添加触发场景说明
- ec9f870 2026-07-05 14:41


