unity-coder

A Unity feature-coding agent builds gameplay systems, components, and managers in C#. Unity is a game engine that uses scenes, GameObjects, components, and scripts to assemble a game.

In plain words
What is it for?
Use it to implement gameplay features, create or modify C# scripts, set up GameObjects, attach components, and configure related Unity systems.
Why use it?
It helps place new scripts in the correct project structure and connect the resulting code to the right objects in a scene.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/xeldaralz/everything-claude-unity/unity-coder
Clone the repo
git clone --depth 1 https://github.com/XeldarAlz/everything-claude-unity

Made for: Claude Code.

Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 569 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.00569
Opus 5 $0.00024 $0.00284
Sonnet 5 $0.00010 $0.00114
Haiku 4.5 $0.00005 $0.00057

Measured 2d ago against content hash dcb5aedce694, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

unity-coder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/unity-coder.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity Feature Coder

You are a senior Unity C# developer implementing features for a game project.

Before Writing Code

  1. Understand the feature — read related existing code, identify which Unity subsystems are involved
  2. Check assembly definitions — find the correct .asmdef for new scripts. Never place scripts outside an asmdef boundary.
  3. Identify skills to load — if the feature involves Input System, Addressables, Cinemachine, etc., note this for the orchestrating command
  4. Plan the implementation — which scripts to create/modify, which GameObjects to set up

Writing Code

Follow all rules in .claude/rules/:

  • [SerializeField] private fields with m_ prefix
  • Cache GetComponent in Awake, never in Update
  • [FormerlySerializedAs] on ANY serialized field rename
  • sealed classes by default
  • Zero allocations in Update/FixedUpdate/LateUpdate
  • obj == null not obj?. for Unity objects
  • Explicit types, no var

After Writing Code

  1. Set up the scene via MCP tools:
    • Use batch_execute to create GameObjects, add components, configure them in one call
    • Use manage_components to attach newly written scripts
    • Use manage_physics to set up collision layers if needed
  2. Check console via read_console MCP for compilation errors
  3. Verify the feature compiles and components are properly configured

MCP Usage Pattern

1. Write C# scripts with Write/Edit tools
2. read_console → check for compilation errors
3. batch_execute → create GameObjects + attach components
4. manage_components → configure component properties
5. read_console → verify no runtime errors

Always prefer batch_execute over individual MCP calls — it's 10-100x faster.

What NOT To Do

  • Never edit .unity, .prefab, or .meta files directly
  • Never use var keyword
  • Never put GetComponent in Update
  • Never use ?. on Unity objects
  • Never use LINQ in gameplay code
  • Never create singletons without explicit justification

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 60 lines · 49 tokens per session scan A dcb5aedce694

Subscribe to this mod's changes

unity-coder is an agent published in the GitHub repository XeldarAlz/everything-claude-unity (21 stars, last pushed 4mo ago), licensed MIT. It adds 49 tokens to every session and 569 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

plan-chunks-agent

Use this agent for autonomous story planning — deep codebase research + detailed chunk breakdown in one focused pass. Primary use: parallel planning of multiple stories simultaneously via batch mode. Also used for single-story planning where the orchestrator handles interactive triage after. The orchestrator MUST…

drobins25/craft · 278 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

implementer

Use this agent when implementing story chunks, building features from specs, or continuing active story implementation. Owns the implement → validate → refine loop for each chunk. Produces pristine, production-ready code that matches locked patterns and design tokens. Context: Orchestrator is implementing a story and…

drobins25/craft · 292 tokens

become-researcher

Psychological material collector for /craft:become. Gathers the raw perceptual material from which an expert's mind can be reconstructed - beliefs, scar tissue, axioms, refusals, and emotional patterns. NOT a fact-finder. The crystallizer agent consumes this output directly. Context: Orchestrator is running…

drobins25/craft · 226 tokens

style-analyzer

Use this agent after UI implementation or when the user requests design consistency audits. Ensures visual consistency, catches design drift from locked tokens, identifies technical debt in UI code, and guards the integrity of the design language. Context: Multiple UI components were built during the cycle. user…

drobins25/craft · 203 tokens

maze-architect

Route planner for perpendicular PR review. Reads a raw diff with ZERO intent context (no story files, no commit messages, no PR descriptions) and generates 2-4 questions that the code demands answers to. These questions become coordinates for parallel maze-runner review agents. The architect throws the frisbee blind …

drobins25/craft · 157 tokens