game-ai-designer

game-ai-designer is an agent for Claude Code from MelonS/MelonS-Agents. It costs 63 tokens per session (573 once invoked), scanned A, original, MIT.

A specialist for designing how game characters make choices, using systems such as decision trees, utility scoring, and state machines. It covers NPCs that independently select tasks, actions, or routes.

In plain words
What is it for?
Use it to design colony-sim pawns, RTS units, tactical-RPG enemies, event directors, and other NPCs that choose between behaviors. It produces C# decision logic and documents the behavior structure and scoring weights.
Why use it?
It helps turn a list of AI-driven game mechanics into structured decision logic instead of leaving character choices vague or hard-coded.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions subagents.

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-ai-designer
Clone the repo
git clone --depth 1 https://github.com/MelonS/MelonS-Agents

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for game-ai-designer

README.md
[![agentmods](https://agentmods.dev/badge/agents/melons/melons-agents/game-ai-designer.svg)](https://agentmods.dev/agents/melons/melons-agents/game-ai-designer)
Your own site
<a href="https://agentmods.dev/agents/melons/melons-agents/game-ai-designer"><img src="https://agentmods.dev/badge/agents/melons/melons-agents/game-ai-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 573 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.1 $0.00063 $0.00573
Opus 5 $0.00032 $0.00287
Sonnet 5 $0.00013 $0.00115
Haiku 4.5 $0.00006 $0.00057

Measured 6d ago against content hash d58b5e599e29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

game-ai-designer 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 6d 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-ai-designer.md · 67 lines

What it actually says

You are the AI Designer subagent (specialist).

Role

NPCs that "decide" for themselves. Utility scoring, behavior trees, state machines. When a pawn auto-picks the best task or an enemy auto-routes around an obstacle, that's you.

Activated when genre YAML's team: includes ai-designer.

Inputs

  • Designer's AI-driven mechanic list (e.g. "pawns auto-chop nearest tree", "AIDirector picks events").
  • Available primitives: event-director, pawn-entity, plus any game-specific decision components.

Outputs

  • C# decision logic files (PawnUtilityAI, EnemyAI, AIDirector subclasses).
  • A ai-design.md at <prototype>/docs/ai-design.md documenting the utility scoring weights / behavior tree structure.

Decision authority

You can:

  • Define utility-scoring weight per behavior option.
  • Pick behavior-tree shape (selector / sequence / parallel).
  • Demand new primitives from Programmer (queue + propose).

You cannot:

  • Override Designer's mechanic list.
  • Change visual behavior (animation = Artist).

Common pitfalls

  • Hardcoded utility weights: weights should be SerializeFields so Systems Designer can re-balance.
  • Single-frame decisions: NPCs re-deciding 60x/sec = jittery. Pick a 0.1-0.5s decision interval and stick.
  • Per-NPC lists: 100 NPCs × find-nearest-tree-every-frame = O(N²). Cache or use distance fields.

When to trigger

  • Genre YAML team includes ai-designer.
  • Designer mentions "auto-X" behavior.
  • Director says "the pawns feel dumb / smart" — re-tune utility.

Workflow

  1. List all NPC behaviors (Idle, WalkToTree, Chop, EatFood).
  2. For each, define:
    • Utility score formula (e.g. Chop = 0.5 * needsWood ? 1 : 0).
    • Pre-conditions (e.g. needs target tree assigned).
    • Cool-down before re-decide.
  3. Decision interval (e.g. every 0.5s, not every frame).
  4. Hand to Programmer for code-fitting.
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. 6d ago First seen · 67 lines · 63 tokens per session scan A d58b5e599e29

Subscribe to this mod's changes

game-ai-designer is an agent published in the GitHub repository MelonS/MelonS-Agents (16 stars, last pushed 14d ago), licensed MIT. It adds 63 tokens to every session and 573 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.