assets-prefab-create

Creates a Unity prefab asset from a GameObject in the active scene.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment --skill assets-prefab-create-fermisloth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: assets-prefab-create
Source: https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment/tree/main/.agent/skills/assets-prefab-create
Command: npx skills add https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment --skill assets-prefab-create-fermisloth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Manually creating prefabs in Unity requires repetitive editor interactions; this Skill automates converting a GameObject from the active scene into a reusable prefab asset saved at a specified project path. ## Core Features & Use Cases - Prefab Creation from Scene GameObjects: Converts any GameObject in the active scene or an opened prefab into a prefab asset saved under the Assets folder. - Optional Scene Replacement: Can replace the original GameObject in the scene with the newly created prefab instance via the replaceGameObjectWithPrefab flag. - Flexible GameObject Targeting: Locates the source GameObject by instanceID, hierarchy path, name, or asset reference. - Use Case: While building a Unity level, you configure an enemy character in the scene and want to reuse it. Invoke this Skill to save it as 'Assets/Prefabs/Enemy.prefab' and replace the scene instance with the prefab. ## Quick Start Use the assets-prefab-create tool to save the GameObject named 'Enemy' from the active scene as a prefab at Assets/Prefabs/Enemy.prefab.

Frequently Asked Questions about assets-prefab-create

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

FAQPage Schema
How do I create a prefab from a GameObject in Unity programmatically?

Use the assets-prefab-create tool via unity-mcp-cli, providing a prefabAssetPath like 'Assets/Prefabs/MyPrefab.prefab' and a gameObjectRef identifying the source GameObject. The tool saves the prefab asset and returns an AssetObjectRef.

How do I find the GameObject to convert into a prefab?

Use the gameobject-find tool first to locate the target GameObject, then reference it by instanceID, hierarchy path, or name in the gameObjectRef parameter. InstanceID is the recommended priority for identification.

Can I replace the scene GameObject with the new prefab instance?

Yes, set the replaceGameObjectWithPrefab parameter to true. The original GameObject in the scene will be replaced by an instance of the newly created prefab asset.

What should I do if unity-mcp-cli is not found?

Install it globally with 'npm install -g unity-mcp-cli' or run it via 'npx unity-mcp-cli'. Refer to the unity-initial-setup skill for detailed installation instructions.

What format must the prefab asset path use?

The prefabAssetPath must start with 'Assets/' and end with the '.prefab' extension, for example 'Assets/Path/To/Prefab.prefab'. Paths outside the Assets folder are not valid targets.