unity-script

Create, read, edit, and analyze C# scripts in Unity projects.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-script-ethanjpope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script
Source: https://github.com/ethanJPope/Our-Main-Hackathon-Game/tree/main/.agents/skills/unity-skills/skills/script
Command: npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-script-ethanjpope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing C# scripts in a Unity project involves repetitive file operations, compile-error checking, and careful handling of Domain Reloads; this Skill automates script creation, editing, searching, and compile feedback through structured API calls. ## Core Features & Use Cases - Script Lifecycle Management: Create scripts from MonoBehaviour, ScriptableObject, Editor, or EditorWindow templates, then rename, move, append, replace, or delete them, with batch creation to minimize Domain Reloads. - Search and Inspection: Read script content, list scripts by folder, search with plain text or regex, and extract class name, base class, and public methods via script_get_info. - Compile Feedback: Retrieve compile diagnostics per script after Unity finishes recompiling, so errors from edits are caught and fixed immediately. - Use Case: Scaffold a gameplay feature by batch-creating PlayerController, EnemyAI, and GameSettings scripts in one call, wait for a single Domain Reload, then verify compilation with script_get_compile_feedback. ## 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 from a template?

Call script_create with a scriptName, optional folder, and a template of MonoBehaviour, ScriptableObject, Editor, or EditorWindow. For two or more scripts, use script_create_batch to trigger only one Domain Reload instead of one per file.

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

Call script_get_compile_feedback with the script path after Unity finishes compiling. If the creation response shows isCompiling as true, wait for the Domain Reload to complete before requesting diagnostics.

How do I find and replace text across a Unity C# script?

Use script_replace with the scriptPath, find text, and replacement text, optionally enabling regex matching. For searching across many files without modifying them, use script_find_in_file with a folder scope and result limit.

Why does script_create return MODE_FORBIDDEN in Unity?

All seven write-type script skills are marked high risk because saving .cs files triggers a Domain Reload, so they are blocked in Approval and Auto modes. They only execute under Bypass mode or when the operation matches an allowlist entry.

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 or path separators, or the call fails with a semantic validation error.