script-update-or-create

Update or create C# script files and refresh Unity's AssetDatabase.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lunafish/Game00 --skill script-update-or-create
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-update-or-create
Source: https://github.com/lunafish/Game00/tree/main/SKILLS/script-update-or-create
Command: npx skills add https://github.com/lunafish/Game00 --skill script-update-or-create

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of managing script files by allowing you to update existing ones or create new ones with provided C# code. It also ensures the Unity AssetDatabase is refreshed and provides feedback on compilation errors.

Core Features & Use Cases

  • Script Creation: Generate new C# script files with specified content.
  • Script Updates: Modify existing C# script files with new code.
  • Asset Refresh: Automatically calls AssetDatabase.Refresh() after modifications.
  • Error Reporting: Provides details on compilation errors for syntax issues.
  • Use Case: When developing a Unity game, you can use this Skill to quickly create a new player controller script or update an existing enemy AI script without leaving your development environment.

Quick Start

Update the script file at 'Assets/Scripts/PlayerController.cs' with the new C# code provided.

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 create a new C# script file in Unity automatically?

To create a C# script file in Unity automatically, you provide the valid file path and C# content. The tool writes the new script and automatically calls AssetDatabase.Refresh to update the Unity project.

How do I update an existing Unity C# script with new code?

You update an existing Unity C# script by providing its valid file path and the new C# content. The tool overwrites the file and triggers an AssetDatabase.Refresh to apply the modifications.

Why does my Unity script show a compilation error after updating?

Unity script compilation errors occur if the provided C# content has syntax issues. The tool reports these errors by detailing the specific syntax problems found during the compilation process.

Can I use this to generate Unity game scripts without leaving my development environment?

Yes, you can generate Unity game scripts without leaving your environment. Providing valid file paths and C# content allows the tool to create or update scripts and refresh the AssetDatabase directly.

What happens if the file path is invalid when creating a Unity script?

Creating a Unity script requires valid file paths to operate successfully. If the path is invalid, the tool cannot write the C# content or perform the AssetDatabase.Refresh as intended.

Does the AssetDatabase need a manual refresh after script updates?

No, a manual AssetDatabase refresh is not needed after script updates. The tool automatically calls AssetDatabase.Refresh once the C# script creation or modification is complete.