script-delete

Deletes Unity script files and waits for compilation to complete.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill script-delete-ishaansingh-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: script-delete
Source: https://github.com/ishaansingh-ai/Mechanical-2D/tree/main/.claude/skills/script-delete
Command: npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill script-delete-ishaansingh-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Removing obsolete C# scripts from a Unity project manually requires deleting files and then waiting for the editor to recompile before you know the project state is clean. This Skill deletes script files through the Unity MCP CLI, triggers AssetDatabase.Refresh(), and blocks until Unity compilation finishes so you get a confirmed result. ## Core Features & Use Cases - Script File Deletion: Delete one or more C# script files by path (e.g., "Assets/Scripts/MyScript.cs") via the unity-mcp-cli run-tool command. - Compilation Synchronization: Automatically refreshes the AssetDatabase and waits for Unity compilation to complete before reporting results. - Use Case: While refactoring a Unity project, you identify three deprecated controller scripts. Pass their paths to this Skill to remove them and confirm the project still compiles cleanly afterward. ## Quick Start Delete the file Assets/Scripts/OldPlayerController.cs from my Unity project and confirm the project compiles after removal.

Frequently Asked Questions about script-delete

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

FAQPage Schema
How do I delete a C# script from a Unity project using the command line?▼

Run unity-mcp-cli run-tool script-delete with a JSON input containing the files array, for example {"files": ["Assets/Scripts/MyScript.cs"]}. The tool deletes the files, refreshes the AssetDatabase, and waits for Unity compilation to complete.

How do I delete multiple Unity script files at once?▼

Pass multiple paths in the files array of the JSON input, such as {"files": ["Assets/Scripts/A.cs", "Assets/Scripts/B.cs"]}. All listed files are deleted in a single call before compilation is verified.

Does script-delete verify the Unity project still compiles after deletion?▼

Yes. After deleting the files, the tool calls AssetDatabase.Refresh() and waits for Unity compilation to complete before reporting results, so you know the project state after removal.

What should I do before deleting a Unity script file?▼

Read the existing script first using the script-read tool to confirm its contents, as recommended in the Skill documentation. This prevents accidentally removing the wrong file during refactoring.

Why is unity-mcp-cli not found when running script-delete?▼

The CLI is not installed globally. Install it with npm install -g unity-mcp-cli or prefix commands with npx unity-mcp-cli. The unity-initial-setup skill covers detailed installation steps.