Codex skills for Unity

With these skills Codex reads ProjectVersion.txt and your asmdefs before writing C#, uses the Unity 6 API names instead of 2022-era ones, and profiles a development build on the target device before changing anything for speed. Shared skills add Unity-specific advice on Entities, NGO netcode, uGUI and UI Toolkit focus, and save files under persistentDataPath.

Start with these 3

  1. Unity C# Scripting Components that designers can tune, not rewrite Codex checks the Unity version, asmdefs and installed packages before writing a line, then builds small components with serialized private fields, moves tuning numbers into ScriptableObject assets, and replaces FindObjectOfType singletons with explicit wiring or event channels. It knows the Unity 6 renames, the fake-null trap and domain-reload leaks, and proves logic with EditMode tests run in batch mode. Game Development$unity-csharp
  2. Unity Performance Name the bottleneck before touching the code Codex profiles a development build on the target device, classifies the frame as CPU, render thread, GPU or GC bound, and only then changes code. It removes per-frame allocations, pools spawns, splits dirty canvases, checks SRP Batcher and GPU Resident Drawer compatibility in the Frame Debugger, and reports median and p95 frame times before and after so wins are proven rather than assumed. Game Development$unity-performance
  3. ECS Architecture Data-only components, single-purpose systems Codex first decides whether ECS is worth it for the game, then picks a library and storage model that fits the language and churn pattern. It models small data-only components and tags, writes one transformation per system over narrow queries, defers spawning and component changes to a defined sync point, and declares system order in one place so behaviour does not depend on registration accidents. Game Development$ecs-architecture

Every Unity skill in one command

Installs these 6 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.

The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh

curl -fsSL codexskills.dev/install.sh | sh -s -- unity-csharp unity-performance ecs-architecture game-save-systems multiplayer-netcode game-ui

Unity FAQ

Does the Unity skill know the Unity 6 API changes?

Yes. Unity C# Scripting checks m_EditorVersion in ProjectVersion.txt (6000.x is Unity 6) and keeps a table of renames, such as FindObjectOfType becoming FindFirstObjectByType or FindAnyObjectByType and rb.velocity becoming rb.linearVelocity. It prefers Awaitable with destroyCancellationToken over coroutines for timed waits, and it warns that ?. and ?? skip Unity's overridden null check on destroyed objects.

Can Codex profile and fix frame drops in a Unity game?

Unity Performance builds a Development Build with Autoconnect Profiler on the target device, captures 300+ frames and classifies the frame as CPU main thread, render thread, GPU, physics or GC bound before changing code. It treats editor Play mode numbers as unreliable for final results. Typical fixes are ObjectPool spawning, zero GC allocation per frame, splitting dirty canvases and checking SRP Batcher or GPU Resident Drawer compatibility, with median and p95 frame times reported before and after.

How do Codex skills run Unity tests from the command line?

Unity C# Scripting puts tests in Assets/Tests/EditMode and Assets/Tests/PlayMode, each with its own asmdef, and keeps pure logic like damage math in plain C# classes so EditMode tests cover it. It runs them with the editor in -batchmode with -runTests -testPlatform EditMode and writes results to an XML file. PlayMode tests are expected for anything that touches physics or scenes.

How do I install all 6 Unity skills at once?

Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- unity-csharp unity-performance ecs-architecture game-save-systems multiplayer-netcode game-ui. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.

Which Unity skill should I try first?

Unity C# Scripting is the closest fit for most Unity work. Mention it with $unity-csharp in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.

esc