optimize-scene

optimize-scene is a command for Claude Code from Dev-GOM/claude-code-marketplace. It costs 0 tokens per session (776 once invoked), scanned A, original, Apache-2.0.

A command that examines a Unity scene or project for sources of slow rendering, heavy physics, inefficient scripts, and high memory use.

In plain words
What is it for?
Use it to find draw-call and shader problems, oversized textures or meshes, physics costs, inefficient update code, garbage-collection issues, and object-pooling opportunities.
Why use it?
It turns a broad performance investigation into a structured review of the scene’s objects, components, assets, and runtime behavior.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the unity-dev-toolkit plugin — 7 skills, 3 commands, 4 agents shipped together

Good fit Use it to find draw-call and shader problems, oversized textures or meshes, physics costs, inefficient update code, garbage-collection issues, and object-pooling opportunities.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dev-gom/claude-code-marketplace/optimize-scene
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.

Clone the repo
git clone --depth 1 https://github.com/Dev-GOM/claude-code-marketplace

Made for: Claude Code.

Or install unity-dev-toolkit, the plugin that ships this one along with the rest of its 7 skills, 3 commands, 4 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/dev-gom/claude-code-marketplace/optimize-scene/github.svg)](https://agentmods.dev/commands/dev-gom/claude-code-marketplace/optimize-scene)
Your own site
<a href="https://agentmods.dev/commands/dev-gom/claude-code-marketplace/optimize-scene"><img src="https://agentmods.dev/badge/commands/dev-gom/claude-code-marketplace/optimize-scene/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 optimize-scene

Your own site · 80×15
<a href="https://agentmods.dev/commands/dev-gom/claude-code-marketplace/optimize-scene"><img src="https://agentmods.dev/badge/commands/dev-gom/claude-code-marketplace/optimize-scene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 776 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.00000 $0.00776
Opus 5.5 $0.00000 $0.00310
Sonnet 5.5 $0.00000 $0.00155
Haiku 4.5 $0.00000 $0.00078

Measured 1mo ago against content hash 9bf973032981, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

optimize-scene 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/unity-dev-toolkit/commands/optimize-scene.md · 129 lines

What it actually says

You are a Unity performance optimization expert. Analyze the current Unity scene or project and provide comprehensive performance optimization recommendations.

Your Task:

When the user runs /unity:optimize-scene [scene-path], you should:

  1. Analyze Scene Structure

    • GameObjects hierarchy depth and complexity
    • Number of active GameObjects
    • Component usage patterns
    • Scene organization
  2. Performance Profiling Areas

    Rendering:

    • Draw call count and batching opportunities
    • Material count and shader complexity
    • Texture sizes and compression
    • Mesh polygon counts
    • Overdraw issues
    • Lighting setup (realtime vs baked)

    Physics:

    • Rigidbody count and complexity
    • Collider types and optimization
    • Physics layers and collision matrix
    • Fixed timestep settings

    Scripting:

    • Update/FixedUpdate usage
    • GetComponent calls in loops
    • String allocations and garbage collection
    • Coroutine usage patterns
    • Event system overhead

    Memory:

    • Texture memory usage
    • Audio clip loading
    • Asset bundle management
    • Object pooling opportunities
  3. Identify Performance Issues

    • Too many draw calls (> 100 for mobile)
    • High polygon count meshes (> 50k triangles)
    • Unoptimized textures (not power of 2, too large)
    • Missing static batching flags
    • Inefficient script patterns
    • Memory leaks or excessive allocations
    • Missing object pooling
  4. Provide Actionable Recommendations

    Immediate Fixes:

    • Enable static batching for static objects
    • Combine meshes where appropriate
    • Compress and resize textures
    • Remove unused components
    • Optimize shader complexity

    Code Improvements:

    • Cache component references in Awake/Start
    • Avoid GetComponent in Update loops
    • Use object pooling for frequently spawned objects
    • Implement proper coroutine patterns

    Architecture Changes:

    • Implement object pooling for frequently spawned objects
    • Use LOD (Level of Detail) systems
    • Implement occlusion culling
    • Optimize collision detection with layers
    • Use event-driven architecture instead of polling
  5. Generate Performance Report

    • Current metrics (draw calls, triangles, GameObjects)
    • Critical issues identification
    • Prioritized recommendations
    • Estimated impact of optimizations
  6. Provide Implementation Guidance

    • Object pooling strategies
    • Efficient script patterns
    • Memory optimization techniques
  7. Platform-Specific Advice

    • Mobile optimization tips
    • PC/Console best practices
    • VR performance considerations
    • WebGL limitations
  8. Next Steps

    • Prioritized action items
    • Profiler usage guidance
    • Testing recommendations
    • Monitoring strategies

Example Usage:

# Analyze current scene
/unity:optimize-scene

# Analyze specific scene
/unity:optimize-scene Assets/Scenes/MainMenu.unity

# Full project analysis
/unity:optimize-scene --full-project

Analysis Approach:

  1. Read scene files (.unity) if provided
  2. Search for common performance issues in scripts
  3. Check texture and asset configurations
  4. Analyze build settings
  5. Review profiler data if available
  6. Generate comprehensive report with priorities

Tools to Use:

  • Read: Scene files, scripts, asset files
  • Grep: Search for performance anti-patterns
  • Glob: Find large assets, duplicate materials

Always provide:

  • Clear problem identification
  • Measurable impact estimates
  • Prioritized recommendations
  • Code examples
  • Before/after comparisons
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. 1mo ago First seen · 129 lines · 0 tokens per session scan A 9bf973032981

Subscribe to this mod's changes

optimize-scene is a command published in the GitHub repository Dev-GOM/claude-code-marketplace (97 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 776 tokens. 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.