unity-scripting

unity-scripting is a skill for Claude Code from Nice-Wolf-Studio/unity-claude-skills. It costs 78 tokens per session (3,924 once invoked), scanned A, original, MIT.

A guide to writing C# scripts for Unity, including components attached to GameObjects, standalone data assets, editor-only code, and Unity's event lifecycle. It explains when common events, coroutines, asynchronous tasks, and built-in types are used.

In plain words
What is it for?
Creating MonoBehaviours, ScriptableObjects, editor scripts, lifecycle logic, coroutines, asynchronous operations, events, and code using Unity types such as vectors and rotations.
Why use it?
It helps prevent lifecycle-order mistakes and confusion between code that runs in the game and code that runs only in the Unity Editor. It also encourages suitable structures for shared data and behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the unity plugin — 35 skills, 1 plugin shipped together

Good fit Creating MonoBehaviours, ScriptableObjects, editor scripts, lifecycle logic, coroutines, asynchronous operations, events, and code using Unity types such as vectors and rotations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nice-wolf-studio/unity-claude-skills/unity-scripting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Nice-Wolf-Studio/unity-claude-skills --skill unity-scripting
Clone the repo
git clone --depth 1 https://github.com/Nice-Wolf-Studio/unity-claude-skills

Made for: Claude Code.

Or install unity, the plugin that ships this one along with the rest of its 35 skills, 1 plugin.

Wrote 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.

agentmods badge for unity-scripting

README.md
[![agentmods](https://agentmods.dev/badge/skills/nice-wolf-studio/unity-claude-skills/unity-scripting/github.svg)](https://agentmods.dev/skills/nice-wolf-studio/unity-claude-skills/unity-scripting)
Your own site
<a href="https://agentmods.dev/skills/nice-wolf-studio/unity-claude-skills/unity-scripting"><img src="https://agentmods.dev/badge/skills/nice-wolf-studio/unity-claude-skills/unity-scripting/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.

agentmods 80×15 button for unity-scripting

Your own site · 80×15
<a href="https://agentmods.dev/skills/nice-wolf-studio/unity-claude-skills/unity-scripting"><img src="https://agentmods.dev/badge/skills/nice-wolf-studio/unity-claude-skills/unity-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,924 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.03924
Opus 5.5 $0.00031 $0.01570
Sonnet 5.5 $0.00016 $0.00785
Haiku 4.5 $0.00008 $0.00392

Measured 3mo ago against content hash 9c7c434964ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unity-scripting 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 3mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/unity-scripting/SKILL.md · 495 lines

How it starts

The opening of the file, as written. The whole thing — 495 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity C# Scripting

Script Fundamentals

C# scripts (.cs files) are stored in the Assets folder. Scripts gain Unity functionality by inheriting from built-in types:

  • UnityEngine.Object -- Makes custom types assignable to Inspector fields
  • MonoBehaviour -- Attaches to GameObjects as components to control behavior in a scene
  • ScriptableObject -- Standalone data assets not attached to GameObjects

Scripts operate in two contexts:

  • Runtime scripts -- Execute in the Player build (use UnityEngine namespace)
  • Editor scripts -- Run only in the Editor (use UnityEditor namespace, place in Editor folders)

MonoBehaviour Lifecycle

MonoBehaviours always exist as a Component of a GameObject. The lifecycle event functions execute in a strict order. You cannot rely on the order in which the same event function is invoked for different GameObjects unless configured via Script Execution Order settings.

Execution Order (ASCII Diagram)

INITIALIZATION
  |
  v
[Awake] ---------> Called when script instance loads (once per lifetime)
  |
  v
[OnEnable] ------> Called when object/component becomes enabled
  |
  v
(SceneManager.sceneLoaded fires here -- after OnEnable, before Start)
  |
  v
[Start] ---------> Called before first frame Update (once per lifetime)
  |
  |
  |  +===========================================+
  |  |          PHYSICS LOOP (fixed timestep)    |
  |  |                                           |
  +->| [FixedUpdate] --> Internal Physics ------>|
  |  |       |                                   |
  |  | [yield WaitForFixedUpdate resumes]        |
  |  +===========================================+
  |
  v
[Update] --------> Called once per frame
  |
  v
[yield null / yield WaitForSeconds resumes]
  |
  v
(Internal Animation Update)
  |   [OnAnimatorMove]
  |   [OnAnimatorIK]
  |
  v
[LateUpdate] ----> Called after all Update functions complete
  |
  v
RENDERING
  | [OnWillRenderObject]
  | [OnPreCull] [OnBecameVisible/Invisible]
  | [OnPreRender]
  | [OnRenderObject]
  | [OnPostRender]
  | [OnRenderImage]
  |
  v
[OnGUI] ---------> Called for GUI rendering events
  |
  v
[yield WaitForEndOfFrame resumes]
  |
  v
DEACTIVATION / TEARDOWN
  |
  v
[OnDisable] -----> Called when component/object is disabled
  |
  v
[OnDestroy] -----> Called before object destruction

Read the full file on GitHub · 495 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 3mo ago First seen · 495 lines · 78 tokens per session scan A 9c7c434964ee

Subscribe to this mod's changes

unity-scripting is a skill published in the GitHub repository Nice-Wolf-Studio/unity-claude-skills (40 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 3,924 once invoked, about $0.0003 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-30.

Related

unity-scripting compared with skills from other repositories

unity-scripting next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
unity-scriptingNice-Wolf-Studio/unity-claude-skillsSkill402mo agoMITA78Claude Code
godot-csharpgamedev-skills/awesome-gamedev-agent-skillsSkill13ktodayApache-2.0A111Claude Code
unity-csharp-scriptinggamedev-skills/awesome-gamedev-agent-skillsSkill13ktodayApache-2.0A91Claude Code
scenario-unity-architecturescenario-labs/skillsSkill4.4ktodayMITA133Claude Code
gdextensionjame581/GodotPrompterSkill1.0kyesterdayMITA38Claude Code
unity-vrc-udon-sharpniaka3dayo/agent-skills-vrc-udonSkill37319d agoMITA210Claude Code
unity-developmentCoWork-OS/CoWork-OSSkill559todayMITA36Claude Code, Codex