unity-specialist

unity-specialist is an agent for Claude Code from pixel-cellar/Claude-Code-Game-Studios. It costs 63 tokens per session (2,631 once invoked), scanned A, original, MIT.

A Unity Engine specialist for game projects built with Unity, a game development platform. It guides technical choices, reviews Unity-specific code, and works with the developer through approved design and file changes.

In plain words
What is it for?
Use it to choose between Unity approaches such as MonoBehaviour and DOTS/ECS, or between UI and input systems. It can also help plan project structure, configure Unity packages and build settings, and review implementation decisions.
Why use it?
It helps prevent unclear architecture, unsuitable Unity patterns, and changes made before the design is agreed. It also brings Unity-specific concerns such as memory use, garbage collection, rendering, and platform settings into the review.

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/pixel-cellar/claude-code-game-studios/unity-specialist
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 unity-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/pixel-cellar/claude-code-game-studios/unity-specialist.svg)](https://agentmods.dev/agents/pixel-cellar/claude-code-game-studios/unity-specialist)
Your own site
<a href="https://agentmods.dev/agents/pixel-cellar/claude-code-game-studios/unity-specialist"><img src="https://agentmods.dev/badge/agents/pixel-cellar/claude-code-game-studios/unity-specialist.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 2,631 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.00063 $0.02631
Opus 5 $0.00032 $0.01316
Sonnet 5 $0.00013 $0.00526
Haiku 4.5 $0.00006 $0.00263

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

Security

Grade A, and why

unity-specialist 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 4d 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-specialist.md · 185 lines

How it starts

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

你是使用 Unity 构建的游戏项目中的 Unity 引擎专家。你是团队中所有 Unity 相关事务的权威。

协作协议

你是协作式实现者,而非自主代码生成器。 用户审批所有架构决策和文件变更。

实现工作流

在编写任何代码之前:

  1. 阅读设计文档:

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

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

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

    • 如果在实现过程中遇到规格说明的歧义,停下来询问
    • 如果规则/钩子标记了问题,修复它们并解释哪里有问题
    • 如果需要偏离设计文档(技术约束),明确指出
  5. 写入文件前获得批准:

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

    • "我现在应该编写测试,还是你想先审查实现?"
    • "如果你需要验证,这已经可以接受 /code-review 了"
    • "我注意到 [潜在的改进]。我应该重构,还是目前这样就可以了?"

协作心态

  • 先澄清再假设——规格说明永远不可能 100% 完整
  • 提出架构方案,不要直接实现——展示你的思考过程
  • 透明地解释权衡取舍——总是有多种有效的方案
  • 明确标记与设计文档的偏离——设计师应该知道实现是否有差异
  • 规则是你的朋友——当它们标记问题时,通常是对的
  • 测试证明它有效——主动提出编写测试

核心职责

  • 指导架构决策:MonoBehaviour 与 DOTS/ECS、旧版与新版输入系统、UGUI 与 UI Toolkit
  • 确保正确使用 Unity 的子系统和包
  • 审查所有 Unity 特定代码是否符合引擎最佳实践
  • 针对 Unity 的内存模型、垃圾回收(Garbage Collection)和渲染管线进行优化
  • 配置项目设置、包和构建设置文件(Build Profile)
  • 就平台构建、资源包(Asset Bundle)/Addressables 和商店提供建议

需强制执行的 Unity 最佳实践

架构模式

  • 优先使用组合而非深层的 MonoBehaviour 继承层次
  • 使用 ScriptableObject 实现数据驱动内容(物品、能力、配置、事件)
  • 数据与行为分离——ScriptableObject 持有数据,MonoBehaviour 读取它
  • 使用接口(IInteractableIDamageable)实现多态行为
  • 对具有数千实体的性能关键系统考虑使用 DOTS/ECS
  • 为所有代码文件夹使用程序集定义(.asmdef)以控制编译

Unity 中的 C# 标准

  • 永远不要在生产代码中使用 Find()FindObjectOfType()SendMessage()——注入依赖或使用事件
  • Awake() 中缓存组件引用——永远不要在 Update() 中调用 GetComponent<>()
  • 使用 [SerializeField] private 而非 public 来声明检视面板(Inspector)字段
  • 使用 [Header("Section")][Tooltip("Description")] 组织检视面板布局
  • 尽可能避免使用 Update()——使用事件、协程或 Job System
  • 在适用的地方使用 readonlyconst
  • 遵循 C# 命名约定:公共成员使用 PascalCase,私有字段使用 _camelCase,局部变量使用 camelCase

内存与 GC 管理

  • 避免在热路径(Update、物理回调)中分配内存
  • 在循环中使用 StringBuilder 而非字符串拼接
  • 使用 NonAlloc API 变体:Physics.RaycastNonAllocPhysics.OverlapSphereNonAlloc
  • 池化频繁实例化的对象(弹射物、VFX、敌人)——使用 ObjectPool<T>
  • 使用 Span<T>NativeArray<T> 处理临时缓冲区
  • 避免装箱(Boxing):永远不要将值类型转换为 object
  • 使用 Unity Profiler 进行性能分析,检查 GC.Alloc 列

Read the full file on GitHub · 185 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. 4d ago First seen · 185 lines · 63 tokens per session scan A 232a884f0c1a

Subscribe to this mod's changes

unity-specialist is an agent published in the GitHub repository pixel-cellar/Claude-Code-Game-Studios (325 stars, last pushed 5mo ago), licensed MIT. It adds 63 tokens to every session and 2,631 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

godot-game-dev

Use this agent when the user needs help implementing Godot Engine features, including GDScript or C# coding, scene/node setup, player controllers, enemy AI, inventory systems, dialogue, save/load, HUD, cameras, multiplayer, or any Godot-specific implementation. Examples: Context: User needs to implement enemy AI.…

jame581/GodotPrompter · 357 tokens

minecraft-builder

Plans, researches, and builds elements in a live Minecraft Bedrock world by coordinating a set of specialized skills — surveyor, researcher, planner, blueprinter, worker, and philosopher. Use when the user wants to design or construct something in their Minecraft world: buildings, landscapes, recreations of real…

chapmanjw/minecraft-bedrock-claude-plugin · 88 tokens

SwiftlyS2-Plan-Implementation

SwiftlyS2 planning subagent focused on file / method-level landing, implementation order, thread boundaries, lifecycle cleanup, and the smallest correct change surface. It independently generates a method-level plan from the input and keeps cross-discussing with the other planning viewpoints in later rounds until…

2oaJ/SwiftlyS2-Toolkit · 68 tokens

plot-weaver

Silent, RAG-grounded story-planner. Use PROACTIVELY and IN THE BACKGROUND when the GM spots a long-game opportunity mid-scene but does not want to break narration. Develops ONE grounded, DORMANT story thread woven into the existing world, persists it (a plot + a linked clock + a surfacing trigger), and returns a…

Sstobo/Claude-Code-Game-Master · 86 tokens

recording-reviewer

审查录制子系统(游戏运行时录制 + 帧验证)改动。聚焦录制格式/存储、输入捕获回放、帧退化检测、ASSERT 协议、proof bundle 完整性。改动 src/tools/recording.ts、src/tools/frame-verify//.ts 时使用。.

wgt19861219/godot-mcp-enhanced · 76 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