Skip to content
Game dev

Unity C# game jam

Unity C# conventions that respect the editor, .meta files and serialisation, plus a skill for scripted web builds ready for itch.io.

Verified install Not agent-tested v1.0.0 MIT updated unitycsharp
Equips
  • 2 2 Rules
  • 1 1 Skills
  • – 0 MCP

Agents are good at C# and bad at Unity. They rename files without their .meta, break serialised fields, allocate every frame and forget that half the game lives in scenes and prefabs they cannot see. This loadout fixes that, adds jam-scope discipline, and gives the agent a batch-mode build script for web builds so you are not fighting the build window at the deadline.

What's in it

  • Rules for .meta files, serialised fields and prefab-first design
  • Performance habits that matter for web builds (no per-frame allocations or Find calls)
  • Batch-mode build skill with a ready-to-paste BuildScript.cs and itch.io compression settings
  • Cursor rule scoped to C# files under Assets/

You'll need

  • Tools: unity-editor
Level 1 · automated

Verification

Verified install

Checked at commit ad36e85 · 8 passed, 0 failed, 2 not applicable

CheckResultWhat we found
Listinglisting.yaml matches the schema and declares every file in the folder. Pass
Schema valid; 5 files declared, none missing or extra
  • tested.status: untested (agent tests are separate from Level 1)
Files parseJSON parses; SKILL.md and .mdc front matter is valid YAML with the fields each agent needs; code fences are closed. Pass All 5 files parse; front matter valid
AdaptersCLAUDE.md imports @AGENTS.md, GEMINI.md imports @./AGENTS.md, and both match the generator. Pass
CLAUDE.md and GEMINI.md import AGENTS.md and are up to date
  • CLAUDE.md: matches the generator
  • GEMINI.md: matches the generator
Install pathsEvery file lands where each agent documents it, with no collisions, and the laid-out project is re-discovered correctly. Pass
Correct paths for all 5 agents; layouts re-discovered
  • Claude Code: 3 files, 1 skill in .claude/skills/
  • Codex CLI: 2 files, 1 skill in .agents/skills/
  • Cursor: 3 files, 1 skill in .agents/skills/, 1 rule
  • Gemini CLI: 3 files, 1 skill in .agents/skills/
  • GitHub Copilot: 2 files, 1 skill in .agents/skills/
MCP configmcp.json is structurally valid, converts to each agent's format, declares no literal secrets, and referenced packages exist on npm/PyPI. Not applicable No MCP servers in this loadout
Safety scanThe intake scanner finds no credentials, risky shell, hidden Unicode or prompt-injection wording, and the listing's network flag is honest. Pass
Clean: no credentials, risky shell or hidden text
  • Scanner intake-precheck/1: verdict clean; network no (listing says no)
ReferencesLinks and file paths between the loadout's files resolve, including for each agent's installed layout. Pass 1 reference between files resolves for every agent
Size limitsFile count and sizes are within the submission limits; SKILL.md bodies stay under 500 lines. Pass
5 files, 6.5 KB total; largest skills/unity-web-build/SKILL.md 2.5 KB
  • Limits: 30 files, 32 KB per file, 128 KB total, 500 lines per skill or rule
LicenceA recognised SPDX licence, with the licence text available. Pass MIT, by Agent Loadout; text in the repository LICENSE
Starter buildA minimal fixture project with the loadout applied installs and builds or type-checks, and the loadout's own code examples compile. Not applicable
Not applicable: the Unity Editor needs a licence and a multi-gigabyte install, so it can't run free and quickly in CI
  • A WebGL build needs the Unity Editor plus the Web Build Support module, a signed-in Unity licence and roughly 10 GB of downloads per run.
  • The C# build script in the skill references UnityEditor assemblies that only ship with the Editor, so it can't be compiled on its own either.
  • Every other Level 1 check still runs on this loadout.

What this means: a script checked the files themselves: they parse, they install where each agent looks, any MCP config is sound, the safety scan is clean, references between files resolve, and, where a free and repeatable fixture exists, a small starter project builds with the loadout applied. No AI agent was run. Per-agent results ("tested with agent") are separate and stay untested until an agent actually runs.

Install

Choose your agent. Run the commands from your project root, or download a zip already laid out in the right folders.

Claude Code reads CLAUDE.md (imports AGENTS.md with @AGENTS.md) and skills from .claude/skills/.

