unity-script

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

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-script-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-script
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/script
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-script-pcone-mm

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 error checking so you can iterate on gameplay code without manual file manipulation. ## 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 create 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 patterns, and retrieve compile diagnostics for any script after Unity finishes recompiling. - Use Case: When scaffolding a new feature, batch-create a PlayerController, EnemyAI, and GameSettings ScriptableObject in one call, wait for the Domain Reload, then check compile feedback and fix any reported errors. ## 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 to find and replace code across Unity C# scripts?

Use script_replace with the script path, find text, and replacement text, optionally enabling regex matching. To search across many scripts first, use script_find_in_file with a pattern and folder to locate matches before editing.

What script templates are supported for Unity script creation?

Four templates are supported: MonoBehaviour, ScriptableObject, Editor, and EditorWindow. The scriptName parameter must not include the .cs extension, and an optional namespace can be specified.

Why do Unity script edits trigger a Domain Reload?

Creating, replacing, appending, or deleting scripts causes Unity to recompile, triggering a Domain Reload. Batch operations minimize reloads, and you should call script_get_compile_feedback after Unity finishes compiling to check for errors.

Can I rename or move Unity scripts without breaking references?

Yes, script_rename and script_move handle file renaming and folder relocation through Unity's asset system, with optional compile checking afterward. The destination folder for script_move must already exist.