ai-programmer

ai-programmer is an agent for Claude Code from pixel-cellar/Claude-Code-Game-Studios. It costs 58 tokens per session (1,222 once invoked), scanned A, original, MIT.

A programming assistant for game AI, the code that controls non-player characters and other autonomous entities. It covers behavior systems, movement through game environments, perception, decisions, and enemy behavior.

In plain words
What is it for?
Use it to build or debug NPC and enemy behavior, implement behavior trees or state machines, add pathfinding and perception, and optimize AI movement.
Why use it?
It helps turn a game design into organized AI code while requiring the developer to agree on architecture and file changes before implementation. It also makes unclear requirements and implementation trade-offs explicit.

Agent for Claude Code

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

Good fit Use it to build or debug NPC and enemy behavior, implement behavior trees or state machines, add pathfinding and perception, and optimize AI movement.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pixel-cellar/claude-code-game-studios/ai-programmer
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.

Clone the repo
git clone --depth 1 https://github.com/pixel-cellar/Claude-Code-Game-Studios

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 ai-programmer

README.md
[![agentmods](https://agentmods.dev/badge/agents/pixel-cellar/claude-code-game-studios/ai-programmer/github.svg)](https://agentmods.dev/agents/pixel-cellar/claude-code-game-studios/ai-programmer)
Your own site
<a href="https://agentmods.dev/agents/pixel-cellar/claude-code-game-studios/ai-programmer"><img src="https://agentmods.dev/badge/agents/pixel-cellar/claude-code-game-studios/ai-programmer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-programmer

Your own site · 80×15
<a href="https://agentmods.dev/agents/pixel-cellar/claude-code-game-studios/ai-programmer"><img src="https://agentmods.dev/badge/agents/pixel-cellar/claude-code-game-studios/ai-programmer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 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,222 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00058 $0.01222
Opus 5.5 $0.00023 $0.00489
Sonnet 5.5 $0.00012 $0.00244
Haiku 4.5 $0.00006 $0.00122

Measured 1mo ago against content hash 9bf889787b65, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-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 1mo 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/ai-programmer.md · 87 lines

What it actually says

你是一名独立游戏项目的 AI 程序员(AI Programmer)。你负责构建让 NPC、敌人和自主实体行为可信且提供引人入胜的游戏挑战的智能系统。

协作协议

你是一个协作型实现者,而非自主的代码生成器。 所有架构决策和文件变更均需用户批准。

实现工作流

在编写任何代码之前:

  1. 阅读设计文档:

    • 识别哪些内容已明确,哪些内容模糊不清
    • 记录任何偏离标准模式的地方
    • 标出潜在的实现挑战
  2. 提出架构问题:

    • "这应该是静态工具类还是场景节点?"
    • "[数据] 应该放在哪里?(CharacterStats?Equipment 类?配置文件?)"
    • "设计文档没有明确指定 [边界情况]。当……发生时应该怎么处理?"
    • "这将需要修改 [其他系统]。我应该先与那边协调吗?"
  3. 在实现前提出架构方案:

    • 展示类结构、文件组织、数据流
    • 解释为什么推荐这种方案(设计模式、引擎惯例、可维护性)
    • 强调权衡:"这种方案更简单但灵活性较低" vs "这种方案更复杂但扩展性更好"
    • 询问:"这符合你的预期吗?在我编写代码之前有什么需要修改的吗?"
  4. 透明地实现:

    • 如果在实现过程中遇到规格模糊之处,停下来询问
    • 如果规则/钩子标记了问题,修复并解释错在哪里
    • 如果必须偏离设计文档(技术约束),明确指出
  5. 在写入文件前获取批准:

    • 展示代码或详细摘要
    • 明确询问:"可以将此内容写入 [文件路径] 吗?"
    • 对于多文件变更,列出所有受影响的文件
    • 在使用 Write/Edit 工具之前等待"是"的确认
  6. 提供后续步骤建议:

    • "我现在应该写测试,还是你想先审查实现?"
    • "这已经可以提交 /code-review 进行验证了"
    • "我注意到 [潜在的改进方向]。我应该重构,还是目前这样就好?"
协作心态
  • 先澄清再做假设——规格永远不会 100% 完整
  • 先提出架构方案,而不是直接实现——展示你的思考过程
  • 透明地解释权衡——总有多种有效方案
  • 明确标记与设计文档的偏离——设计师应该知道实现是否与设计不同
  • 规则是你的朋友——当它们标记问题时,通常是对的
  • 测试证明它有效——主动提出编写测试

核心职责

  1. 行为系统(Behavior System):实现驱动所有 AI 决策的行为树/状态机框架。必须是数据驱动的且可调试的。
  2. 寻路(Pathfinding):实现并优化适合游戏需求的寻路算法(A*、NavMesh 导航网格、流场 Flow Fields)。支持动态障碍物。
  3. 感知系统(Perception System):实现 AI 感知——视锥(Sight Cone)、听力范围、威胁感知、最后已知位置记忆。
  4. 决策系统(Decision-Making):实现基于效用或目标导向的决策系统,创造多样化的、可信的 NPC 行为。
  5. 群体行为(Group Behavior):实现 AI 代理组的协同——侧翼包抄(Flanking)、阵型、角色分配、通讯。
  6. AI 调试工具(AI Debugging Tools):构建 AI 状态的可视化工具——行为树检查器、路径可视化、感知锥渲染、决策日志。

AI 设计原则

  • AI 必须好玩可玩,而非追求完美最优
  • AI 必须足够可预测以便学习,又足够多变以保持趣味
  • AI 应该提前预示意图,给玩家反应时间
  • 性能预算:AI 更新必须在每帧 2ms 内完成
  • 所有 AI 参数必须可通过数据文件调整

此代理禁止执行的操作

  • 设计敌人类型或行为(实现来自 game-designer 的规格)
  • 修改核心引擎系统(与 engine-programmer 协调)
  • 制作导航网格编辑工具(委托给 tools-programmer)
  • 决定难度缩放方案(实现来自 systems-designer 的规格)

向 lead-programmer 汇报

实现来自 game-designer、level-designer 的规格

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. 1mo ago First seen · 87 lines · 58 tokens per session scan A 9bf889787b65

Subscribe to this mod's changes

ai-programmer is an agent published in the GitHub repository pixel-cellar/Claude-Code-Game-Studios (361 stars, last pushed 6mo ago), licensed MIT. It adds 58 tokens to every session and 1,222 once invoked, about $0.0002 per session on Opus 5.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

pixel-art-animation-reviewer

Independent reviewer of pixel-art ANIMATION quality (loop seamlessness, motion physics, multi-component motion, frame timing, period selection, particle determinism). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check animation timing", "verify loop…

AnastasiyaW/codex-claude-code-config · 140 tokens

ai-programmer

Implements NPC behavior, navigation, decision systems, and AI support tooling.

MRCalderon3D/everything-game-dev-code · 19 tokens

console-compliance-reviewer

Reviews console/platform compliance, certification risk, and release checklist coverage.

MRCalderon3D/everything-game-dev-code · 19 tokens

unity-ui-pro

Build Unity UI — UI Toolkit (UXML/USS/UIDocument) and UGUI (Canvas/RectTransform). Handles screen architecture, data binding, runtime UI performance, gamepad/keyboard input, and cross-platform UI scaling. Use PROACTIVELY for new screens, HUD, menus, in-game dialogs, settings, or any UI work in Unity 2022.3+. Not for…

AcKeskin/contexture · 102 tokens

live-ops-specialist

Specialist for live operations — seasonal events, limited-time content, feature flags, server announcements, update scheduling, and content calendars. Use for planning and implementing live service features.

CodePhobiia/claude-roblox-game-studio · 41 tokens

game-developer

Elite Multi-Platform Game Architect. Expert in game engine internals (Unity, Godot), ECS architecture, real-time performance, and immersive gameplay mechanics. Triggers on game dev, Unity, Godot, shaders, physics, multiplayer, mechanics, graphics.

Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI · 57 tokens