Download zip
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md
curl -fsSL --create-dirs -o CLAUDE.md https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/CLAUDE.md
curl -fsSL --create-dirs -o .claude/skills/unity-web-build/SKILL.md https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md
FileGoes to
AGENTS.mdAGENTS.md
CLAUDE.mdCLAUDE.md
skills/unity-web-build/SKILL.md.claude/skills/unity-web-build/SKILL.md

Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.

Files

Rules AGENTS.md Unity project and game jam rules. 35 lines
Download Raw
# AGENTS.md: Unity C# game jam

This is a Unity project for a game jam. A finished small game beats an unfinished big one.

## Jam rules
1. Core loop first: start → play → win/lose → restart. Nothing else until that works.
2. Offer the smallest version of any big request and park the rest in `CUTLIST.md`.
3. After the human calls feature freeze: bugs, juice, menus, audio and the build only.
4. Make a web build on day one (see the `unity-web-build` skill) so the final one is routine.

## The editor is part of the codebase
- You cannot see scenes, prefabs or inspector values. When a change needs editor work, say exactly what to do:
  "Select the Player prefab, add a `Health` component, set Max HP to 3".
- **Every asset has a `.meta` file holding its GUID.** When moving or renaming an asset outside Unity, move or rename
  its `.meta` with it, or references across the project break. Never delete `.meta` files. Prefer asking the human to
  rename in the Project window.
- Commit `Assets/`, `Packages/`, `ProjectSettings/`. Ignore `Library/`, `Temp/`, `Obj/`, `Logs/`, `UserSettings/`, `Build*/`.
- Renaming a serialised field loses its inspector value. Use `[FormerlySerializedAs("oldName")]` when renaming.

## C# conventions
- One `MonoBehaviour` per file; file name equals class name.
- Inspector fields: `[SerializeField] private float moveSpeed = 5f;` not public fields. Use `[Header]`, `[Range]`, `[Tooltip]`.
- Cache components in `Awake` (`rb = GetComponent<Rigidbody2D>();`). Use `[RequireComponent]` where a dependency is mandatory.
- Never call `GameObject.Find`, `FindObjectOfType`/`FindFirstObjectByType` or `GetComponent` inside `Update`.
- Physics in `FixedUpdate`; input and visuals in `Update`. Multiply by `Time.deltaTime` (or `fixedDeltaTime`) for frame-rate independence.
- Use `ScriptableObject` assets for tuning data (enemy stats, level settings) so designers tweak without code.
- Events: C# `event Action<int>` or `UnityEvent` for "something happened"; keep singletons to a GameManager and an AudioManager at most.
- Avoid per-frame allocations (LINQ, string concatenation, `new` lists in `Update`) — they cause stutters, especially on web.
- Object-pool anything spawned often (bullets, particles).
- Check which input system the project uses (`Packages/manifest.json` contains `com.unity.inputsystem`?) and stick to it.

## Before you say "done"
- Code compiles: ask the human to check the Console for errors, or run a batch-mode build.
- List the editor steps the human must do, numbered.
Adapter CLAUDE.md Imports AGENTS.md for Claude Code. 10 lines
Download Raw
# CLAUDE.md

@AGENTS.md

## Claude Code notes
- Skills from this loadout live in `.claude/skills/`: `unity-web-build`. Use them when their description matches the task.
- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.

<!-- From the Agent Loadout "Unity C# game jam" v1.0.0 — https://loadout.jnw-it.com/loadouts/unity-game-jam/ -->
Adapter GEMINI.md Imports AGENTS.md for Gemini CLI. 10 lines
Download Raw
# GEMINI.md

@./AGENTS.md

## Gemini CLI notes
- Skills from this loadout live in `.agents/skills/`: `unity-web-build`. Use them when their description matches the task.
- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.

<!-- From the Agent Loadout "Unity C# game jam" v1.0.0 — https://loadout.jnw-it.com/loadouts/unity-game-jam/ -->
Cursor rule .cursor/rules/unity-csharp.mdc Unity C# rule, applied to scripts under Assets/. 15 lines
Download Raw
---
description: Unity C# script rules
globs: "Assets/**/*.cs"
alwaysApply: false
---

