Skip to content
cccskills
FreePublished on GitHub

script-delete

Delete one or more Unity C# script files and their accompanying .meta files when present. Refresh the asset database, then wait for Unity to finish recompiling before delivering the final result.

OriginalShow the original description

Delete one or more `.cs` script files from disk, refresh the AssetDatabase, and wait for Unity compilation to settle before delivering the final result via the request's `requestId`. Pair with 'script-read' to inspect files before deletion.

See how to install

Good for

  • Remove an unused C# script
  • Delete several reviewed scripts together
  • Receive deletion results after Unity recompiles

Files included (1)

  • SKILL.md2.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Script / Delete

Delete the script file(s). Does AssetDatabase.Refresh() and waits for Unity compilation to complete before reporting results. Use 'script-read' tool to read existing script files first.

Inputs

  • files — non-empty array of .cs paths. Every entry must exist on disk.
  • requestId — required for the processing/delivered-later contract.

Behavior

Validates the array (non-empty, every entry ends with .cs, every entry exists). Deletes each file plus its sibling .meta (when present). Calls AssetDatabase.Refresh and schedules a post-compilation notification — the final response is delivered after Unity finishes the recompile triggered by the delete.

How to Call

unity-mcp-cli run-tool script-delete --input '{
  "files": "string_value"
}'

For complex input (multi-line strings, code), save the JSON to a file and use:

unity-mcp-cli run-tool script-delete --input-file args.json

Or pipe via stdin (recommended):

unity-mcp-cli run-tool script-delete --input-file - <<'EOF'
{"param": "value"}
EOF

Troubleshooting

If unity-mcp-cli is not found, either install it globally (npm install -g unity-mcp-cli) or use npx unity-mcp-cli instead. Read the /unity-initial-setup skill for detailed installation instructions.

Input

NameTypeRequiredDescription
filesanyYesFile paths to the files. Sample: "Assets/Scripts/MyScript.cs".

Input JSON Schema

{
  "type": "object",
  "properties": {
    "files": {
      "$ref": "#/$defs/System.String-1"
    }
  },
  "$defs": {
    "System.String-1": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "files"
  ]
}

Output

This tool does not return structured output.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

build-cli

FreeSummary

Build unity-mcp-cli from its TypeScript source and optionally make the command available across terminals with npm link. Covers dependency installation, compilation, version checks, and reporting errors when a step fails.

  • Build unity-mcp-cli from source for the first time
  • Rebuild the CLI after changing TypeScript files
  • Make the CLI command available across terminals
IvanMurzak/Unity-MCP4.5KUpdated Oct 20, 2026

Save changed scenes and assets, then quit a Unity Editor started by a CLI session. A matching session identifier is required, and editors opened manually are left running. Headless editors are supported.

  • Closing a Unity Editor after CLI work
  • Saving changes before ending a headless session
  • Closing only the editor owned by a CLI session
IvanMurzak/Unity-MCP4.5KUpdated Oct 20, 2026

Review unresolved GitHub pull request comments against the current code, apply minimal fixes for valid issues, and reply to review threads. Comments that need human judgment remain open, while fixed or unnecessary requests are resolved with explanations.

  • Addressing unresolved pull request reviews
  • Checking whether review comments still apply
  • Separating fixes from requests needing human review
IvanMurzak/Unity-MCP4.5KUpdated Oct 20, 2026

package-add

FreeSummary

Add packages to a Unity project from its package registry, a Git URL, or a local path. Choose a compatible version or specify one, and receive the installation result after any required reload.

  • Installing a Unity registry package
  • Adding a package at a specific version
  • Installing from a Git branch or tag
IvanMurzak/Unity-MCP4.5KUpdated Oct 20, 2026

package-list

FreeSummary

List packages installed in a Unity project with their names, versions, sources, and descriptions. Filter by source or keyword, or show only direct dependencies—the packages explicitly listed in the project manifest.

  • Checking installed package versions
  • Listing packages installed from Git
  • Reviewing only direct dependencies
IvanMurzak/Unity-MCP4.5KUpdated Oct 20, 2026

package-remove

FreeSummary

Remove an installed UPM package, a package managed by Unity, from a project. Checks that it exists, updates manifest.json, and delivers the result after any reload. Built-in packages and dependencies of other packages cannot be removed.

  • Remove an unused package from a Unity project
  • Check whether a package is installed before removal
  • Receive removal results after Unity finishes reloading
IvanMurzak/Unity-MCP4.5KUpdated Oct 20, 2026

See all skills by IvanMurzak

Report a problem with this skill