unity-script

Create, read, search, and refactor C# scripts in Unity projects.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-script-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/script
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-script-pikachu0310

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 so you avoid manual file manipulation and reduce unnecessary recompilations. ## Core Features & Use Cases - Script Lifecycle Management: Create scripts from MonoBehaviour, ScriptableObject, Editor, or EditorWindow templates, then rename, move, append, replace, or delete them. - Batch Creation: Use script_create_batch to create multiple scripts in one call, triggering only a single Domain Reload instead of one per file. - Search and Compile Feedback: Find patterns across scripts with plain text or regex, read class structure info, 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 one recompile, then check compile feedback before attaching components. ## Quick Start Create a new MonoBehaviour C# script named PlayerController in Assets/Scripts/Player and check that it compiles without errors.

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?

Use script_create with a scriptName, target folder, and a template type such as MonoBehaviour, ScriptableObject, Editor, or EditorWindow. The script name must not include the .cs extension, and compilation is checked automatically after creation.

How do I create multiple Unity scripts at once?

Use script_create_batch with an items array containing each script's name, folder, and template. Batch creation performs one API call and triggers only a single Domain Reload, which is much faster than creating scripts one by one.

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

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

Why do Unity script write operations return MODE_FORBIDDEN?

All seven write-type skills are marked high risk because saving .cs files triggers a Domain Reload, and script_delete is a delete operation. They are blocked in Approval and Auto modes and only run under Bypass mode or an explicit allowlist entry.

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

Yes, script_find_in_file searches for a plain-text or regex pattern across scripts under a chosen folder, defaulting to Assets. It returns matching files, line numbers, and line content up to a configurable result limit.