- `[SerializeField] private` for inspector fields, never public fields for tuning.
- Cache `GetComponent` results in `Awake`. No `Find*` or `GetComponent` calls in `Update`, `FixedUpdate` or `LateUpdate`.
- Rigidbody movement in `FixedUpdate`; read input in `Update`.
- No allocations in per-frame methods: no LINQ, no `new List<>`, no string building.
- File name must match the class name, or Unity cannot attach the script.
- When renaming a serialised field, add `[UnityEngine.Serialization.FormerlySerializedAs("oldName")]`.
- Editor-only code goes in an `Editor/` folder or inside `#if UNITY_EDITOR` so player builds do not break.
- Do not move or rename files without their `.meta` file.
Skill skills/unity-web-build/SKILL.md Builds a web (WebGL) player from the command line, ready for itch.io. 63 lines
Download Raw
---
name: unity-web-build
description: Build a Unity project for the web (WebGL) from the command line and prepare it for itch.io. Use when the user asks to build, export or upload their Unity game for the browser.
---

# Unity web build for itch.io

## 1. Add a build script (once)
Create `Assets/Editor/BuildScript.cs`:

```csharp
using System.Linq;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;

public static class BuildScript
{
    public static void BuildWeb()
    {
        PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat.Gzip;
        PlayerSettings.WebGL.decompressionFallback = true; // works on hosts without Content-Encoding headers

        var scenes = EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray();
        var report = BuildPipeline.BuildPlayer(new BuildPlayerOptions
        {
            scenes = scenes,
            locationPathName = "Build/Web",
            target = BuildTarget.WebGL,
            options = BuildOptions.None
        });

        Debug.Log($"Build {report.summary.result}: {report.summary.totalSize / (1024 * 1024)} MB");
        if (report.summary.result != BuildResult.Succeeded) EditorApplication.Exit(1);
    }
}
```

The human must have the **Web/WebGL Build Support** module installed for their editor version (Unity Hub → Installs → Add modules).
Scenes must be listed and ticked in Build Settings / Build Profiles.

## 2. Build in batch mode
Close the editor first (batch mode cannot open a project that is already open).

```sh
# Path to the editor varies: Unity Hub → Installs → ⋯ → Show in folder
"<path-to-Unity>" -batchmode -quit -projectPath . -executeMethod BuildScript.BuildWeb -logFile -
```
Exit code 0 means success. On failure, search the log for `error CS` (compile errors) or `Build Failed`.

## 3. Check and test
- `Build/Web` should contain `index.html`, `Build/` and `TemplateData/`.
- Serve locally (`npx serve Build/Web`) and ask the human to play for 30 seconds. Audio starts after the first click.
- If the build is over ~100 MB, suggest lowering texture max sizes and using compressed audio before upload.

## 4. Upload
- Zip the **contents** of `Build/Web` (so `index.html` is at the root of the zip), or use butler:
  `butler push Build/Web user/game-slug:html5`.
- On itch.io: Kind of project → HTML, tick "played in the browser", set the viewport to the canvas size, enable the fullscreen button.

## 5. Report
Build size, any warnings worth fixing, the upload channel, and the itch.io steps the human still needs to click.

All files: source zip · Licence MIT · By Agent Loadout · First listed

Installing and testing

How do I install Unity C# game jam in Claude Code?

From your project root, put AGENTS.md, CLAUDE.md, skills/unity-web-build/SKILL.md at .claude/skills/unity-web-build/SKILL.md. The "Claude Code" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/unity-game-jam/claude-code.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Unity C# game jam in Codex CLI?

From your project root, put AGENTS.md, skills/unity-web-build/SKILL.md at .agents/skills/unity-web-build/SKILL.md. The "Codex CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/unity-game-jam/codex.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Unity C# game jam in Cursor?

From your project root, put AGENTS.md, .cursor/rules/unity-csharp.mdc, skills/unity-web-build/SKILL.md at .agents/skills/unity-web-build/SKILL.md. The "Cursor" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/unity-game-jam/cursor.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Unity C# game jam in Gemini CLI?

From your project root, put AGENTS.md, GEMINI.md, skills/unity-web-build/SKILL.md at .agents/skills/unity-web-build/SKILL.md. The "Gemini CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/unity-game-jam/gemini-cli.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

How do I install Unity C# game jam in GitHub Copilot?

From your project root, put AGENTS.md, skills/unity-web-build/SKILL.md at .agents/skills/unity-web-build/SKILL.md. The "GitHub Copilot" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/unity-game-jam/copilot.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.

Has Unity C# game jam been tested?

It passed the Level 1 automated install checks on 2026-10-16: the files parse, install to each agent's documented paths, and pass the safety scan. No AI agent has run it yet, so no agent pass or fail is claimed.

More for Claude Code, Codex, Cursor, Gemini CLI and GitHub Copilot.