new-scriptlisted
Install: claude install-skill Faaz17/Agents-and-Skills
# /new-script — Unity C# Script Scaffold
Create a new C# script that follows `.claude/rules/tech_defaults.md` exactly, and — because the user is a Unity beginner — always explain where it goes and how to wire it up.
## Steps
1. Ask (or infer from context): class name, feature area (Flood / Weather / XR / UI), and what it should do.
2. Confirm the Unity project exists (`unity/Assets/` present). If not, stop — scripts have nowhere to live before Phase 0's Unity project is created.
3. Create the file at `unity/Assets/Scripts/<Feature>/<ClassName>.cs`. Filename **must** match the class name.
4. Follow the template and conventions below.
5. Tell the user, step by step: which GameObject to attach it to, which Inspector fields to fill in, and what they should *see* when they press Play (the eye-verification step).
## Template
```csharp
using System.Collections;
using UnityEngine;
/// <summary>
/// One sentence: what this component does and what it attaches to.
/// </summary>
public class ClassName : MonoBehaviour
{
[Header("Settings")]
[SerializeField] private float exampleValue = 1f;
[Header("References")]
[SerializeField] private Transform exampleTarget;
private void Awake()
{
// Cache components here — never GetComponent<X>() in Update().
}
private void Update()
{
// No allocations here: no `new`, no LINQ, no string concat, no Find().
}
}
```
## Convention checklist (enforce all of these)
- `[SerializeField] priv