unity-skill-create

Creates Unity MCP tool skills as C# partial classes compiled by the Unity Editor.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Extending a Unity MCP server with new AI-callable tools normally requires hand-writing boilerplate C# plugin code, respecting main-thread constraints, and handling domain reloads correctly. This Skill generates and installs a properly structured C# tool file that Unity compiles into a usable skill. ## Core Features & Use Cases - C# Tool Generation: Produces a partial class decorated with [McpPluginToolType] and [McpPluginTool] attributes, with the class name matching the file name. - Threading & Lifecycle Guidance: Enforces MainThread.Instance.Run() for all Unity API calls and provides processing/notification patterns for long-running operations and domain reloads. - Structured Output Support: Supports typed response models via ResponseCallValueTool<T> with [Description] annotations for AI-parseable results. - Use Case: Ask the AI to add a tool that renames GameObjects in your scene; it writes a Tool_Rename.cs file under Assets/Skills, Unity recompiles, and the new tool becomes callable through unity-mcp-cli. ## Quick Start Create a new Unity skill at Assets/Skills/Tool_MyTool.cs that finds a GameObject by name and returns its reference data.

Frequently Asked Questions about unity-skill-create

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

FAQPage Schema
How do I create a custom Unity MCP tool in C#?

Create a partial class decorated with [McpPluginToolType] and mark each tool method with [McpPluginTool]. Save it as a .cs file whose name matches the class name, and Unity compiles it into an available skill after recompilation.

How to call Unity API methods from an MCP tool method?

All Unity API calls such as GameObject.Find or AssetDatabase must run on the main thread. Wrap them in MainThread.Instance.Run(() => { ... }) for synchronous work or MainThread.Instance.RunAsync for operations requiring await.

Where should I place the generated .cs file when using asmdef files?

Place the script inside a folder covered by an assembly definition that already references com.IvanMurzak.McpPlugin, UnityEditor, and UnityEngine. Inspect existing .asmdef files first, since the wrong assembly causes missing-reference compile errors.

How do I handle long-running Unity operations like script compilation?

Accept a [RequestID] string parameter, return ResponseCallTool.Processing immediately, and schedule work via MainThread.Instance.RunAsync. Use ScriptUtils.SchedulePostCompilationNotification so the result is delivered after the domain reload completes.

Why is my Unity tool result not visible in the Editor UI?

Visual changes require explicit UI refresh. Call AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport) and EditorUtils.RepaintAllEditorWindows() at the end of the tool method to apply changes immediately.