unity-performance

unity-performance is a skill for Claude Code from dyCuong03/unity-agent-team. It costs 95 tokens per session (1,055 once invoked), scanned A, original, MIT.

A Unity performance review guide that looks for common causes of slow frames, memory allocations, and unnecessary repeated work. It focuses on likely problems in update loops, lookups, object creation, physics, animation, and UI.

In plain words
What is it for?
Use it when investigating lag or frame drops, reviewing Update code, checking hot paths, or deciding where profiling and optimization should focus.
Why use it?
It helps find avoidable runtime costs without assuming that a suspicious code pattern is slow before checking its real impact.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when investigating lag or frame drops, reviewing Update code, checking hot paths, or deciding where profiling and optimization should focus.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dycuong03/unity-agent-team/performance
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.

Any agent
npx skills add dyCuong03/unity-agent-team --skill performance
Clone the repo
git clone --depth 1 https://github.com/dyCuong03/unity-agent-team

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dycuong03/unity-agent-team/performance/github.svg)](https://agentmods.dev/skills/dycuong03/unity-agent-team/performance)
Your own site
<a href="https://agentmods.dev/skills/dycuong03/unity-agent-team/performance"><img src="https://agentmods.dev/badge/skills/dycuong03/unity-agent-team/performance/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 unity-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/dycuong03/unity-agent-team/performance"><img src="https://agentmods.dev/badge/skills/dycuong03/unity-agent-team/performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,055 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.00095 $0.01055
Opus 5.5 $0.00038 $0.00422
Sonnet 5.5 $0.00019 $0.00211
Haiku 4.5 $0.00010 $0.00105

Measured 11d ago against content hash 6a54f6feccd2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unity-performance 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 11d 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/skills/unity-skills/skills/performance/SKILL.md · 79 lines

How it starts

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

Unity Performance Red Flags

Use this skill for a high-signal review of likely Unity performance issues. Focus on red flags, not speculative micro-optimizations.

Check For

  • Too many unrelated Update / LateUpdate / FixedUpdate loops
  • Repeated Find, GetComponent, Camera.main, or tag lookups in hot paths
  • Frequent Instantiate / Destroy suitable for pooling
  • Avoidable per-frame allocations:
    • LINQ
    • string formatting
    • closures
    • boxing
  • Reflection in runtime hot paths
  • Expensive editor-only helpers leaking into runtime code
  • Physics, animation, or UI updates happening at the wrong cadence

Hidden Costs: Possibility ≠ Actuality

Three counter-intuitive traps where what seems "free" is actually expensive. Each cost is paid for possibility of work, not for work actually performed — which is why profilers rarely catch them directly.

Write permission costs, even without writing

A component whose Update can mutate transform.position pays the cost whether the branch runs or not: dirty-flag and serialization systems treat write permission as a reason to poll every frame. Similarly, a [SerializeField] field that is never modified at runtime still sits on the serialization path. The fix is to remove the permission, not tighten the branch — split the rarely-needed writer into its own component and AddComponent only when needed. Source: NetcodeSamples/HelloNetcode/2_Intermediate/07_Optimization/Optimization.md — "a system with the possibility of writing to a component, regardless of whether it writes to it or not, will always have to be serialized".

Sequential seeds produce correlated random streams

Seeding N RNG instances with baseSeed + i gives N similar streams — patrol paths line up, spawn jitter clumps, loot rolls cluster. Hash the index before seeding:

// Wrong — N correlated streams
for (int i = 0; i < N; i++) rngs[i] = new System.Random(baseSeed + i);

// Correct — hash decorrelates adjacent seeds
for (int i = 0; i < N; i++)
    rngs[i] = new System.Random((int)((uint)baseSeed * 2654435761u ^ (uint)i));

Unity.Mathematics.Random.CreateFromIndex(i) applies this internally and is preferred when the math package is available. Source: Dots101/Entities101/Assets/HelloCube/3. Prefabs/SpawnSystem.cs:37-39 and its comment.

Read the full file on GitHub · 79 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. 11d ago First seen · 79 lines · 95 tokens per session scan A 6a54f6feccd2

Subscribe to this mod's changes

unity-performance is a skill published in the GitHub repository dyCuong03/unity-agent-team (7 stars, last pushed 2mo ago), licensed MIT. It adds 95 tokens to every session and 1,055 once invoked, about $0.0004 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-10-02.