script-update-or-create

Create or update Unity C# scripts with Roslyn syntax validation.

Updated Aug 26, 2025
One-click install
npx skills add https://github.com/infotechsrealm/PanicAtThePond --skill script-update-or-create-infotechsrealm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-update-or-create
Source: https://github.com/infotechsrealm/PanicAtThePond/tree/main/.claude/skills/script-update-or-create
Command: npx skills add https://github.com/infotechsrealm/PanicAtThePond --skill script-update-or-create-infotechsrealm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the creation or updating of C# script files in Unity, ensuring code validity with Roslyn syntax checking before writing to files.

Core Features & Use Cases

  • Script Creation/Update: Writes or overwrites .cs files with provided C# code.
  • Syntax Validation: Validates code using Roslyn before writing to prevent syntax errors.
  • AssetDatabase Refresh: Refreshes the AssetDatabase after writing, ensuring all changes are applied.
  • Post-Compilation Notification: Delivers the final result after Unity recompiles, providing a reliable feedback loop.
  • Use Case: For Unity developers who need to quickly create or update script files with confidence that they will compile correctly.

Quick Start

Use the 'script-update-or-create' skill to write a new script to 'Assets/Scripts/MyScript.cs' with the following C# code.

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 automate C# script creation in Unity and ensure it compiles?

Automating C# script creation in Unity requires writing the file and validating syntax before saving. This Skill checks code using Roslyn, writes the .cs file, and refreshes the AssetDatabase to apply changes.

What is the best way to update Unity scripts without breaking compilation?

The best way to update Unity scripts without breaking compilation is validating C# syntax before writing. This Skill uses Roslyn to check code, overwrites the file, and triggers a post-compilation notification for feedback.

Does Unity AssetDatabase refresh automatically after writing a new C# file?

The AssetDatabase does refresh automatically after writing a new C# file using this Skill. It forces a refresh to ensure changes are applied, then delivers a post-compilation notification once recompilation finishes.

How does Roslyn syntax validation work when generating Unity C# scripts?

Roslyn syntax validation checks generated Unity C# scripts before they are written to disk. This prevents saving files with syntax errors, ensuring the Unity AssetDatabase only imports valid code for compilation.

Can I overwrite existing Unity C# files and still get post-compilation feedback?

You can overwrite existing Unity C# files and get post-compilation feedback with this Skill. It updates the file, refreshes the AssetDatabase, and delivers a notification after Unity finishes recompiling the new code.