assets-prefab-create

Create Unity prefabs and prefab variants from scene GameObjects or existing prefab assets.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/PMK95/GridSquad --skill assets-prefab-create-pmk95
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assets-prefab-create
Source: https://github.com/PMK95/GridSquad/tree/main/GridSquadUnity/.agents/skills/assets-prefab-create
Command: npx skills add https://github.com/PMK95/GridSquad --skill assets-prefab-create-pmk95

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Manually creating prefabs in Unity requires repetitive editor interactions, and automating this through scripts demands boilerplate code. This Skill lets you create prefabs or prefab variants at any asset path directly through a single CLI command, including automatic folder creation. ## Core Features & Use Cases - Prefab Creation from Scene Objects: Convert any GameObject in the active scene into a prefab asset saved under the Assets folder. - Prefab Variant Support: Create prefab variants either from a scene GameObject that is already a prefab instance or directly from an existing prefab asset path. - Automatic Folder Generation: Intermediate directories along the target asset path are created automatically if they do not exist. - Use Case: While building a level, you locate an enemy GameObject with 'gameobject-find', then save it as 'Assets/Prefabs/Enemies/Goblin.prefab' connected as a prefab instance, all in one command. ## Quick Start Ask the AI to create a prefab at Assets/Prefabs/MyObject.prefab from a scene GameObject found with the gameobject-find tool.

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 via CLI?▼

Run unity-mcp-cli with the assets-prefab-create tool, providing prefabAssetPath and a gameObjectRef identifying the scene GameObject. Use the gameobject-find tool first to locate the target GameObject and obtain its reference.

How to create a prefab variant from an existing prefab asset in Unity?▼

Provide sourcePrefabAssetPath pointing to the base prefab, such as Assets/Prefabs/Base.prefab, along with the target prefabAssetPath. The tool instantiates a temporary copy, saves it as a prefab variant, and cleans up automatically.

Can I use gameObjectRef and sourcePrefabAssetPath together?▼

No, these two inputs are mutually exclusive sources. Use gameObjectRef to convert a scene GameObject, or sourcePrefabAssetPath to derive a variant from an existing prefab asset, but never both in one call.

What happens if the prefab folder path does not exist in Unity?▼

The tool creates all intermediate folders along the prefabAssetPath automatically. You only need to ensure the path starts with Assets/ and ends with the .prefab extension.

Why is unity-mcp-cli not found when running the command?▼

The CLI is not installed globally. Install it with npm install -g unity-mcp-cli, or invoke it through npx unity-mcp-cli instead, as described in the unity-initial-setup skill.