From unity-cli
Quickly verifies Unity code changes by refreshing the editor, polling for compilation, and checking for errors or warnings. Runs automatically on .cs/.shader edits and supports optional test execution.
How this skill is triggered — by the user, by Claude, or both
Slash command
/unity-cli:unity-verifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **PREREQUISITE:** `../unity-shared/SKILL.md`(Relay Server 経由で Unity Editor が起動/アクティブであること)
PREREQUISITE:
../unity-shared/SKILL.md(Relay Server 経由で Unity Editor が起動/アクティブであること)
コード変更するたびに実行。unity-shared の Quick Verify (#quick-verify) を参照。skill 経由のコマンドは必ず -i <instance> を付ける (unity-shared #インスタンス指定)。
u -i <instance> console clear
→ u -i <instance> refresh
→ isCompiling ポーリング (2s 間隔, 最大 30s)
→ u -i <instance> console get -l E,W | head -50
u console get の出力に対して以下のテーブルで判定。出力ゼロ行 = エラー無しとして扱う (空 = OK)。
| 出力内容 | 判定 | 次のアクション |
|---|---|---|
| 空 (0 行) | クリーン | 完了。次工程 (Full Verify 等) に進める |
[ERROR] 行のみ無し + [WARN] 行あり | クリーン (Warning 許容) | Warning を 1〜3 行に要約してユーザー報告、続行 |
[ERROR] 行あり | エラー | 下記「修正ループ」へ |
-l E,W は Error + Warning 両方を取得する。Warning だけなら続行可、Error が 1 件でもあれば停止して修正ループに入る。
最大 3 回までの「修正 → Quick Verify 再実行」サイクル。
_ (例: _Broken*.cs) または "Test" "Fixture" 等を含むintentional, TODO, FIXME, tuning 等の意図的破壊を示唆する語があるユーザーが要求した場合のみ。Quick Verify + EditMode テスト。
Quick Verify 実行
→ クリーン (Error 0、Warning は許容) なら u -i <instance> tests run edit → 結果確認
→ Fail あり: 報告、修正して Quick Verify から再実行 (修正ループの規定に従う)
要求された場合のみ。Play Mode でランタイムエラーを検出。
u -i <instance> console clear
→ u -i <instance> play
→ isPlaying ポーリング
→ 3秒待機
→ u -i <instance> console get -l +E+X
→ u -i <instance> stop
報告のみ。自動修正せずユーザーに判断を委ねる。
以下の編集後に Quick Verify を自動実行:
.cs / .shader / .compute.asmdef / .asmrefpackage.json / manifest.json)スキップ: コメントのみの変更、プロジェクト外ファイル、ユーザー指示。
npx claudepluginhub bigdra50/unity-cli --plugin unity-cliDetects and resolves Unity C# compilation errors from VSCode OmniSharp diagnostics, analyzes patterns for fixes, and handles version control conflicts.
Shared prerequisite for unity-cli skills: enforces instance specification, provides verify sequence (refresh, polling, error checking), connection setup, and security rules for Unity Editor automation.
Runs Unity tests via the mcp__jetbrains__run_unity_tests tool with concurrency guards, failure escalation, and test-target resolution.