script-read

Reads a C# script file and returns its content with optional line-range slicing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Inspecting Unity C# scripts requires opening files manually or dumping entire files into context, which wastes tokens when you only need a specific section. This Skill reads a .cs file and returns its content as a string, with optional 1-based line-range slicing for partial reads. ## Core Features & Use Cases - Full or Partial File Reads: Read an entire .cs file or slice a specific line range using lineFrom and lineTo parameters. - Forgiving Bounds: Out-of-range line numbers are clamped automatically, so reads never fail due to off-by-one ranges. - Use Case: While refactoring a Unity MonoBehaviour, read only lines 40-80 of Assets/Scripts/PlayerController.cs to inspect the movement logic, then pair with the script-update-or-create tool to write back the modified section. ## Quick Start Ask the AI to read the file Assets/Scripts/PlayerController.cs from line 1 to line 50 using the script-read tool.

Frequently Asked Questions about script-read

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

FAQPage Schema
How do I read a C# script file in Unity with an AI tool?▼

Use the script-read tool via unity-mcp-cli with a filePath pointing to the .cs file, such as Assets/Scripts/MyScript.cs. It returns the file content as a string, and you can optionally pass lineFrom and lineTo to read only a portion.

How to read only specific lines of a .cs file?▼

Pass the lineFrom and lineTo parameters, both 1-based and inclusive, to slice the file content. The default lineFrom is 1 and lineTo is -1, which reads to end-of-file.

What happens if lineFrom or lineTo is out of range?▼

Out-of-range values are clamped into the valid range automatically, so the read never throws for bad line numbers. The result returns at most the whole file content.

Why does script-read fail with file not found?▼

The tool throws if the filePath does not exist on disk, since filePath is a required parameter. Verify the path is relative to the Unity project, for example Assets/Scripts/MyScript.cs.

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

Install it globally with npm install -g unity-mcp-cli, or invoke it via npx unity-mcp-cli instead. The unity-initial-setup skill covers detailed installation steps.