assets-prefab-close

Closes the currently open prefab in Unity Editor prefab editing mode.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? When automating Unity Editor workflows through the MCP CLI, you need a programmatic way to exit prefab editing mode after making changes, either saving or discarding them, without manual interaction with the editor UI. ## Core Features & Use Cases - Close Prefab Mode: Exits the currently active prefab editing session in the Unity Editor. - Save or Discard Control: The optional save boolean parameter lets you choose whether changes are persisted or discarded. - Use Case: After opening a prefab with the assets-prefab-open tool and modifying its components via other MCP tools, call this tool with "save": true to commit the changes and return to normal scene editing. ## Quick Start Ask the AI to close the currently open prefab in Unity and save the changes using the assets-prefab-close tool.

Frequently Asked Questions about assets-prefab-close

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

FAQPage Schema
How do I close a prefab in Unity Editor from the command line?▼

Run unity-mcp-cli run-tool assets-prefab-close with a JSON input containing the save parameter. Set save to true to persist changes or false to discard them before exiting prefab editing mode.

How do I save prefab changes when closing prefab mode in Unity?▼

Pass {"save": true} as the input JSON to the assets-prefab-close tool. The tool returns an AssetObjectRef pointing to the prefab asset after saving and closing.

What happens if I close a prefab without saving in Unity MCP?▼

Setting the save parameter to false discards all modifications made during the prefab editing session. The prefab asset on disk remains unchanged from its state before it was opened.

Why does assets-prefab-close fail when no prefab is open?▼

The tool requires an active prefab editing session in the Unity Editor. Open a prefab first using the assets-prefab-open tool before attempting to close it.

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

Install it globally with npm install -g unity-mcp-cli, or prefix commands with npx. The unity-initial-setup skill contains detailed installation instructions.