new-script
Skill1 starsChanged 2 months agoMITView on GitHub
Scaffold a new Unity C# script under unity/Assets/Scripts/ following the project's conventions (SerializeField, headers, no per-frame allocations), and explain exactly which GameObject to attach it to. Use when creating any new MonoBehaviour, ScriptableObject, or utility class.
In this repository37 other files it gives its agents.
- wsb-data-pipelineSkill
- docx-exportSkill
- harvard-mdxSkill
- humanise-docx-reportSkill
- make-pdfSkill
- bom-builderSkill
- ring-testSkill
- batch-draftSkill
- cold-emailSkill
- cv-intakeSkill
- cv-upgradeSkill
- find-contactSkill
- followupSkill
- humanize-emailSkill
- log-outreachSkill
- outreach-statusSkill
- target-researchSkill
- erc-statusSkill
- log-sessionSkill
- score-auditSkill
- submission-checkSkill
- sumo-statusSkill
- trial-runSkill
- vr-statusSkill
- academic-registerSkill
- aviation-data-sourcesSkill
- business-frameworksSkill
- consultancy-registerSkill
- excel-deliverablesSkill
- forecasting-methodsSkill
- operations-frameworksSkill
- secondary-data-sourcesSkill
- archive-indexSkill
- event-proposalSkill
- meeting-minutesSkill
- read-boxnoteSkill
- captureSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Create a new C# script that follows .claude/rules/tech_defaults.md exactly, and — because the user is a Unity beginner — always explain …
- Distinctive: line 12
Ask (or infer from context): class name, feature area (Flood / Weather / XR / UI), and what it should do.
- Very specific: line 14
Create the file at unity/Assets/Scripts/<Feature>/<ClassName>.cs.
- Distinctive: line 15
Follow the template and conventions below.
- Very specific: line 54
No magic numbers — extract to a serialized field or const.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/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
- Ask (or infer from context): class name, feature area (Flood / Weather / XR / UI), and what it should do.
- Confirm the Unity project exists (
unity/Assets/present). If not, stop — scripts have nowhere to live before Phase 0's Unity project is created. - Create the file at
unity/Assets/Scripts/<Feature>/<ClassName>.cs. Filename must match the class name. - Follow the template and conventions below.
- 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
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] privatefor Inspector-exposed fields — never barepublicfields.- PascalCase class/methods, camelCase fields. One class per file.
usinggroups: System / UnityEngine / third-party / project — blank-line separated.[Header("...")]groups in the Inspector.- No magic numbers — extract to a serialized field or
const. - Coroutines need
using System.Collections;(IEnumerator, non-generic). - Event subscriptions in
Awake()/OnEnable()get mirrored unsubscriptions inOnDestroy()/OnDisable(). - Network calls (Phase 4): coroutine +
UnityWebRequest, never blocking the main thread.
After creating
Remind the user: a script does nothing until attached to a GameObject — and the scene must be saved (Ctrl+S) afterwards.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

