Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/batihandev/unity-mcp-skillsnpx agentmods add skills/batihandev/unity-mcp-skills/scriptWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/batihandev/unity-mcp-skills/script)<a href="https://agentmods.dev/skills/batihandev/unity-mcp-skills/script"><img src="https://agentmods.dev/badge/skills/batihandev/unity-mcp-skills/script/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/batihandev/unity-mcp-skills/script"><img src="https://agentmods.dev/badge/skills/batihandev/unity-mcp-skills/script.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.00665 |
| Opus 5.5 | $0.00010 | $0.00266 |
| Sonnet 5.5 | $0.00005 | $0.00133 |
| Haiku 4.5 | $0.00003 | $0.00067 |
Grade A, and why
unity-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Script Management
Do not use Unity_RunCommand for script operations. The Unity MCP server exposes dedicated tools for every common script operation. Use them directly — they handle Domain Reload coordination and diagnostics natively.
Routing
| Operation | Tool | Typical use |
|---|---|---|
| Create a new C# script | Unity_CreateScript |
Writes a new file under Assets/; sets up the MonoBehaviour/ScriptableObject/Editor template. |
| Delete a C# script | Unity_DeleteScript |
By URI (unity://path/...) or by Assets/... path. |
| List script files | Unity_ListResources |
Commonly filtered to *.cs under Assets/. |
| Search inside a script | Unity_FindInFile |
Regex-level matches with line numbers. |
| Structured edits | Unity_ScriptApplyEdits |
Method-level replace / insert / remove. Prefer this over raw text edits. |
| Syntax + diagnostics check | Unity_ValidateScript |
Call before and after edits; surfaces compile errors before they trigger a Domain Reload. |
| Hash for concurrency | Unity_GetSha |
Compare against your expected hash to detect conflicting edits before writing. |
Install-once Editor scripts (screenshot helpers, custom Editor windows, build steps, exporters): check
../tooling/SKILL.mdfor ready-to-paste templates before writing one from scratch.
Filename must match class name
The .cs filename (without extension) must exactly match the top-level class name. Unity's asset database relies on the 1:1 mapping — mismatches silently break MonoBehaviour attachment and asset references.
- When creating a script, pass the
scriptNamewithout.cs. - When renaming a class, rename the file in the same operation.
Domain Reload coordination
After any script create / edit / delete, Unity triggers a Domain Reload (compilation + assembly swap). Tools return a compilation block where applicable — check it before issuing the next operation.
- If the response reports
isCompiling: true, wait for it to settle before the next script edit. - Once compilation completes, call
Unity_ValidateScripton the affected file to surface any errors. - Group related edits in a single task where possible — fewer edits = fewer Domain Reloads.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 48 lines · 25 tokens per session scan A 168dc0eba2b5
unity-script is a skill published in the GitHub repository batihandev/unity-mcp-skills (6 stars, last pushed 12d ago), licensed MIT. It adds 25 tokens to every session and 665 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
unity-csharp
A set of practical guidelines for writing Unity game scripts in C#. Unity is a game engine, and these rules cover its update loop, object lifetime, memory cleanup, coroutines, and editable data.
script-execute
Compiles and runs C# in the Unity Editor (Roslyn): plain statements with the last expression as the result, or a full class with a static method. See the skill body for the modes, usings/include and Unity object parameters.
script-delete
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.
script-read
Read a .cs script file and return its content as a string. Supports a 1-based lineFrom/lineTo slice for partial reads. Pair with 'script-update-or-create' to write back.
script-update-or-create
Write a .cs script file (create or overwrite) with the provided C# code. Validates syntax via Roslyn before write — invalid code is rejected with error details and the file is left untouched. Refreshes the AssetDatabase and delivers the final result via requestId after Unity finishes the triggered compilation. Use…
godot-csharp
Use C#/.NET in Godot 4.7: partial classes extending nodes, the PascalCase lifecycle (Ready/Process/PhysicsProcess), [Export] fields, [Signal] delegates as C# events, type-safe node lookup, and calling between C# and GDScript. Use when writing Godot game code in C# (.cs files, .csproj), needing the Godot .NET build…