unity-skill-create

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Extending a Unity MCP server with new AI-callable tools normally requires hand-writing boilerplate C# code with correct attributes, threading rules, and assembly placement. This Skill generates and installs that code as a .cs file that Unity compiles automatically. ## Core Features & Use Cases - C# Tool Generation: Produces partial classes decorated with [McpPluginToolType] and [McpPluginTool] following the Unity MCP plugin conventions. - Threading & Lifecycle Guidance: Enforces MainThread wrapping for Unity API calls and supports async processing patterns for long-running operations and domain reloads. - Structured Output Support: Returns typed data models via ResponseCallValueTool<T> so AI agents receive parseable results. - Use Case: Ask the AI to add a tool that renames GameObjects in your scene; the Skill writes the .cs file into the correct assembly folder, Unity recompiles, and the new tool becomes callable through the MCP server. ## Quick Start Create a new Unity MCP skill that finds a GameObject by name and returns its instance ID, placing the script under Assets/Skills.

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]. Wrap all Unity API calls in MainThread.Instance.Run() and return a data model for structured output or void for side effects.

How to run Unity API calls from an MCP tool without threading errors?▼

All Unity API calls must execute on the main thread via MainThread.Instance.Run() for synchronous work or MainThread.Instance.RunAsync() when awaiting. Calling Unity APIs directly from the tool thread causes errors.

Where should I place the .cs file when my Unity project uses 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 in a tool?▼

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

Why is my new Unity MCP tool not appearing after the file is created?▼

The tool only becomes available after Unity finishes compiling the new .cs file. If compilation fails due to wrong assembly placement or missing references, the tool never registers, so check the Unity Console for errors.