Writes and fixes Unity 6.3 LTS C# gameplay scripts: MonoBehaviour lifecycle, serialization, .meta/GUID discipline and command-line tests. Use for new or renamed .cs files, "Missing script" or a field missing from the Inspector. Not for physics (`unity-physics`), input (`unity-input-system`), data assets (`unity-scriptableobjects`) or builds (`unity-build-pipeline`).
Ships in gamedev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Write correct gameplay scripts for Unity 6.3 LTS (6000.3), C# 9 on .NET Standard 2.1, keep the
project's .meta files intact, and prove the result compiles and behaves without opening the
Editor by hand.
MonoBehaviour: lifecycle callbacks, component references,
serialized fields, coroutines, async with Awaitable.Assets/, ProjectSettings/ and *.cs files.When not to use: rigidbodies and collision response → unity-physics; reading player
input → unity-input-system; shared data assets and config → unity-scriptableobjects;
Animator parameters → unity-animation; building players → unity-build-pipeline.
ProjectSettings/ProjectVersion.txt gives the
Editor version; Packages/manifest.json the packages; any *.asmdef files tell you which
assembly a new script lands in. Keep the project's version unless asked to upgrade.Awake caches references to its own components;
OnEnable/OnDisable subscribe and unsubscribe; Start wires things that depend on other
objects' Awake; FixedUpdate is physics; LateUpdate follows movement (cameras).[SerializeField] private so designers can edit them and other
code cannot. A plain class needs [System.Serializable] to show up..meta. A .meta holds the asset's GUID; a new .meta means
a new GUID and every reference to the old one shows "Missing script". A brand-new file needs
no .meta: Unity writes one on the next import. Keep each MonoBehaviour or
ScriptableObject class in a file of the same name.python scripts/check_unity_project.py <project-dir> (--json for
machine-readable output). Fix every ERROR (duplicate or malformed GUIDs, files moved
without their .meta, missing script references) and re-run until it exits 0. Run it from
this skill's directory or resolve the installed path first; it needs Python 3.10+ only,
reads text-serialized assets and never writes. --help lists the checks and exit codes.unity recompile --project-path <project>; otherwise a batch-mode import and grep -E "error CS[0-9]{4}" on its log.unity command script eval. Read
references/agent-checks.md for the exact commands, the test .asmdef and how to read the
results. Report which checks ran and which could not.using UnityEngine;
using UnityEngine.Serialization;
public class Turret : MonoBehaviour
{
[SerializeField, Range(0.1f, 5f)] private float fireInterval = 0.5f;
// Renamed from "range": without this attribute every scene and prefab loses the value.
[FormerlySerializedAs("range")]
[SerializeField] private float maxRange = 12f;
[System.Serializable]
public class Stats { public int hp = 100; public int armor = 0; }
[SerializeField] private Stats stats = new();
}
private Coroutine _spawnLoop;
private void OnEnable() => _spawnLoop = StartCoroutine(SpawnLoop());
private void OnDisable() { if (_spawnLoop != null) StopCoroutine(_spawnLoop); }
private System.Collections.IEnumerator SpawnLoop()
{
var wait = new WaitForSeconds(1f); // allocate once, reuse
while (true) { Spawn(); yield return wait; }
}
private void Spawn() { }
For async/await with Awaitable, the full execution order and custom yield
instructions, read references/lifecycle-and-coroutines.md.
?. and ?? on a destroyed object. Unity overrides == so a destroyed object equals
null, but ?., ?? and is null skip that override and see a live reference. Use
if (target) or target == null for anything derived from UnityEngine.Object.[FormerlySerializedAs("old")]
(namespace UnityEngine.Serialization) when you rename..meta stayed behind, was regenerated, or the
class name no longer matches the file name. The checker reports all three.Update. Forces or MovePosition outside FixedUpdate jitter and depend on
frame rate. Read input in Update, apply it in FixedUpdate.Awake calls finish before any Start, but the order among
Awakes (and among Starts) is undefined unless Script Execution Order is set. Do
cross-object wiring in Start.SetActive(false) kills them;
setting only the component's enabled = false does not. Restart in OnEnable if needed.async method keeps running after its object is destroyed. Pass
destroyCancellationToken to Awaitable waits (they then throw
OperationCanceledException), and await each Awaitable instance only once: they are
pooled.FindObjectOfType/FindObjectsOfType. Use FindAnyObjectByType
or FindObjectsByType(FindObjectsSortMode.None) on 6.3. From 6.4, FindFirstObjectByType
and the FindObjectsSortMode overload are obsolete too: use FindAnyObjectByType and
FindObjectsByType<T>(). All of them scan the scene; cache the result.GetComponent in hot paths. Cache stable references in Awake, and profile
before treating an occasional lookup as the bottleneck.Update can run in the same frame as Start. Guard fields that other objects
set later.references/agent-checks.md before compiling or testing a project from the command
line: Unity CLI commands, batch-mode commands, test assembly files, log locations and how to
read NUnit results.references/lifecycle-and-coroutines.md when ordering matters across callbacks, or
for coroutine yield instructions, CustomYieldInstruction and the Awaitable equivalents
of coroutine waits.scripts/check_unity_project.py: run it (step 5); treat it as a black box and use --help
instead of reading the source.unity-physics: Rigidbody, collisions and FixedUpdate motion.unity-input-system: reading player input into these scripts.unity-scriptableobjects: sharing data between scripts without singletons.Last verified: 2026-11-11, against Unity 6000.3.28f1.
FindObjectsOfType is obsolete in 6.3; FindFirstObjectByType and
FindObjectsByType(FindObjectsSortMode) become obsolete in 6.4. Source: Unity C# reference
source, Runtime/Export/Scripting/UnityEngineObject.bindings.cs at tags 6000.3.28f1 and
6000.4.12f1 (https://github.com/Unity-Technologies/UnityCsReference).?./?? caveat: Scripting API Object page
(https://docs.unity.com/en-us/engine/6000.3/script-reference/unityengine/object).com.unity.pipeline 1.0.0-pre.1 are pre-release. Exit codes:
https://docs.unity.com/en-us/unity-cli/reference/output-formats. Commands:
https://docs.unity3d.com/Packages/[email protected]/manual/index.html-runTests does not support -quit):
https://docs.unity.com/en-us/engine/6000.3/manual/programming-environment/test-framework-introduction/reference-command-lineWhat SKILL.md sets; muted values are Claude Code's defaults
/gamedev:unity-csharp-scriptingfrom gamedev
npx claudepluginhub cirobarone78/games-skill --plugin gamedevOther plugins' skills for the same job
80 skills in this plugin
/ai-behavior-trees-utility-aiEngine-neutral behavior tree and utility AI code for NPCs in any language: Blackboard, reactive composites, decorators and response-curve scoring. Use when an enemy keeps chasing after losing sight, restarts its action every frame or flip-flops between choices. Not for FSMs, steering or pathfinding (`game-ai`) or Unreal BT, EQS and StateTree (`unreal-behavior-trees`).
/audio-designEngine-neutral game audio technique: bus layout, volume sliders in decibels, loudness, ducking music under dialogue, adaptive music and SFX variation, with Godot, Unity and FMOD/Wwise mappings. Use when mixing a game, making music react to combat, fixing repetitive footsteps or beat sync, or a mix that clips or pumps. Not for the Godot audio API (`godot-audio`).
/