unity-prefab

Create, instantiate, and manage Unity prefabs, overrides, and variants in scenes.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-prefab-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-prefab
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/prefab
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-prefab-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Unity prefabs manually through the editor is slow and error-prone, especially when spawning many instances, applying overrides, or editing prefab assets directly. This Skill exposes prefab operations as callable skills so an AI can perform them programmatically. ## Core Features & Use Cases - Prefab Lifecycle Management: Create prefabs from scene objects, instantiate single or batched instances, unpack instances, and create prefab variants. - Override Control: Inspect, apply, or revert property overrides between prefab instances and their source assets. - Direct Asset Editing: Set component properties on a prefab asset without instantiating it, including basic types, vectors, colors, and asset references. - Use Case: Spawn 10 enemy prefabs at spaced positions with a single prefab_instantiate_batch call instead of 10 separate API calls, then locate all instances later with prefab_find_instances. ## Quick Start Ask the AI to instantiate the prefab at Assets/Prefabs/Enemy.prefab three times along the x-axis using the batch instantiate skill.

Frequently Asked Questions about unity-prefab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I instantiate multiple prefabs in Unity at once?

Use prefab_instantiate_batch with an items array containing prefabPath, name, position, rotation, scale, and parent for each instance. One batch call replaces many individual prefab_instantiate calls, which is recommended when spawning two or more instances.

How to edit a Unity prefab asset without instantiating it?

Use prefab_set_property with the prefabPath, componentType, and propertyName. Provide value for basic types, vectors, colors, and enums, or assetReferencePath for object references like materials and audio clips, optionally targeting a child object via gameObjectName.

How do I apply prefab instance changes back to the prefab asset?

Use prefab_apply with the instance name, instanceId, or path to push instance changes to the source prefab. To apply only recorded overrides use prefab_apply_overrides, and to discard them use prefab_revert_overrides.

Can I find all instances of a prefab in a Unity scene?

Yes, prefab_find_instances searches the current scene for all instances of a given prefabPath and returns their names, hierarchy paths, and instanceIds. The limit parameter defaults to 50 results.

What is the difference between prefab_unpack and prefab_apply?

prefab_apply pushes instance changes into the source prefab asset, keeping the prefab connection. prefab_unpack breaks the prefab connection entirely, optionally unpacking nested prefabs when completely is set to true.