assets-prefab-create

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

Updated May 27, 2026
One-click install
npx skills add https://github.com/AdielMag/ClashUp --skill assets-prefab-create-adielmag
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assets-prefab-create
Source: https://github.com/AdielMag/ClashUp/tree/main/client/ClashUp.Unity/.claude/skills/assets-prefab-create
Command: npx skills add https://github.com/AdielMag/ClashUp --skill assets-prefab-create-adielmag

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Manually creating prefabs in the Unity Editor requires repetitive drag-and-drop work, and automating it from an AI assistant or CLI is not possible without a bridge into the Editor. This Skill exposes prefab creation as a callable tool through the unity-mcp-cli, letting you convert scene GameObjects into prefab assets or derive Prefab Variants from existing prefabs programmatically. ## Core Features & Use Cases - Prefab Creation from Scene Objects: Convert any GameObject in the active scene into a prefab asset saved at a specified Assets/ path, optionally connecting the scene object to the new prefab as an instance. - Prefab Variant Support: Create a Prefab Variant either from a scene GameObject that is already a prefab instance, or directly from an existing prefab asset via sourcePrefabAssetPath. - Automatic Folder Creation: Intermediate folders along the target asset path are created recursively if they do not exist. - Use Case: While building a level, you locate an enemy GameObject with gameobject-find, then call this Skill to save it as Assets/Prefabs/Enemies/Grunt.prefab and immediately create a GruntElite variant from it for a harder encounter. ## Quick Start Ask the AI to create a prefab at Assets/Prefabs/Player.prefab from the Player GameObject in the current scene using the assets-prefab-create 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 programmatically?▼

Call the assets-prefab-create tool with a prefabAssetPath like Assets/Prefabs/MyObject.prefab and a gameObjectRef pointing to the scene GameObject. The tool saves the prefab asset and optionally connects the scene object to it as a prefab instance.

How to create a Prefab Variant in Unity from an existing prefab?▼

Provide sourcePrefabAssetPath pointing to the base prefab asset, such as Assets/Prefabs/Base.prefab, along with the new prefabAssetPath. The tool instantiates a temporary copy, saves it as a Prefab Variant, and cleans up the temporary instance.

What is the difference between gameObjectRef and sourcePrefabAssetPath?▼

gameObjectRef references a GameObject in the active scene and is used to create a new prefab or a variant from a prefab instance. sourcePrefabAssetPath references an existing prefab asset on disk and always produces a Prefab Variant. The two parameters are mutually exclusive.

Does the prefab path need to exist before creating a prefab?▼

No, intermediate folders along prefabAssetPath are created recursively if they do not exist. The path must start with Assets/ and end with the .prefab extension.

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

The CLI is either not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli, or invoke it through npx unity-mcp-cli, and check the unity-initial-setup skill for full installation steps.