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.
npx agentmods add skills/tianzhiying/unity-perf/unity-performancenpx skills add tianzhiying/Unity-perf --skill unity-performancegit clone --depth 1 https://github.com/tianzhiying/Unity-perfWrote 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.
[](https://agentmods.dev/skills/tianzhiying/unity-perf/unity-performance)<a href="https://agentmods.dev/skills/tianzhiying/unity-perf/unity-performance"><img src="https://agentmods.dev/badge/skills/tianzhiying/unity-perf/unity-performance.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00102 | $0.07482 |
| Opus 5 | $0.00051 | $0.03741 |
| Sonnet 5 | $0.00020 | $0.01496 |
| Haiku 4.5 | $0.00010 | $0.00748 |
Grade B, and why
unity-performance scanned grade B with 1 finding 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.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
A checklist cannot exhaust the problem space of real code. Run any code through the six thinking operators below first; use the checklist only as the last step before delivery, to catch omissions. How it starts
The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unity performance optimization
This skill sets the targets, establishes the disciplines, and points at what is easy to miss. The actual optimization ability comes from your own algorithmic repertoire, your understanding of engine internals, and the community practice you know. The reference files are a safety-net sweep before delivery, not a ceiling on what you produce. If every finding in a pass maps to a numbered checklist entry, that usually doesn't mean the code is clean — it means you didn't explore enough.
1. Acceptance criteria
Four non-negotiable targets. Every piece of performance work is accepted against them.
- Frame budget: 60 FPS means 16.6 ms per frame, 30 FPS means 33.3 ms. Every optimization must answer "where does this frame's time get saved."
- Zero GC on hot paths: code that runs every frame (Update, LateUpdate, coroutine bodies, UI refreshes, network packet handling) must hit GC Alloc = 0 B/frame. This is a hard standard, not a best effort.
- Correct algorithmic order: hot-path complexity must match the data scale. O(n²) paired with an n that can grow is a defect unless you produce evidence bounding n.
- Passes on device: the final measure is measured frame rate, PSS peak, and thermals on the target low-end device — not editor numbers.
2. Five iron rules
Violate any one of them and the optimization is redone.
- Measure before you touch. Take evidence with the Profiler (on device + Development Build) before optimizing, and re-measure the same scene after. Changing code on a hunch is forbidden. The only exception is fixing deterministic anti-patterns that are guaranteed wins and need no data.
- Measure on the target device. The editor adds its own overhead, and Mono and IL2CPP behave differently. Editor numbers don't count.
- Don't change things to show off. Run every change through three applicability questions — can you argue its correctness (give the boundary cases)? How large is the blast radius? Is the readability cost worth it? If it fails, say plainly "the current implementation is good enough."
- Optimization must not create new debt. Indexes, lookup tables, and heaps introduced by an algorithmic fix must be pre-allocated, reused, and capped. You may not fix an O(n²) problem by creating a "new dictionary every frame" problem. Accept on both columns: time and GC Alloc.
- Verify configuration claims. Whenever a conclusion depends on a compile switch, a macro, or build configuration (whether
[Conditional]gets stripped, whether the logging macro is defined, Debug vs Release differences, Scripting Define values), check the project's actual configuration before concluding. Hypothetical claims like "it should get stripped in the release build" are forbidden — the real state of a macro frequently invalidates the premise of an entire analysis.
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/baseline-antipatterns.md 14 KB
- references/benchmarking.md 5.1 KB
- references/csharp-hotpath.md 10 KB
- references/engine-rendering.md 9.1 KB
- references/jit-il2cpp-tricks.md 8.5 KB
- references/jobs-burst-dots.md 5.7 KB
- references/memory-gc-internals.md 7.4 KB
- references/profiling.md 5.3 KB
- references/span-collections-simd.md 7.6 KB
- references/tencent-optimization-playbook.md 12 KB
- references/ui-ugui-tmp.md 7.7 KB
- references/wetest-bugly-fieldops.md 9.3 KB
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.
- 4d ago First seen · 194 lines · 102 tokens per session scan B 5d3eb9eaa2af
unity-performance is a skill published in the GitHub repository tianzhiying/Unity-perf (2 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 7,482 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
cloudflare-durable-objects
Cloudflare Durable Objects for stateful coordination and real-time apps. Use for chat, multiplayer games, WebSocket hibernation, or encountering class export, migration, alarm errors.
stata-skill
A packaged Stata Runner skill via official MCP-for-Stata server including statado, adopackageinstall, help, readlog and getdatainfo tools. Use it when (1) need to execute Stata do-file; (2) missing ado-packages; (3) find code error caused by syntax in Stata; (4) want to read smcl and text format log file with rich…
mcp-smoke-test
Run a local smoke test for the Stata-MCP server.
rfc-impl-generator
Generate RFC and IMPL documents from a user-provided feature/fix description. Use when the user says something like "I want to add a feature with codex", "Implement this", "Write an RFC for...", or provides a short idea that needs to be formalized into the ai-driven/rfc + ai-driven/impl pipeline.
tools-unity-behavior-designer
Behavior Designer patterns for AI behavior trees including task creation, shared variables, conditionals, and debugging.
eng-unity-mobile-optimization
Mobile-specific Unity optimization patterns for memory, battery, thermal, and performance.