From unity-cli
Verifies Unity code changes via refresh, compile polling, error/warning console checks, auto-correction loops, and optional EditMode/Runtime tests. Auto-triggers on .cs/.shader/asmdef edits.
npx claudepluginhub bigdra50/unity-cli --plugin unity-cliThis skill uses the workspace's default tool permissions.
> **PREREQUISITE:** `../unity-shared/SKILL.md`(Relay Server 経由で Unity Editor が起動/アクティブであること)
Detects and resolves Unity C# compilation errors from VSCode OmniSharp diagnostics, analyzes patterns for fixes, and handles version control conflicts.
Investigates Unity runtime errors, NullReferences, and console logs via 'u' CLI. Fetches hierarchies, components, screenshots, and states for debugging workflows.
Automates Unity Editor via UniCli: edit Assets/Packages files, compile C# code, run EditMode/PlayMode tests, modify GameObjects, scenes, prefabs, assets, build/project settings.
Share bugs, ideas, or general feedback.
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)スキップ: コメントのみの変更、プロジェクト外ファイル、ユーザー指示。