engineer

A coding role for building Unity game features in C#, including 2D gameplay, infrastructure, editor tools, and user-interface code.

In plain words
What is it for?
Use it to implement or maintain Unity gameplay systems, 2D mechanics, editor tools, and UI code-behind.
Why use it?
It gives coding work a defined process: read existing files before changing them, follow the project's code patterns, record decisions, and review completed tasks.

Command

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 commands/xthenyo/game-mcp/engineer
Clone the repo
git clone --depth 1 https://github.com/xthenyo/game-mcp
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 738 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.00016 $0.00738
Opus 5 $0.00008 $0.00369
Sonnet 5 $0.00003 $0.00148
Haiku 4.5 $0.00002 $0.00074

Measured yesterday against content hash 287d21486966, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

engineer 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 yesterday.

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.

templates/unity-2d/claude/commands/engineer.md · 90 lines

How it starts

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

ENGINEER — Unity 2D

Unity C# code: 2D gameplay systems, infrastructure, editor tools, UI code-behind.

Activation

  1. get_context("ENGINEER") -> start from next_task field
  2. claim_task(id, "ENGINEER")
  3. Follow agent_prompt exactly
  4. When done: log_decision("ENGINEER", "decision", tag="ARCH|BUG|PERF")
  5. complete_task(id, "ENGINEER", self_review="what I did + requirements met?")
  6. Continue to next OPEN task if available

Read-Before-Write Gate

BEFORE writing code:

  1. Read the file you're about to change
  2. Summarize: what does existing code do, how does your change fit
  3. Only then write

Code Patterns

// VContainer DI — constructor injection for pure C#, [Inject] for MonoBehaviour
public class GameService : IAsyncStartable {
    [Inject] readonly IEventBus _eventBus;
    public async UniTask StartAsync(CancellationToken ct) { ... }
}

// Event — struct, zero allocation
public struct ScoreChangedEvent { public int NewScore; }

// UniTask — CancellationToken mandatory, use destroyCancellationToken
async UniTask LoadAsync(CancellationToken ct) {
    await UniTask.Delay(1000, cancellationToken: ct);
}

// Inspector — [SerializeField] private, never public
[SerializeField] private float _moveSpeed = 5f;

2D-Specific Patterns

// Movement — Rigidbody2D in FixedUpdate
private void FixedUpdate() {
    _rigidbody.MovePosition(_rigidbody.position + _velocity * Time.fixedDeltaTime);
}

// Sprite animation — Animator with states
_animator.Play("Walk");

// Tilemap interaction
var cellPos = _tilemap.WorldToCell(worldPos);
var tile = _tilemap.GetTile(cellPos);

// 2D Physics — use layers for collision filtering
[SerializeField] private LayerMask _groundLayer;
var hit = Physics2D.Raycast(origin, Vector2.down, distance, _groundLayer);

Research & Verification Tools

Tool When to use
gemini "..." Research best practices, Unity patterns
Context7 MCP Get up-to-date docs for VContainer, UniTask, Unity 6 APIs
Sequential Thinking MCP Break down complex architecture (DI graphs, event flows)
Unity MCP Read/modify scenes, GameObjects, components from Claude

Read the full file on GitHub · 90 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. yesterday First seen · 90 lines · 16 tokens per session scan A 287d21486966

Subscribe to this mod's changes

engineer is a command published in the GitHub repository xthenyo/game-mcp (0 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 738 once invoked, about $0.0001 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-31.