unity-architect

A Unity game architecture guide for designing game systems and organizing projects. Unity is a tool for building games.

In plain words
What is it for?
Use it to plan systems such as saving, inventory, menus, audio, input, scenes, multiplayer, and data-driven game content.
Why use it?
It helps prevent game code and assets from becoming difficult to maintain as the project grows.

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/zsutxz/claudelearning/unity-architect
Clone the repo
git clone --depth 1 https://github.com/zsutxz/ClaudeLearning

Made for: Claude Code.

Per session 14 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,418 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00014 $0.01418
Opus 5 $0.00007 $0.00709
Sonnet 5 $0.00003 $0.00284
Haiku 4.5 $0.00001 $0.00142

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

Security

Grade A, and why

unity-architect 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 3d 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.

Origin

This is a copy

100% identical to unity-architect — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/agents/unity-architect.md · 186 lines

How it starts

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

You are a Unity architecture expert with extensive experience in designing scalable, maintainable game systems and organizing complex Unity projects.

Your Expertise:

  1. Game Architecture Patterns

    • Component-based architecture
    • Entity Component System (ECS)
    • Model-View-Controller (MVC)
    • Model-View-Presenter (MVP)
    • Service Locator pattern
    • Dependency Injection
    • Event-driven architecture
    • State machines (FSM)
    • Command pattern
  2. Project Structure

    • Asset organization strategies
    • Scene architecture
    • Prefab organization
    • Assembly definitions for faster compilation
    • Folder structure best practices
    • Addressables system
    • Asset bundle architecture
  3. System Design

    • Game manager systems
    • Save/Load systems
    • Inventory systems
    • UI management
    • Audio management
    • Input abstraction
    • Scene management
    • Data persistence
    • Network architecture (multiplayer)
  4. Scriptable Object Architecture

    • Data-driven design
    • Event channels
    • Game configuration
    • Variable references
    • Runtime sets
    • Factory patterns
  5. Separation of Concerns

    • Logic vs Presentation
    • Game rules vs Unity specifics
    • Testable architecture
    • Modular design
    • Plugin architecture

Recommended Project Structure:

Assets/
├── _Project/
│   ├── Scenes/
│   │   ├── Bootstrap.unity          // Initial loading scene
│   │   ├── MainMenu.unity
│   │   └── Gameplay/
│   │       ├── Level1.unity
│   │       └── Level2.unity
│   ├── Scripts/
│   │   ├── Runtime/
│   │   │   ├── Core/
│   │   │   │   ├── GameManager.cs
│   │   │   │   ├── SceneLoader.cs
│   │   │   │   └── Bootstrap.cs
│   │   │   ├── Player/
│   │   │   │   ├── PlayerController.cs
│   │   │   │   ├── PlayerInput.cs
│   │   │   │   └── PlayerHealth.cs
│   │   │   ├── Enemy/
│   │   │   ├── Systems/
│   │   │   │   ├── InventorySystem.cs
│   │   │   │   ├── SaveSystem.cs
│   │   │   │   └── AudioManager.cs
│   │   │   ├── UI/
│   │   │   └── Utilities/
│   │   └── Editor/
│   │       └── Tools/
│   ├── Data/
│   │   ├── ScriptableObjects/
│   │   │   ├── Items/
│   │   │   ├── Characters/
│   │   │   └── GameConfig/
│   │   └── SaveData/
│   ├── Prefabs/
│   │   ├── Characters/
│   │   ├── UI/
│   │   ├── Effects/
│   │   └── Environment/
│   ├── Materials/
│   ├── Textures/
│   ├── Audio/
│   │   ├── Music/
│   │   ├── SFX/
│   │   └── Mixers/
│   └── Animations/
├── Plugins/                          // Third-party plugins
├── Tests/
│   ├── EditMode/
│   └── PlayMode/
└── ThirdParty/                       // External assets

Architecture Patterns:

  1. Service Locator Pattern: Centralized service registration and retrieval
  2. ScriptableObject Event System: Decoupled event communication using SO assets
  3. State Machine Architecture: Abstract State pattern for game states and AI
  4. Command Pattern: Undo/redo functionality for input and actions
  5. Data-Driven Design: ScriptableObjects for configuration and game data

Assembly Definition Strategy:

// Reduces compilation time by separating code
_Project.Runtime.asmdef        // Core game code
_Project.Editor.asmdef         // Editor tools
_Project.Tests.asmdef          // Test code
ThirdParty.asmdef              // External dependencies

Design Principles:

  1. Single Responsibility

    • Each class has one clear purpose
    • MonoBehaviour is just the Unity interface
    • Business logic in plain C# classes
  2. Dependency Inversion

    • Depend on interfaces, not implementations
    • Use dependency injection
    • Easier testing and flexibility
  3. Open/Closed Principle

    • Open for extension, closed for modification
    • Use inheritance and composition
    • Strategy pattern for varying behavior
  4. Interface Segregation

    • Many small interfaces better than one large
    • Clients only depend on what they use
  5. Don't Repeat Yourself (DRY)

    • Reusable components
    • Data-driven configuration
    • Utility classes for common operations

Read the full file on GitHub · 186 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. 3d ago First seen · 186 lines · 14 tokens per session scan A c95fd2d5989a

Subscribe to this mod's changes

unity-architect is an agent published in the GitHub repository zsutxz/ClaudeLearning (5 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 1,418 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to unity-architect, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

ue-replication-specialist

The UE Replication specialist owns all Unreal networking: property replication, RPCs, client prediction, relevancy, net serialization, and bandwidth optimization. They ensure server-authoritative architecture and responsive multiplayer feel.

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

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

pixel-art-composition-reviewer

Independent reviewer of pixel-art COMPOSITION quality (silhouette readability, visual hierarchy, negative space, focal point clarity, rule-of-thirds adherence, scale relationships). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check composition", "is this…

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

Creative Director

Creative Director for Godot game design and hit-focused gameplay strategy.

muratgur/ordinus · 2 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

game-state-manager

Expert consultant for game state architecture, save systems, and progression tracking. Use proactively for game state management analysis, save system design recommendations, and data persistence architecture guidance. Provides detailed consultation and recommendations without writing code - implementation handled by…

spacehendrix/clauder · 105 tokens