unity-script

Create, read, replace, and analyze Unity C# scripts with compile validation.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/muddyrain/valley-mas --skill unity-script-muddyrain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script
Source: https://github.com/muddyrain/valley-mas/tree/main/.codex/skills/unity-skills/skills/script
Command: npx skills add https://github.com/muddyrain/valley-mas --skill unity-script-muddyrain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity game development often requires creating, inspecting, updating, and analyzing C# scripts quickly. This Skill centralizes the lifecycle of Unity scripts—creation, reading, replacing, and analysis—so engineers can maintain consistency and accelerate prototyping within Unity projects.

Core Features & Use Cases

  • Create: generate new scripts from templates (MonoBehaviour, ScriptableObject, Editor, EditorWindow) with optional namespace and save folder.
  • Read & Analyze: read script contents and metadata for refactoring, auditing, or API surface exploration.
  • Replace & Validate: perform safe find/replace with immediate compile validation to respect Unity's Domain Reload cycle.
  • Use Case: scaffold a PlayerController, diagnose a failing script, or batch-update multiple assets while verifying compilation status.

Quick Start

Create a new Unity C# script named PlayerController using the MonoBehaviour template and ensure it compiles.

Frequently Asked Questions about unity-script

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

FAQPage Schema
How do I generate a new MonoBehaviour script in Unity with a specific namespace?

To generate a Unity C# MonoBehaviour script with a specific namespace, use a script generation tool that applies templates with optional namespace and save folder parameters. This ensures consistent script scaffolding across Unity projects.

Can I batch update multiple Unity scripts and verify compile feedback?

Yes, batch updating Unity C# scripts is possible alongside compile feedback verification. The process performs safe find and replace operations on multiple assets, then runs immediate compile validation to respect Unity's Domain Reload cycle.

What Unity C# script templates are available for code generation?

Available Unity C# script templates include MonoBehaviour, ScriptableObject, Editor, and EditorWindow. These templates support deterministic code generation with configurable parameters like script name, folder, namespace, and template type.

How do I safely replace code in a Unity C# script without breaking compilation?

Safe replacement in Unity C# scripts requires performing find and replace operations followed by immediate compile validation. This approach checks compilation status after modifications, preventing broken scripts during Unity's Domain Reload.

Does this Unity script management approach work with ScriptableObject templates?

Yes, Unity script management supports ScriptableObject templates alongside MonoBehaviour and Editor templates. You can create, read, and analyze ScriptableObject scripts with configurable namespace and folder parameters for organized project structures.

Why does Unity script replacement require compile validation after modifications?

Unity script replacement requires compile validation because Unity's Domain Reload cycle triggers recompilation after script changes. Immediate compile feedback after find and replace operations ensures modifications do not introduce compilation errors into the project.