unity-script

Create, edit, search, and analyze C# scripts in Unity projects with compile feedback.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-script-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/script
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-script-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing C# scripts in a Unity project involves repetitive file operations and slow compile-check cycles. This Skill automates script creation, editing, searching, refactoring, and compile diagnostics so you can write and validate Unity code without manual file juggling. ## Core Features & Use Cases - Script Lifecycle Management: Create scripts from MonoBehaviour, ScriptableObject, Editor, or EditorWindow templates, then read, replace, append, rename, move, or delete them programmatically. - Batch Creation: Use script_create_batch to generate multiple scripts in one call, triggering only a single Unity Domain Reload instead of one per file. - Search & Compile Feedback: Search across scripts with plain text or regex, inspect class structure (base class, methods, fields), and retrieve compile diagnostics after edits. - Use Case: When scaffolding a new gameplay feature, batch-create PlayerController, EnemyAI, and GameSettings scripts in one call, wait for recompilation, then check compile feedback before attaching components. ## Quick Start Ask the AI to create a new MonoBehaviour C# script named PlayerController in Assets/Scripts/Player and check for compile errors afterward.

Frequently Asked Questions about unity-script

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

FAQPage Schema
How do I create a C# script in Unity programmatically?

Use script_create with a scriptName, target folder, and template type such as MonoBehaviour or ScriptableObject. For two or more scripts, use script_create_batch to create them all in one call with a single Domain Reload.

How do I check Unity compile errors after editing a script?

Call script_get_compile_feedback with the script path after Unity finishes recompiling. It returns up to a configurable number of diagnostics related to that script, which you can then fix with script_replace.

Can I search across all C# scripts in a Unity project?

Yes, script_find_in_file searches for plain text or regex patterns across scripts in a chosen folder, returning matching file paths, line numbers, and content. The default search scope is the Assets folder with a 50-result limit.

What script templates are supported for Unity script creation?

Only four templates are accepted: MonoBehaviour, ScriptableObject, Editor, and EditorWindow. The scriptName parameter must not include the .cs extension, and there is no script_edit or script_write command.

Why does creating a Unity script trigger a Domain Reload?

Unity recompiles all scripts whenever files are created, replaced, appended, or deleted, causing a Domain Reload. Batch creation minimizes this by combining multiple script creations into one reload cycle.

When should I use script_replace versus script_append?

Use script_replace for find-and-replace modifications of existing content, with optional regex and automatic compile checking. Use script_append only to add new lines at the end of a file or at a specific line number.