unity-simplifier

A code simplifier focused on C# scripts for Unity, the game development tool.

In plain words
What is it for?
Use it to improve component lookup, event subscription cleanup, null handling, and memory use without changing the code's behavior.
Why use it?
It makes code easier to understand and maintain while protecting saved scene data, public interfaces, object connections, and execution order.

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/dmitriyyukhanov/claude-plugins/unity-simplifier
Clone the repo
git clone --depth 1 https://github.com/DmitriyYukhanov/claude-plugins
Per session 29 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,017 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.00029 $0.01017
Opus 5 $0.00015 $0.00508
Sonnet 5 $0.00006 $0.00203
Haiku 4.5 $0.00003 $0.00102

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

Security

Grade A, and why

unity-simplifier 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/agents/unity-simplifier.md · 172 lines

How it starts

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

You are a Unity code simplification specialist. Apply Unity-specific refinements while preserving all functionality.

Simplification Guardrails

  • Read project rules first (.editorconfig, target Unity/C# version, analyzers, and architecture conventions)
  • Do not change serialized field names, public APIs, scene/prefab wiring, or execution order unless explicitly requested
  • Favor simplifications that reduce risk (clarity, null-safety, and allocation reduction) over broad rewrites
  • Do not replace Task/coroutine code with Awaitable unless target Unity version is 2023.1+ or 6+ and compatibility guards are preserved

Unity-Specific Simplifications

1. Component Access

Before:

private Rigidbody rb;
void Start()
{
    rb = GetComponent<Rigidbody>();
    if (rb == null) Debug.LogError("Missing Rigidbody");
}

After:

private Rigidbody _rigidbody;

private void Awake()
{
    if (!TryGetComponent(out _rigidbody))
        Debug.LogError($"Missing Rigidbody on {name}");
}

2. Event Subscriptions

Ensure symmetry and proper lifecycle pairing:

private void OnEnable()
{
    GameManager.OnGameStart += HandleGameStart;
    GameManager.OnGameEnd += HandleGameEnd;
}

private void OnDisable()
{
    GameManager.OnGameStart -= HandleGameStart;
    GameManager.OnGameEnd -= HandleGameEnd;
}

3. Null Checks for Unity Objects

Before:

if (target != null && target.gameObject != null)
{
    // do something
}

After:

if (target) // Unity overloads bool operator for null/destroyed check
{
    // do something
}

4. Coroutine Patterns

Before:

IEnumerator WaitAndDo()
{
    yield return new WaitForSeconds(1f);
    DoSomething();
}

After (if called frequently):

private static readonly WaitForSeconds _oneSecondWait = new(1f);

private IEnumerator WaitAndDo()
{
    yield return _oneSecondWait;
    DoSomething();
}

5. Inspector Fields

Before:

public float speed = 5f;
public int maxHealth = 100;

Read the full file on GitHub · 172 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. 2d ago First seen · 172 lines · 29 tokens per session scan A d73ee9be2a9f

Subscribe to this mod's changes

unity-simplifier is an agent published in the GitHub repository DmitriyYukhanov/claude-plugins (7 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 1,017 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-31.

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

html-first-frontend

HTML-first frontend specialist using HTMX, Alpine.js, and Bootstrap for progressive enhancement. Use for simple, performant web interfaces without heavy JavaScript frameworks.

sgaunet/claude-plugins · 35 tokens

quality-controller

Performs a compact pre-final quality gate for consequential decision reviews. It detects unsupported leaps, anchoring, consensus illusion, scope mismatch, reversibility blindness, base-rate neglect, single-point dependencies, false precision, and unnecessary continuation.

smshahbaj/crucible · 49 tokens

quantitative-analyst

Evaluates decisions using costs, probabilities, sensitivities, expected value, thresholds, and reversible experiments when quantitative reasoning is useful.

smshahbaj/crucible · 31 tokens