unity-prefab
Installation
SKILL.md
Unity Prefab Skills
Scene prefab instances, prefab assets and variants. Parameters come from the schema (GET /skills/schema?category=Prefab&wire=v2); execution and dryRun rules: root SKILL.md. Parameters: reference/<skill_name>.md.
Rules
- Batch first: use
prefab_instantiate_batchfor 2 or more instances, and the_batchvariant of an asset edit for several assets. - Instance skills target
entityId(preferred),name,instanceIdorpath. Instance writes stay on the instance untilprefab_applyorprefab_apply_overrides. - Asset edits take
prefabPathand a root-relativegameObjectPath(empty means the root), and save only that asset. Variant and nested edits stay overrides; they never change the base prefab. - Duplicate sibling names are rejected with candidates and
siblingIndex. Component indices are zero-based among components of exactly the requested type (prefab_list_componentsreports them). prefab_edit_batchruns ordered edits, all or nothing: list the 12 single writes insteps, not reads or scene skills.- Reference fields take a project asset, a node inside this prefab, or an explicit clear; never a scene object.
- Operating mode: instance and asset reads are
SemiAuto; writes areFullAuto. Component and node deletion andprefab_edit_batchcarry Delete or high metadata: refused under Approval and Auto. - DryRun does not load prefab contents; a step that depends on an earlier one is validated when it runs.
Pitfalls
- Root deletion, reparenting or duplication, transform replacement or removal, cycles, script and bookkeeping property writes, and Unity-invalid inherited structure changes are rejected.
prefab_set_propertykeeps its legacy parameters; new code usesprefab_set_serialized_property.