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_batch for 2 or more instances, and the _batch variant of an asset edit for several assets.
  • Instance skills target entityId (preferred), name, instanceId or path. Instance writes stay on the instance until prefab_apply or prefab_apply_overrides.
  • Asset edits take prefabPath and a root-relative gameObjectPath (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_components reports them).
  • prefab_edit_batch runs ordered edits, all or nothing: list the 12 single writes in steps, 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 are FullAuto. Component and node deletion and prefab_edit_batch carry 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_property keeps its legacy parameters; new code uses prefab_set_serialized_property.
Installs
91
GitHub Stars
1.9K
First Seen
Mar 14, 2026