script-delete

Deletes C# script files from a Unity project and waits for recompilation to finish.

Updated May 27, 2026
One-click install
npx skills add https://github.com/AdielMag/ClashUp --skill script-delete-adielmag
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: script-delete
Source: https://github.com/AdielMag/ClashUp/tree/main/client/ClashUp.Unity/.claude/skills/script-delete
Command: npx skills add https://github.com/AdielMag/ClashUp --skill script-delete-adielmag

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Removing C# scripts from a Unity project manually requires deleting both the .cs file and its .meta sibling, then waiting for the editor to recompile before knowing whether the project is still in a valid state. This Skill automates that sequence and reports the result only after Unity finishes compiling. ## Core Features & Use Cases - Validated Batch Deletion: Accepts a non-empty array of .cs paths, verifying every entry exists on disk and ends with .cs before deleting anything. - Meta File Cleanup: Removes each script's sibling .meta file when present, keeping the Unity asset database consistent. - Compilation-Aware Response: Calls AssetDatabase.Refresh and delivers the final result only after Unity completes the recompile triggered by the deletion. - Use Case: While refactoring a Unity gameplay feature, delete several obsolete MonoBehaviour scripts in one call and receive confirmation only after the project compiles cleanly. ## Quick Start Ask the assistant to delete the files Assets/Scripts/OldPlayer.cs and Assets/Scripts/OldEnemy.cs from the Unity project and confirm once compilation finishes.

Frequently Asked Questions about script-delete

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

FAQPage Schema
How do I delete C# scripts from a Unity project programmatically?▼

Use the script-delete tool with a files array containing the .cs paths, such as Assets/Scripts/MyScript.cs. It deletes each file plus its .meta sibling, refreshes the AssetDatabase, and reports after Unity recompiles.

How to remove a Unity script and its .meta file together?▼

Pass the script path to script-delete and it automatically removes the sibling .meta file when present. This keeps the Unity asset database consistent without manual cleanup of orphaned meta files.

Does script-delete wait for Unity compilation to finish?▼

Yes, the tool calls AssetDatabase.Refresh and schedules a post-compilation notification. The final response is delivered only after Unity finishes the recompile triggered by the deletion.

What happens if a file in the deletion list does not exist?▼

The tool validates the input array before deleting anything, requiring every entry to end with .cs and exist on disk. If validation fails, the deletion does not proceed.

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

The unity-mcp-cli package must be installed globally with npm install -g unity-mcp-cli, or invoked via npx unity-mcp-cli. Check the unity-initial-setup skill for detailed installation instructions.