variant-safe-edit

variant-safe-edit is a skill for Claude Code, Codex from tyunta/prefab-sentinel. It costs 97 tokens per session (829 once invoked), scanned A, original, MIT.

A guarded Unity editing workflow for Prefab Variants, scenes, and assets. It checks the target first, previews a patch, records why the change is made, applies it only after confirmation, and can verify the result at runtime.

In plain words
What is it for?
Use it to inspect variant override chains, scan references, preview and apply property changes, remove selected overrides, and run Unity or visual checks afterward.
Why use it?
It lowers the risk of breaking prefab overrides or references and leaves an audit trail for changes that affect project assets.

Skill for Claude CodeCodex

Part of the prefab-sentinel plugin — 6 skills shipped together

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/tyunta/prefab-sentinel/variant-safe-edit
Any agent
npx skills add tyunta/prefab-sentinel --skill variant-safe-edit
Clone the repo
git clone --depth 1 https://github.com/tyunta/prefab-sentinel

Made for: Claude Code, Codex.

Or install prefab-sentinel, the plugin that ships this one along with the rest of its 6 skills.

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 variant-safe-edit

README.md
[![agentmods](https://agentmods.dev/badge/skills/tyunta/prefab-sentinel/variant-safe-edit.svg)](https://agentmods.dev/skills/tyunta/prefab-sentinel/variant-safe-edit)
Your own site
<a href="https://agentmods.dev/skills/tyunta/prefab-sentinel/variant-safe-edit"><img src="https://agentmods.dev/badge/skills/tyunta/prefab-sentinel/variant-safe-edit.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 829 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.00097 $0.00829
Opus 5 $0.00048 $0.00415
Sonnet 5 $0.00019 $0.00166
Haiku 4.5 $0.00010 $0.00083

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

Security

Grade A, and why

variant-safe-edit 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 5d 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.

skills/variant-safe-edit/SKILL.md · 56 lines

What it actually says

Variant Safe Edit

インターフェース

MCP ツールを直接呼び出す(CLI は廃止済み)。

Overview

Provide a deterministic, fail-fast workflow for variant edits with auditability and reference safety.

Workflow

  1. スコープとターゲットパスを宣言し、変更理由を記録する。
  2. Preflight: inspect_variantvalidate_refs で事前診断する。
  3. パッチ計画を準備し、patch_apply の dry-run モードで差分を確認する。
  4. error / critical で停止。修正を safe_fix または decision_required に分類する。
  5. confirm モードで適用(change_reason 必須)。
  6. Unity ランタイム検証が利用可能なら validate_runtime を実行する。

MCP ツール

  • inspect_variant — Prefab Variant のオーバーライドチェーン分析
  • validate_refs — 壊れた参照のスキャン
  • patch_apply — パッチ計画の検証・適用(plan_json で JSON 文字列入力、dry_run/confirm モード)
  • validate_runtime — UdonSharp コンパイル + ClientSim 検証
  • revert_overrides — Variant の特定オーバーライドを削除
  • set_property — シンボルパスでフィールド値を設定

Editor Bridge セットアップ

Unity Editor 起動中の Editor Bridge を介してパッチ適用・ランタイム検証を実行する(エディタを閉じる必要はない):

export UNITYTOOL_BRIDGE_WATCH_DIR=/path/to/EditorBridge
export UNITYTOOL_UNITY_TIMEOUT_SEC=30

適用後の目視確認:

  • editor_selecteditor_frame で対象を表示
  • editor_screenshot で視覚確認

Guardrails

  • Do not edit YAML directly.
  • Stop on error or critical; do not auto-apply decision_required.
  • Unity targets require the resident Editor Bridge configured via UNITYTOOL_BRIDGE_WATCH_DIR; if unavailable, stop after dry-run.
  • WSL environments: target paths are auto-converted to Windows format for Unity; watch_dir is auto-converted to WSL format for Python I/O.

次にこれ

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 56 lines · 97 tokens per session scan A ce7d0f1b4dc6

Subscribe to this mod's changes

variant-safe-edit is a skill published in the GitHub repository tyunta/prefab-sentinel (11 stars, last pushed 20d ago), licensed MIT. It adds 97 tokens to every session and 829 once invoked, about $0.0005 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-08-30.

Related

Other skills, from other repositories

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

playtest-report

Generates a structured playtest report template or analyzes existing playtest notes into a structured format. Use this to standardize playtest feedback collection and analysis.

Donchitos/Claude-Code-Game-Studios · 35 tokens

unity-manual-component

Manually add, configure, reorder, and copy components on GameObjects using Unity Editor UI. For one-off Inspector workflows that do not need REST automation.

Besty0728/Unity-Skills · 36 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens