{
  "id": "unity-game-jam",
  "type": "loadout",
  "title": "Unity C# game jam",
  "summary": "Unity C# conventions that respect the editor, .meta files and serialisation, plus a skill for scripted web builds ready for itch.io.",
  "description": "Agents are good at C# and bad at Unity. They rename files without their .meta, break serialised\nfields, allocate every frame and forget that half the game lives in scenes and prefabs they cannot see.\nThis loadout fixes that, adds jam-scope discipline, and gives the agent a batch-mode build script for\nweb builds so you are not fighting the build window at the deadline.\n",
  "highlights": [
    "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/"
  ],
  "version": "1.0.0",
  "license": "MIT",
  "author": {
    "name": "Agent Loadout",
    "url": "https://loadout.jnw-it.com"
  },
  "categories": [
    "gamedev"
  ],
  "stacks": [
    "unity",
    "csharp"
  ],
  "files": [
    {
      "path": "AGENTS.md",
      "role": "instructions",
      "description": "Unity project and game jam rules.",
      "skill": null,
      "agent": null,
      "install_to": {
        "claude-code": "AGENTS.md",
        "codex": "AGENTS.md",
        "cursor": "AGENTS.md",
        "gemini-cli": "AGENTS.md",
        "copilot": "AGENTS.md"
      },
      "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md",
      "raw_latest_url": "https://loadout.jnw-it.com/raw/unity-game-jam/latest/AGENTS.md",
      "bytes": 2534,
      "lang": "markdown",
      "content": "# AGENTS.md: Unity C# game jam\n\nThis is a Unity project for a game jam. A finished small game beats an unfinished big one.\n\n## Jam rules\n1. Core loop first: start → play → win/lose → restart. Nothing else until that works.\n2. Offer the smallest version of any big request and park the rest in `CUTLIST.md`.\n3. After the human calls feature freeze: bugs, juice, menus, audio and the build only.\n4. Make a web build on day one (see the `unity-web-build` skill) so the final one is routine.\n\n## The editor is part of the codebase\n- You cannot see scenes, prefabs or inspector values. When a change needs editor work, say exactly what to do:\n  \"Select the Player prefab, add a `Health` component, set Max HP to 3\".\n- **Every asset has a `.meta` file holding its GUID.** When moving or renaming an asset outside Unity, move or rename\n  its `.meta` with it, or references across the project break. Never delete `.meta` files. Prefer asking the human to\n  rename in the Project window.\n- Commit `Assets/`, `Packages/`, `ProjectSettings/`. Ignore `Library/`, `Temp/`, `Obj/`, `Logs/`, `UserSettings/`, `Build*/`.\n- Renaming a serialised field loses its inspector value. Use `[FormerlySerializedAs(\"oldName\")]` when renaming.\n\n## C# conventions\n- One `MonoBehaviour` per file; file name equals class name.\n- Inspector fields: `[SerializeField] private float moveSpeed = 5f;` not public fields. Use `[Header]`, `[Range]`, `[Tooltip]`.\n- Cache components in `Awake` (`rb = GetComponent<Rigidbody2D>();`). Use `[RequireComponent]` where a dependency is mandatory.\n- Never call `GameObject.Find`, `FindObjectOfType`/`FindFirstObjectByType` or `GetComponent` inside `Update`.\n- Physics in `FixedUpdate`; input and visuals in `Update`. Multiply by `Time.deltaTime` (or `fixedDeltaTime`) for frame-rate independence.\n- Use `ScriptableObject` assets for tuning data (enemy stats, level settings) so designers tweak without code.\n- Events: C# `event Action<int>` or `UnityEvent` for \"something happened\"; keep singletons to a GameManager and an AudioManager at most.\n- Avoid per-frame allocations (LINQ, string concatenation, `new` lists in `Update`) — they cause stutters, especially on web.\n- Object-pool anything spawned often (bullets, particles).\n- Check which input system the project uses (`Packages/manifest.json` contains `com.unity.inputsystem`?) and stick to it.\n\n## Before you say \"done\"\n- Code compiles: ask the human to check the Console for errors, or run a batch-mode build.\n- List the editor steps the human must do, numbered.\n"
    },
    {
      "path": "CLAUDE.md",
      "role": "adapter",
      "description": "Imports AGENTS.md for Claude Code.",
      "skill": null,
      "agent": "claude-code",
      "install_to": {
        "claude-code": "CLAUDE.md",
        "codex": null,
        "cursor": null,
        "gemini-cli": null,
        "copilot": null
      },
      "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/CLAUDE.md",
      "raw_latest_url": "https://loadout.jnw-it.com/raw/unity-game-jam/latest/CLAUDE.md",
      "bytes": 367,
      "lang": "markdown",
      "content": "# CLAUDE.md\n\n@AGENTS.md\n\n## Claude Code notes\n- Skills from this loadout live in `.claude/skills/`: `unity-web-build`. Use them when their description matches the task.\n- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.\n\n<!-- From the Agent Loadout \"Unity C# game jam\" v1.0.0 — https://loadout.jnw-it.com/loadouts/unity-game-jam/ -->\n"
    },
    {
      "path": "GEMINI.md",
      "role": "adapter",
      "description": "Imports AGENTS.md for Gemini CLI.",
      "skill": null,
      "agent": "gemini-cli",
      "install_to": {
        "claude-code": null,
        "codex": null,
        "cursor": null,
        "gemini-cli": "GEMINI.md",
        "copilot": null
      },
      "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/GEMINI.md",
      "raw_latest_url": "https://loadout.jnw-it.com/raw/unity-game-jam/latest/GEMINI.md",
      "bytes": 368,
      "lang": "markdown",
      "content": "# GEMINI.md\n\n@./AGENTS.md\n\n## Gemini CLI notes\n- Skills from this loadout live in `.agents/skills/`: `unity-web-build`. Use them when their description matches the task.\n- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.\n\n<!-- From the Agent Loadout \"Unity C# game jam\" v1.0.0 — https://loadout.jnw-it.com/loadouts/unity-game-jam/ -->\n"
    },
    {
      "path": ".cursor/rules/unity-csharp.mdc",
      "role": "rules",
      "description": "Unity C# rule, applied to scripts under Assets/.",
      "skill": null,
      "agent": null,
      "install_to": {
        "claude-code": null,
        "codex": null,
        "cursor": ".cursor/rules/unity-csharp.mdc",
        "gemini-cli": null,
        "copilot": null
      },
      "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/.cursor/rules/unity-csharp.mdc",
      "raw_latest_url": "https://loadout.jnw-it.com/raw/unity-game-jam/latest/.cursor/rules/unity-csharp.mdc",
      "bytes": 782,
      "lang": "markdown",
      "content": "---\ndescription: Unity C# script rules\nglobs: \"Assets/**/*.cs\"\nalwaysApply: false\n---\n\n- `[SerializeField] private` for inspector fields, never public fields for tuning.\n- Cache `GetComponent` results in `Awake`. No `Find*` or `GetComponent` calls in `Update`, `FixedUpdate` or `LateUpdate`.\n- Rigidbody movement in `FixedUpdate`; read input in `Update`.\n- No allocations in per-frame methods: no LINQ, no `new List<>`, no string building.\n- File name must match the class name, or Unity cannot attach the script.\n- When renaming a serialised field, add `[UnityEngine.Serialization.FormerlySerializedAs(\"oldName\")]`.\n- Editor-only code goes in an `Editor/` folder or inside `#if UNITY_EDITOR` so player builds do not break.\n- Do not move or rename files without their `.meta` file.\n"
    },
    {
      "path": "skills/unity-web-build/SKILL.md",
      "role": "skill",
      "description": "Builds a web (WebGL) player from the command line, ready for itch.io.",
      "skill": "unity-web-build",
      "agent": null,
      "install_to": {
        "claude-code": ".claude/skills/unity-web-build/SKILL.md",
        "codex": ".agents/skills/unity-web-build/SKILL.md",
        "cursor": ".agents/skills/unity-web-build/SKILL.md",
        "gemini-cli": ".agents/skills/unity-web-build/SKILL.md",
        "copilot": ".agents/skills/unity-web-build/SKILL.md"
      },
      "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md",
      "raw_latest_url": "https://loadout.jnw-it.com/raw/unity-game-jam/latest/skills/unity-web-build/SKILL.md",
      "bytes": 2586,
      "lang": "markdown",
      "content": "---\nname: unity-web-build\ndescription: 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.\n---\n\n# Unity web build for itch.io\n\n## 1. Add a build script (once)\nCreate `Assets/Editor/BuildScript.cs`:\n\n```csharp\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.Build.Reporting;\nusing UnityEngine;\n\npublic static class BuildScript\n{\n    public static void BuildWeb()\n    {\n        PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat.Gzip;\n        PlayerSettings.WebGL.decompressionFallback = true; // works on hosts without Content-Encoding headers\n\n        var scenes = EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray();\n        var report = BuildPipeline.BuildPlayer(new BuildPlayerOptions\n        {\n            scenes = scenes,\n            locationPathName = \"Build/Web\",\n            target = BuildTarget.WebGL,\n            options = BuildOptions.None\n        });\n\n        Debug.Log($\"Build {report.summary.result}: {report.summary.totalSize / (1024 * 1024)} MB\");\n        if (report.summary.result != BuildResult.Succeeded) EditorApplication.Exit(1);\n    }\n}\n```\n\nThe human must have the **Web/WebGL Build Support** module installed for their editor version (Unity Hub → Installs → Add modules).\nScenes must be listed and ticked in Build Settings / Build Profiles.\n\n## 2. Build in batch mode\nClose the editor first (batch mode cannot open a project that is already open).\n\n```sh\n# Path to the editor varies: Unity Hub → Installs → ⋯ → Show in folder\n\"<path-to-Unity>\" -batchmode -quit -projectPath . -executeMethod BuildScript.BuildWeb -logFile -\n```\nExit code 0 means success. On failure, search the log for `error CS` (compile errors) or `Build Failed`.\n\n## 3. Check and test\n- `Build/Web` should contain `index.html`, `Build/` and `TemplateData/`.\n- Serve locally (`npx serve Build/Web`) and ask the human to play for 30 seconds. Audio starts after the first click.\n- If the build is over ~100 MB, suggest lowering texture max sizes and using compressed audio before upload.\n\n## 4. Upload\n- Zip the **contents** of `Build/Web` (so `index.html` is at the root of the zip), or use butler:\n  `butler push Build/Web user/game-slug:html5`.\n- On itch.io: Kind of project → HTML, tick \"played in the browser\", set the viewport to the canvas size, enable the fullscreen button.\n\n## 5. Report\nBuild size, any warnings worth fixing, the upload channel, and the itch.io steps the human still needs to click.\n"
    }
  ],
  "requires": {
    "tools": [
      "unity-editor"
    ],
    "env": [],
    "mcp": []
  },
  "tested": {
    "status": "untested",
    "last_run": null,
    "fixture": null,
    "per_agent": {
      "claude-code": "untested",
      "codex": "untested",
      "cursor": "untested",
      "gemini-cli": "untested",
      "copilot": "untested"
    }
  },
  "security": {
    "scanned": true,
    "scanner": "intake-precheck/1",
    "verdict": "clean",
    "network": false,
    "scripts": [],
    "notes": "The skill asks the agent to add an editor build script to your project; it does not download anything."
  },
  "featured": false,
  "deprecated": false,
  "last_checked": "2026-10-15",
  "published": "2026-10-15",
  "updated": "2026-10-15",
  "compatibility": {
    "claude-code": "native",
    "codex": "native",
    "cursor": "native",
    "gemini-cli": "native",
    "copilot": "native"
  },
  "counts": {
    "rules": 2,
    "skills": 1,
    "mcp": 0
  },
  "url": "https://loadout.jnw-it.com/loadouts/unity-game-jam/",
  "api_url": "https://loadout.jnw-it.com/api/loadouts/unity-game-jam.json",
  "verification": {
    "level": "verified-install",
    "status": "verified",
    "label": "Verified install",
    "verified": true,
    "checked_at": "2026-10-16T22:54:03Z",
    "commit": "ad36e852567aa3c87821d2a9e2fe4052fd983374",
    "content_current": true,
    "agent_tests": "not-run",
    "counts": {
      "pass": 8,
      "fail": 0,
      "skip": 0,
      "not_applicable": 2
    },
    "meaning": "Level 1: automated checks on the files (parse, install paths, MCP config, safety scan, references, size, licence, starter build). No AI agent was run.",
    "checks": [
      {
        "id": "listing",
        "name": "Listing",
        "status": "pass",
        "summary": "Schema valid; 5 files declared, none missing or extra",
        "details": [
          "tested.status: untested (agent tests are separate from Level 1)"
        ]
      },
      {
        "id": "parse",
        "name": "Files parse",
        "status": "pass",
        "summary": "All 5 files parse; front matter valid",
        "details": []
      },
      {
        "id": "adapters",
        "name": "Adapters",
        "status": "pass",
        "summary": "CLAUDE.md and GEMINI.md import AGENTS.md and are up to date",
        "details": [
          "CLAUDE.md: matches the generator",
          "GEMINI.md: matches the generator"
        ]
      },
      {
        "id": "install-paths",
        "name": "Install paths",
        "status": "pass",
        "summary": "Correct paths for all 5 agents; layouts re-discovered",
        "details": [
          "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/"
        ]
      },
      {
        "id": "mcp",
        "name": "MCP config",
        "status": "n/a",
        "summary": "No MCP servers in this loadout",
        "details": []
      },
      {
        "id": "safety",
        "name": "Safety scan",
        "status": "pass",
        "summary": "Clean: no credentials, risky shell or hidden text",
        "details": [
          "Scanner intake-precheck/1: verdict clean; network no (listing says no)"
        ]
      },
      {
        "id": "references",
        "name": "References",
        "status": "pass",
        "summary": "1 reference between files resolves for every agent",
        "details": []
      },
      {
        "id": "size",
        "name": "Size limits",
        "status": "pass",
        "summary": "5 files, 6.5 KB total; largest skills/unity-web-build/SKILL.md 2.5 KB",
        "details": [
          "Limits: 30 files, 32 KB per file, 128 KB total, 500 lines per skill or rule"
        ]
      },
      {
        "id": "licence",
        "name": "Licence",
        "status": "pass",
        "summary": "MIT, by Agent Loadout; text in the repository LICENSE",
        "details": []
      },
      {
        "id": "starter-build",
        "name": "Starter build",
        "status": "n/a",
        "summary": "Not applicable: the Unity Editor needs a licence and a multi-gigabyte install, so it can't run free and quickly in CI",
        "details": [
          "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."
        ]
      }
    ]
  },
  "install": {
    "claude-code": {
      "files": [
        {
          "path": "AGENTS.md",
          "target": "AGENTS.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md",
          "role": "instructions"
        },
        {
          "path": "CLAUDE.md",
          "target": "CLAUDE.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/CLAUDE.md",
          "role": "adapter"
        },
        {
          "path": "skills/unity-web-build/SKILL.md",
          "target": ".claude/skills/unity-web-build/SKILL.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md",
          "role": "skill"
        }
      ],
      "manual_steps": [],
      "zip_url": "https://loadout.jnw-it.com/download/unity-game-jam/claude-code.zip"
    },
    "codex": {
      "files": [
        {
          "path": "AGENTS.md",
          "target": "AGENTS.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md",
          "role": "instructions"
        },
        {
          "path": "skills/unity-web-build/SKILL.md",
          "target": ".agents/skills/unity-web-build/SKILL.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md",
          "role": "skill"
        }
      ],
      "manual_steps": [],
      "zip_url": "https://loadout.jnw-it.com/download/unity-game-jam/codex.zip"
    },
    "cursor": {
      "files": [
        {
          "path": "AGENTS.md",
          "target": "AGENTS.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md",
          "role": "instructions"
        },
        {
          "path": ".cursor/rules/unity-csharp.mdc",
          "target": ".cursor/rules/unity-csharp.mdc",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/.cursor/rules/unity-csharp.mdc",
          "role": "rules"
        },
        {
          "path": "skills/unity-web-build/SKILL.md",
          "target": ".agents/skills/unity-web-build/SKILL.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md",
          "role": "skill"
        }
      ],
      "manual_steps": [],
      "zip_url": "https://loadout.jnw-it.com/download/unity-game-jam/cursor.zip"
    },
    "gemini-cli": {
      "files": [
        {
          "path": "AGENTS.md",
          "target": "AGENTS.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md",
          "role": "instructions"
        },
        {
          "path": "GEMINI.md",
          "target": "GEMINI.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/GEMINI.md",
          "role": "adapter"
        },
        {
          "path": "skills/unity-web-build/SKILL.md",
          "target": ".agents/skills/unity-web-build/SKILL.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md",
          "role": "skill"
        }
      ],
      "manual_steps": [],
      "zip_url": "https://loadout.jnw-it.com/download/unity-game-jam/gemini-cli.zip"
    },
    "copilot": {
      "files": [
        {
          "path": "AGENTS.md",
          "target": "AGENTS.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/AGENTS.md",
          "role": "instructions"
        },
        {
          "path": "skills/unity-web-build/SKILL.md",
          "target": ".agents/skills/unity-web-build/SKILL.md",
          "raw_url": "https://loadout.jnw-it.com/raw/unity-game-jam/1.0.0/skills/unity-web-build/SKILL.md",
          "role": "skill"
        }
      ],
      "manual_steps": [],
      "zip_url": "https://loadout.jnw-it.com/download/unity-game-jam/copilot.zip"
    }
  },
  "source_zip_url": "https://loadout.jnw-it.com/download/unity-game-jam/source.zip"
}