unity-profile

unity-profile is a command for Claude Code from XeldarAlz/everything-claude-unity. It costs 29 tokens per session (401 once invoked), scanned A, original, MIT.

A Unity performance investigation that records CPU and graphics timing, memory use, rendering activity, and physics statistics. Unity is a game-development platform.

In plain words
What is it for?
Use it to capture a profiling session, identify whether the CPU or graphics processor is the bottleneck, and receive optimization recommendations.
Why use it?
It shows where a game or interactive application is spending time or memory so performance problems can be located.

Command for Claude Code

Part of the everything-claude-unity plugin — 42 skills, 27 commands, 20 agents, 5 hooks shipped together

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 commands/xeldaralz/everything-claude-unity/unity-profile
Clone the repo
git clone --depth 1 https://github.com/XeldarAlz/everything-claude-unity

Made for: Claude Code.

Or install everything-claude-unity, the plugin that ships this one along with the rest of its 42 skills, 27 commands, 20 agents, 5 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-profile.svg)](https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-profile)
Your own site
<a href="https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-profile"><img src="https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-profile.svg" alt="Measured on agentmods" height="20"></a>
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 401 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.00401
Opus 5 $0.00015 $0.00200
Sonnet 5 $0.00006 $0.00080
Haiku 4.5 $0.00003 $0.00040

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

Security

Grade A, and why

unity-profile 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 5d 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/commands/unity-profile.md · 61 lines

What it actually says

/unity-profile — Deep Profiling Session

Run a deep profiling session. Focus: $ARGUMENTS

Workflow

Use the unity-optimizer agent to:

Step 1: Capture

manage_profiler action:"start_session"     → begin recording
manage_profiler action:"get_frame_timing"  → CPU and GPU frame times
manage_profiler action:"get_counters"      → specific perf counters
manage_profiler action:"memory_snapshot"   → detailed memory breakdown
manage_graphics action:"get_rendering_stats" → draw calls, batches, triangles, set passes
manage_physics  action:"get_stats"         → physics step time, contacts, bodies

Step 2: Analyze

Present a profile report:

Frame Timing:

  • CPU frame time: Xms (target: <16.6ms for 60fps)
  • GPU frame time: Xms
  • Bottleneck: CPU / GPU / balanced

Rendering:

  • Draw calls: X (budget: <100 mobile, <2000 desktop)
  • Batches: X (SRP Batcher efficiency)
  • Triangles: X
  • Set pass calls: X

Memory:

  • Total: X MB
  • Textures: X MB
  • Meshes: X MB
  • Audio: X MB
  • Scripts: X MB

Physics:

  • Physics step time: X ms
  • Active rigidbodies: X
  • Contacts: X

Step 3: Recommend

Provide specific, actionable optimization recommendations ranked by impact:

  1. Highest impact fix
  2. Second highest
  3. ...

Each recommendation includes: what to change, why, expected improvement.

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. 5d ago First seen · 61 lines · 29 tokens per session scan A a584e7b43c1b

Subscribe to this mod's changes

unity-profile is a command published in the GitHub repository XeldarAlz/everything-claude-unity (21 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 401 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.