By tyunta
Repair broken references, prefab Variant override drift, and null wiring in Unity VRChat projects by parsing asset YAML directly, with dry-run confirmation and audit logging for every fix
Unity Prefab / Scene / Asset の壊れた参照・Variant override・配線ミスを構造化応答で診断し、 dry-run → confirm 経路で安全に修復するための MCP ツールリファレンス。 Editor Bridge のセットアップ手順もここに含む。 トリガー: .prefab, .unity, .asset, .mat, Prefab, Variant, 配線, 参照, 壊れた参照, broken reference, GUID, fileID, override, パッチ, patch plan, validate refs, validate structure, where-used, inspect variant, inspect wiring, inspect hierarchy, wiring, null参照, null reference, MonoBehaviour, 階層, hierarchy, Transform整合, 孤立, orphan, 重複fileID, duplicate fileID, Editor Bridge, Bridge セットアップ, bridge setup, deploy_bridge, UNITYTOOL_BRIDGE_WATCH_DIR, watch ディレクトリ のいずれかに該当する作業で使用する。
VRChat エコシステムツール(ModularAvatar / liltoon / VRCFury / AvatarOptimizer 等)の ナレッジを 4 フェーズで段階的に調査・検証し `knowledge/*.md` に再現可能な形で蓄積する。 ソースコード読解 → inspect 実測まで進めると confidence を `high` に昇格できる。 トリガー: 新しい VRChat コミュニティツールに初めて遭遇した、 既存ナレッジの confidence が low で作業に支障がある、 ユーザーから「このツールについて調べて」と依頼された場合。
壊れた GUID / fileID 参照を検出し、一意な置換先のみ `safe_fix`、それ以外は `decision_required` で保留する。ignore-guid file (`<scope>/config/ignore_guids.txt`) と allowlist branch 経由で noise を整理する。 トリガー: `validate_refs` で missing GUID / fileID が出た、Broken PPtr の調査。
Udon / ClientSim のランタイム例外を分類してアセット / コンポーネントに紐づけ、 決定的な修正は `safe_fix`、判断が必要なものは `decision_required` で仕分ける。 トリガー: ランタイム例外、Udon nullref、ClientSim 起動失敗、ログベースの regression。
Prefab / Scene / Asset を壊さず編集する。preflight 診断 → dry-run 差分 → confirm + change_reason 監査 → runtime 検証の 4 段ゲートを 1 経路で踏む。 トリガー: パッチ適用、Prefab Variant 編集、`set_property` / `patch_apply` / `revert_overrides` を伴う変更全般。
Admin access level
Server config contains admin-level keywords
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Unity / VRChat プロジェクトの Prefab / Scene / Asset を安全に検査・編集する MCP サーバー。
Variant の override 衝突、Broken PPtr / missing fileID、Udon / ClientSim ランタイム例外を構造化された応答で診断し、手作業 YAML 編集を経由せずに修復する。AI エージェント前提の設計。
read-only 経路(validate_refs / validate_materials / inspect_* / find_* 等)は Unity を起動せず YAML 直読みで完結する。書き込み経路(patch_apply / set_property / editor_* 等)は常駐 Editor Bridge との file-IPC で動き、confirm=True + 非空 change_reason の監査ペアを欠く呼び出しは CHANGE_REASON_REQUIRED で拒否される。
本 README は各専門ドキュメントへの入口(ドキュメントマップ 参照)。仕様の正本は専門ドキュメント群、運用ルールの正本は AGENTS.md。
やること
やらないこと
プラグインとして導入する。ホスト(Claude Code / Codex CLI)に応じて 2 つの経路があり、いずれも marketplace から取得する。
Claude Code(Claude Code 内に入力するスラッシュコマンド):
/plugin marketplace add tyunta/prefab-sentinel
/plugin install prefab-sentinel@tyunta-prefab-sentinel
Codex CLI(シェルで marketplace を登録 → Codex CLI 内の /plugins TUI で有効化):
codex plugin marketplace add tyunta/prefab-sentinel
登録後、Codex CLI 内で /plugins を開き、一覧から prefab-sentinel を選んで Install する(codex plugin install というシェルコマンドは存在しない)。
導入後の使い方は guide スキル(/prefab-sentinel:guide)が入口 — MCP ツールの一覧と呼び出し方、パッチスキーマ、Editor Bridge のセットアップ、エコシステムナレッジの案内がまとまっている。MCP ツールを実際に呼ぶのは AI エージェント側なので、エージェントにこの guide を参照させれば使い始められる。
各経路の詳細は セットアップ、リポジトリから MCP サーバーを直接起動する開発者向け手順は CONTRIBUTING.md を参照。
MCP サーバーは Plugin 内部で uv / uvx 経由でローカル起動されるため、Plugin 導入経路でも Python / uv は必要。ホスト(Claude Code / Codex CLI)と本ツールは Windows / macOS / Linux で動作する。
Quickstart の 2 コマンドで導入する。インストールすると MCP サーバー・5 つのスキル・knowledge/ ディレクトリが一括展開され、/prefab-sentinel:guide 等のスキルを Claude Code から直接呼び出せる。各スキル内のコマンドは ${CLAUDE_PLUGIN_ROOT} テンプレート変数でローカルから実行される。
Quickstart の手順で導入する(シェルで codex plugin marketplace add → Codex CLI 内の /plugins TUI で prefab-sentinel を Install)。MCP サーバーは Plugin 定義(.codex-plugin/plugin.json の mcpServers が指す .codex-plugin/mcp.json)から登録され、skill bundle も同時に展開される。Codex の MCP サーバーは uvx が GitHub から本体を取得して起動するため、起動時にネットワーク接続が必要(Claude Code 経路はローカル導入物から起動する)。Plugin を更新したら Codex CLI セッションを再起動する。無効化・登録解除は /plugins TUI から行う。
| スキル | 呼び出し | 説明 |
|---|---|---|
| guide | /prefab-sentinel:guide | MCP ツールリファレンス・パッチスキーマ・Bridge セットアップ・エコシステムナレッジ案内 |
| variant-safe-edit | /prefab-sentinel:variant-safe-edit | Prefab Variant の安全な編集ワークフロー |
| prefab-reference-repair | /prefab-sentinel:prefab-reference-repair | 壊れた参照の検出・修復ワークフロー |
| udon-log-triage | /prefab-sentinel:udon-log-triage | ランタイムログのトリアージワークフロー |
| knowledge-acquisition | /prefab-sentinel:knowledge-acquisition | VRChat エコシステムツールのナレッジ調査・蓄積 |
パッチ実適用・ランタイム検証など書き込み系の経路は、Unity Editor 内に常駐する Editor Bridge との file-IPC で動く。Bridge のセットアップ手順は /prefab-sentinel:guide スキルに、watch ディレクトリを指定する環境変数 UNITYTOOL_BRIDGE_WATCH_DIR は CONFIGURATION.md に記載。未設定で書き込み系ツールを呼ぶと BRIDGE_WATCH_DIR_MISSING で fail-fast 停止する(read-only 検査のみなら設定不要)。
全 MCP ツールの正本カタログは docs/tools.md、応答エンベロープ(success / severity / code / message / data / diagnostics)とエラーコードの正本は docs/api-reference.md。下表は代表ツールのみ。
npx claudepluginhub tyunta/prefab-sentinel --plugin prefab-sentinelComprehensive Unity 6 game engine development skills. 35 skills covering scripting, physics, graphics, animation, UI, audio, 2D, ECS/DOTS, Cinemachine, performance profiling, multiplayer, XR, editor tools, 5 Tier 1 correctness skills, 5 Tier 2 architecture skills, and 5 Tier 3 domain translation skills (game loop, NPC behavior, UI patterns, level design, procedural generation). Based on Unity 6.3 LTS official documentation.
Unity Editor automation plugin powered by the Unity Control Protocol base skill.
Unity Development Toolkit - Expert agents for scripting/refactoring/optimization, script templates, and Agent Skills for Unity C# development
Claude Code plugin to integrate unity-cli into Unity development workflows
BPX plugin for Unreal Engine asset inspection and safe edit workflows.
Skills and subagents for developing Unity projects with Claude Code — maintainable test design and implementation, test-first workflow, coding guidelines, scene editing, and more.