script-update-or-create

Write validated C# scripts and refresh Unity's AssetDatabase.

Updated May 3, 2026
One-click install
npx skills add https://github.com/RakameNouya/MR-Bab_10_and_Kel_3 --skill script-update-or-create-rakamenouya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-update-or-create
Source: https://github.com/RakameNouya/MR-Bab_10_and_Kel_3/tree/main/.gemini/skills/script-update-or-create
Command: npx skills add https://github.com/RakameNouya/MR-Bab_10_and_Kel_3 --skill script-update-or-create-rakamenouya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the creation or modification of .cs script files by safely writing them after validation using the Roslyn compiler. It ensures that only syntactically correct code is used in Unity projects, and automates refreshing the AssetDatabase upon write completion.

Core Features & Use Cases

  • Code Validation: Utilizes Roslyn to validate C# code syntax, providing immediate feedback on syntax errors.
  • File Handling: Creates or overwrites files based on provided input, refreshing the AssetDatabase upon completion.
  • Integration with Unity: Ideal for use within Unity development, ensuring compatibility with AssetDatabase refresh.
  • Use Case: Before deploying new script assets, run this skill to update or create your C# scripts, automatically handle parent directory creation, and ensure Unity's AssetDatabase reflects these changes after script execution.

Quick Start

Run 'script-update-or-create' to create a new C# script at the path specified, including valid code in C#.

Frequently Asked Questions about script-update-or-create

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

FAQPage Schema
How do I safely create or overwrite C# scripts in Unity without breaking compilation?

To safely create or overwrite C# scripts in Unity, validate the syntax using the Roslyn compiler before writing the file. This ensures only syntactically correct code is saved, preventing project compilation breaks.

Does writing a new .cs file automatically refresh the Unity AssetDatabase?

Yes, writing a new .cs file can automatically refresh the Unity AssetDatabase. After successfully validating and writing the script, a refresh is scheduled to ensure the Unity Editor recognizes the new asset.

What is the best way to validate C# syntax before adding a script to my Unity project?

The best way to validate C# syntax before adding a script to your Unity project is using the Roslyn compiler. It provides immediate feedback on syntax errors before the file is written or overwritten.

Can I automatically create parent directories when generating Unity C# scripts?

Yes, you can automatically create parent directories when generating Unity C# scripts. The process handles directory creation automatically before writing the validated .cs file to the specified path.

Do I need a Unity Editor environment to run C# script validation and file generation tools?

Yes, you need a Unity Editor environment to run C# script validation and file generation tools. The process relies on Unity's AssetDatabase for post-compilation operations and asset refreshing.