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 commands/zsutxz/claudelearning/optimize-scenegit clone --depth 1 https://github.com/zsutxz/ClaudeLearningWrote 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/commands/zsutxz/claudelearning/optimize-scene)<a href="https://agentmods.dev/commands/zsutxz/claudelearning/optimize-scene"><img src="https://agentmods.dev/badge/commands/zsutxz/claudelearning/optimize-scene.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.00000 | $0.00776 |
| Opus 5 | $0.00000 | $0.00388 |
| Sonnet 5 | $0.00000 | $0.00155 |
| Haiku 4.5 | $0.00000 | $0.00078 |
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 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.
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.
This is a copy
100% identical to optimize-scene — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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:
-
Analyze Scene Structure
- GameObjects hierarchy depth and complexity
- Number of active GameObjects
- Component usage patterns
- Scene organization
-
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
-
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
-
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
-
Generate Performance Report
- Current metrics (draw calls, triangles, GameObjects)
- Critical issues identification
- Prioritized recommendations
- Estimated impact of optimizations
-
Provide Implementation Guidance
- Object pooling strategies
- Efficient script patterns
- Memory optimization techniques
-
Platform-Specific Advice
- Mobile optimization tips
- PC/Console best practices
- VR performance considerations
- WebGL limitations
-
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:
- Read scene files (.unity) if provided
- Search for common performance issues in scripts
- Check texture and asset configurations
- Analyze build settings
- Review profiler data if available
- 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
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 · 129 lines · 0 tokens per session scan A 9bf973032981
optimize-scene is a command published in the GitHub repository zsutxz/ClaudeLearning (5 stars, last pushed 1mo ago), licensed MIT. 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. It is 100% identical to optimize-scene, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
sim
Run the EmbodiedGen simulation rendering workflow with sim-cli.
speckit.taskstoissues
Command "speckit.taskstoissues" from akiojin/unity-mcp-server, covering ユーザー入力 and 実行手順.
cert-check
Review the current state against certification and platform compliance expectations.
combat-design
Design or revise combat rules, variables, readability, and tuning direction.
ui-flow-review
Review menus, HUD, navigation, and player flow from a UX perspective.
tech-debt
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create actionable remediation plans.