assets-prefab-create

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

Updated May 28, 2026
One-click install
npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill assets-prefab-create-ishaansingh-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assets-prefab-create
Source: https://github.com/ishaansingh-ai/Mechanical-2D/tree/main/.claude/skills/assets-prefab-create
Command: npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill assets-prefab-create-ishaansingh-ai

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 found 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 Lookup: Locates targets by instanceID, hierarchy path, name, asset path, or GUID. - Use Case: After assembling a character hierarchy in the scene, save it as 'Assets/Prefabs/Character.prefab' and replace the scene instance in one command. ## Quick Start Ask the AI to create a prefab at Assets/Prefabs/MyObject.prefab from the GameObject named MyObject in the current scene.

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 using the command line?▼

Run unity-mcp-cli with the assets-prefab-create tool, providing a prefabAssetPath like 'Assets/Prefabs/MyPrefab.prefab' and a gameObjectRef identifying the target GameObject. The tool saves the prefab asset and returns a reference to it.

How do I find the GameObject to turn into a prefab?▼

Use the gameobject-find tool first to locate the target, as recommended in the Skill documentation. You can reference GameObjects by instanceID, hierarchy path, name, asset path, or asset GUID, with instanceID being the recommended priority.

Can the prefab replace the original GameObject in the scene?▼

Yes, set the replaceGameObjectWithPrefab parameter to true. The newly created prefab will then replace the source GameObject in the active scene instead of leaving the original in place.

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

Install it globally with npm install -g unity-mcp-cli, or invoke it through npx unity-mcp-cli. The unity-initial-setup skill contains 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 for this tool.