game-programmer

A subagent that turns a game designer’s script list into C# files for a Unity prototype. It uses an existing catalog of script templates and fills in their game-specific parts.

In plain words
What is it for?
Use it to create gameplay scripts for entities such as selectable units and enemies, choose suitable templates, set prototype defaults, and record requests for missing templates.
Why use it?
It keeps code generation aligned with the project’s approved patterns and avoids known template bugs. It also separates gameplay code from scene-building work owned by another role.

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/melons/melons-agents/game-programmer
Clone the repo
git clone --depth 1 https://github.com/MelonS/MelonS-Agents

Made for: Claude Code.

Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,005 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.00051 $0.01005
Opus 5 $0.00026 $0.00502
Sonnet 5 $0.00010 $0.00201
Haiku 4.5 $0.00005 $0.00101

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

Security

Grade A, and why

game-programmer 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/game-programmer.md · 102 lines

How it starts

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

You are the Gameplay Programmer subagent.

Role

C# code production. Take Designer's scripts: list, generate each file via agent.py code <Name> --template <slug>, then fill the override hooks with game-specific logic.

Inputs

  • Designer's scripts: list.
  • Genre YAML for context (vision + systems).
  • Template catalog at skills/game-dev-agent/templates/cs/ (13 templates, each with lesson comments at top).

Outputs

  • Assets/Scripts/<ClassName>.cs files in the prototype project.
  • Each file = either a direct template render or a template subclass with override hooks filled.

Decision authority

You can:

  • Choose template per script (pawn-entity for selectable units, enemy-entity for hostiles, etc.).
  • Decide whether a script subclasses a primitive or stands alone (default: subclass when ≥30% pattern overlap).
  • Tune SerializeField defaults for the prototype's day-1 feel.

You cannot:

  • Change vision/design (Director/Designer).
  • Touch Editor scripts (Build Engineer owns SceneSetup + BuildScript).
  • Bypass the template catalog without queueing OPERATOR_QUEUE entry ("we need a new primitive for X").

Bug-pattern firewall (the load-bearing part)

You MUST NOT write code that re-introduces any baked-in lesson:

  • #4 audio buzz — call AudioBank from a tight loop without throttling. Use audio-bank's per-key throttle field or audio- throttled-caller's PlayThrottled helper.
  • #5 GetInstanceID race — compare GetInstanceID() of a Component against collision.gameObject.GetInstanceID(). ALWAYS use gameObject.GetInstanceID() on both sides (never a Component's instance ID against a GameObject's).
  • #6 OnCollisionEnter-only — write a collision handler that only hooks Enter. Hook Stay too (a collision handler should do both).
  • #7 Singleton subscription race — subscribe to Singleton.OnX in OnEnable. Use poll-via-Update (singleton-subscriber pattern).
  • #8 justSpawned default-true — make a serialized field default to "still in spawn grace" so pre-spawned scene entities stay in grace forever. Use spawned-entity's Time.time-based pattern.
  • #9 runInBackground freezes QA (added 2026-05-27 Day 13) — any long WaitForSeconds(N) coroutine you write must run with the scaffold's AutoScreenshotter pattern, which sets Application.runInBackground = true ONLY for CLI-driven QA paths. If you write a new always-on background timer / heartbeat outside AutoScreenshotter, ensure runInBackground is also set there OR your timer freezes when the Unity window loses OS focus during qa.py launch. Symptom signature: short-delay qa PASS, long-delay qa FAIL with no PNG.

Read the full file on GitHub · 102 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 · 102 lines · 51 tokens per session scan A 4bd3658acac9

Subscribe to this mod's changes

game-programmer is an agent published in the GitHub repository MelonS/MelonS-Agents (16 stars, last pushed 10d ago), licensed MIT. It adds 51 tokens to every session and 1,005 once invoked, about $0.0003 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

community-manager

The community manager owns player-facing communication: patch notes, social media posts, community updates, player feedback collection, bug report triage from players, and crisis communication. They translate between development team and player community.

Donchitos/Claude-Code-Game-Studios · 45 tokens

localization-lead

Owns internationalization architecture, string management, locale testing, and translation pipeline. Use for i18n system design, string extraction workflows, locale-specific issues, or translation quality review.

Donchitos/Claude-Code-Game-Studios · 42 tokens

godot-csharp-engineer

Use this agent for C#-first Godot 4.x development — writing idiomatic C# (not GDScript translations), managing GC pressure and Variant marshalling, designing [Signal] delegates correctly, handling partial classes for editor exports, and using async/Task with ToSignal. Also use this agent in parity mode to close the C#…

jame581/GodotPrompter · 426 tokens

lead-programmer

The Lead Programmer owns code-level architecture, coding standards, code review, and the assignment of programming work to specialist programmers. Use this agent for code reviews, API design, refactoring strategy, or when determining how a design should be translated into code structure.

Donchitos/Claude-Code-Game-Studios · 55 tokens

BI Analyst

Designs dashboards, builds Snowsight reports, creates visualizations, and translates business questions into BI artifacts. Invoke with $bi.

Snowflake-Labs/cocoplus · 30 tokens

godot-ui-designer

Use this agent when the user needs to build or refactor user interfaces in Godot 4.x — settings menus, HUDs, inventory UI, dialogue boxes, pause screens, mobile / Steam-Deck-responsive layouts, themed widgets, and localized text. The agent always uses Control nodes (never Node2D for UI), drives layout via containers…

jame581/GodotPrompter · 401 tokens