script-update-or-create

Creates or updates Unity C# script files and reports compilation errors.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment --skill script-update-or-create-fermisloth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-update-or-create
Source: https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment/tree/main/.agent/skills/script-update-or-create
Command: npx skills add https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment --skill script-update-or-create-fermisloth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Editing Unity C# scripts from an AI assistant normally requires manual file handling and gives no feedback on whether the code compiles. This Skill writes C# code directly to a script file in the Unity project, triggers an AssetDatabase refresh, and returns compilation error details when the code has syntax problems. ## Core Features & Use Cases - Create or Update Scripts: Write new C# files or overwrite existing ones at any path under the Unity project, such as Assets/Scripts/MyScript.cs. - Automatic Asset Refresh: Runs AssetDatabase.Refresh() after writing so Unity immediately picks up the changes. - Compilation Feedback: Returns syntax error details so broken code can be fixed iteratively without opening the Unity Editor. - Use Case: While building a gameplay feature, ask the assistant to generate a PlayerController.cs file; the Skill writes it into Assets/Scripts and reports any compile errors for immediate correction. ## Quick Start Use the script-update-or-create tool to write my C# code into Assets/Scripts/PlayerController.cs and tell me if it compiles.

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 C# script in Unity from the command line?

Run unity-mcp-cli with the script-update-or-create tool, passing a filePath like Assets/Scripts/MyScript.cs and the full C# content as a JSON string. The tool writes the file and refreshes the Unity AssetDatabase automatically.

How do I pass multi-line C# code to unity-mcp-cli?

Save the JSON payload with filePath and content to a file and use --input-file args.json, or pipe it via stdin using a heredoc. This avoids shell escaping issues with multi-line code strings.

Does script-update-or-create check for C# syntax errors?

Yes, after writing the file it triggers a Unity asset refresh and returns compilation error details if the code has syntax problems. This lets you fix errors iteratively without opening the Unity Editor.

What should I do before updating an existing Unity script?

Read the existing file first with the script-read tool so you preserve current logic and only modify what is needed. Then call script-update-or-create with the complete updated file content.

Why is unity-mcp-cli not found when running the command?

The CLI is either not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli, or prefix commands with npx unity-mcp-cli as an alternative.