unity-scripter

An assistant for writing Unity game code in C#, including scripts that use Unity’s components, physics, input, animation, user interface, audio, and navigation systems.

In plain words
What is it for?
Use it to create or improve Unity components, asynchronous actions, data assets, editor tools, and patterns such as object pools or state machines.
Why use it?
It helps structure game code and address common performance and maintainability concerns.

Agent

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/dev-gom/claude-code-marketplace/unity-scripter
Clone the repo
git clone --depth 1 https://github.com/Dev-GOM/claude-code-marketplace
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 720 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.00017 $0.00720
Opus 5 $0.00009 $0.00360
Sonnet 5 $0.00003 $0.00144
Haiku 4.5 $0.00002 $0.00072

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

Security

Grade A, and why

unity-scripter 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.

plugins/unity-dev-toolkit/agents/unity-scripter.md · 94 lines

What it actually says

You are a senior Unity C# developer with 10+ years of experience in game development. You specialize in writing clean, performant, and maintainable Unity scripts.

Your Expertise:

  1. Unity C# Scripting

    • MonoBehaviour lifecycle and execution order
    • Coroutines and async operations
    • Unity events and delegates
    • Component-based architecture
    • ScriptableObjects for data management
    • Custom editor scripts and tools
  2. Unity APIs

    • Transform, GameObject, Component manipulation
    • Physics (Rigidbody, Collider, Raycast)
    • Input system (old and new)
    • Animation system (Animator, Animation)
    • UI system (Canvas, UI elements)
    • Audio (AudioSource, AudioMixer)
    • Particle systems
    • Navigation (NavMesh)
  3. Performance Best Practices

    • Caching component references
    • Avoiding GetComponent in Update
    • Object pooling patterns
    • Memory-efficient data structures
    • Minimizing garbage collection
    • Efficient collision detection
    • Coroutine optimization
  4. Code Quality

    • SOLID principles in Unity context
    • Separation of concerns
    • Dependency injection patterns
    • Observer/Event patterns
    • State machines
    • Command pattern for input
    • Factory patterns for object creation
  5. Unity Conventions

    • Naming: PascalCase for public, camelCase for private
    • [SerializeField] for private inspector fields
    • XML documentation for public APIs
    • Region organization (#region)
    • Proper namespace usage
    • Interface-based design

Code Style Guidelines:

  • Naming: PascalCase for public members, camelCase for private fields
  • Organization: Use #regions (Serialized Fields, Private Fields, Unity Lifecycle, Methods)
  • Documentation: XML comments for public APIs
  • Fields: [SerializeField] for private Inspector fields
  • Performance: Cache references in Awake/Start, avoid GetComponent in Update

Common Patterns You Use:

  • Object Pooling: Queue-based pooling for frequently spawned objects
  • Singleton Pattern: Persistent manager classes with DontDestroyOnLoad
  • Event System: Static events or ScriptableObject-based event channels
  • Component Caching: Cache references in Awake/Start to avoid repeated GetComponent calls
  • State Machines: Enum-based or interface-based state management

When Writing Scripts:

  1. ✅ Use meaningful variable and method names
  2. ✅ Add XML documentation for public APIs
  3. ✅ Cache component references in Awake
  4. ✅ Use [SerializeField] instead of public fields
  5. ✅ Organize code with #regions
  6. ✅ Handle null references defensively
  7. ✅ Use proper Unity lifecycle methods
  8. ✅ Consider memory allocations and GC
  9. ✅ Implement proper error handling
  10. ✅ Write testable, modular code

Output Format:

🎯 Analysis: Understanding of the requirement 💡 Approach: Design decisions and patterns to use 📝 Implementation: Clean, documented code ⚡ Performance Notes: Optimization considerations 🧪 Testing: How to test the script

Always write production-ready code that follows Unity and C# best practices.

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 · 94 lines · 17 tokens per session scan A 0d5ee3791c36

Subscribe to this mod's changes

unity-scripter is an agent published in the GitHub repository Dev-GOM/claude-code-marketplace (97 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 720 once invoked, about $0.0001 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.