game-perf

game-perf is a command for Claude Code from HermeticOrmus/LibreGameDev-Claude-Code. It costs 17 tokens per session (786 once invoked), scanned A, original, MIT.

A command for investigating and improving game performance through profiling, draw-call reduction, level of detail, and object pooling.

In plain words
What is it for?
Use it to identify CPU or graphics bottlenecks, configure batching and level-of-detail changes, and reuse objects instead of repeatedly creating them.
Why use it?
It helps diagnose frame drops and reduce the work needed to display many objects or effects.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the performance-optimization plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it to identify CPU or graphics bottlenecks, configure batching and level-of-detail changes, and reuse objects instead of repeatedly creating them.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libregamedev-claude-code/game-perf
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/HermeticOrmus/LibreGameDev-Claude-Code

Made for: Claude Code.

Or install performance-optimization, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

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 game-perf

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/hermeticormus/libregamedev-claude-code/game-perf"><img src="https://agentmods.dev/badge/commands/hermeticormus/libregamedev-claude-code/game-perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 786 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.00017 $0.00786
Opus 5.5 $0.00007 $0.00314
Sonnet 5.5 $0.00003 $0.00157
Haiku 4.5 $0.00002 $0.00079

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

Security

Grade A, and why

game-perf 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 15d 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.

plugins/performance-optimization/commands/game-perf.md · 93 lines

How it starts

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

/game-perf

Game performance profiling, batching, LOD configuration, and object pooling.

Trigger

/game-perf [action] [target]

Actions

profile

Identify performance bottleneck from symptom description.

/game-perf profile "game drops to 45fps with 50 enemies on screen"
/game-perf profile "30fps on mobile with 1000 foliage instances"
/game-perf profile "frame spike every 2 seconds"

Output: Diagnosis checklist (CPU vs GPU bound, draw calls, physics contacts), profiler setup guide, custom monitor code.

batch

Implement draw call reduction strategies.

/game-perf batch "1000 foliage meshes causing 1000 draw calls"
/game-perf batch "200 coins scattered in level all individual"
/game-perf batch "particle effects creating hundreds of draw calls"

Output: MultiMeshInstance3D implementation, instancing shader, or static batching setup.

lod

Configure LOD transitions for 3D objects.

/game-perf lod "character models need LOD at 10, 30, 80 meters"
/game-perf lod "vegetation disappears abruptly instead of fading"
/game-perf lod "impostor LOD for distant buildings"

Output: LOD node configuration, visibility range values, fade mode setup.

pool

Implement object pool for frequently spawned objects.

/game-perf pool "bullet projectiles, 200 active max"
/game-perf pool "enemy spawner, 50 concurrent enemies"
/game-perf pool "audio player pool for SFX"

Output: GenericPool GDScript, acquire/release usage, pool size calculation.

Examples

Diagnosing 45fps with 50 enemies:

/game-perf profile "game runs at 45fps. 50 enemies active. physics on."

Diagnostic steps:

  1. Open Godot Profiler; check physics % of frame time
  2. If physics > 50%: reduce physics body count, use Area3D for detection instead of RigidBody
  3. If render > 50%: check draw calls; enable Profiler > GPU
  4. If script > 50%: check enemy AI tick rate; reduce to 10Hz for distant enemies

1000 foliage draw calls:

/game-perf batch "1000 grass meshes using 1000 draw calls, 30fps on target GPU"

Produces: FoliageRenderer using MultiMeshInstance3D, terrain-aligned random placement, optional wind shader via instance uniforms.

Read the full file on GitHub · 93 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. 15d ago First seen · 93 lines · 17 tokens per session scan A d3d57b4bb581

Subscribe to this mod's changes

game-perf is a command published in the GitHub repository HermeticOrmus/LibreGameDev-Claude-Code (5 stars, last pushed 15d ago), licensed MIT. It adds 17 tokens to every session and 786 once invoked, about $0.0001 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-01.

Related

Other commands, from other repositories

build-and-compilation

These commands drive the build/compile/test dev loop, plus build configuration: triggering Player builds and reading the resulting BuildReport, switching the active build target, enumerating targets, reading/writing EditorUserBuildSettings, and listing Build Profiles. Several commands are asynchronous: trigger the…

Alex-Rachel/TEngine · 0 tokens

animation

Author animation assets: AnimationClips (and their float curves), AnimatorControllers (parameters, layers, states, transitions), and Timeline assets. Create commands write under the authoring root and follow the shared confirm/dryrun convention.

Alex-Rachel/TEngine · 0 tokens

assets-and-files

Commands for creating, importing, moving, copying, renaming, deleting and finding project assets, plus folder and text-file operations. Every agent-supplied path is funnelled through the authoring-root sandbox (it rejects ../ and out-of-project writes); destructive or overwriting operations require confirm=true and…

Alex-Rachel/TEngine · 0 tokens

gameobjects-and-components

Commands for creating GameObjects, querying the scene hierarchy, mutating the core GameObject/Transform surface, and adding/removing components and editing their serialized properties. Scene mutations are wrapped in Unity's Undo system (so a multi-step action reverts as one collapsible step) and are blocked during…

Alex-Rachel/TEngine · 0 tokens

project-settings

Read and change a representative slice of Unity's project-wide settings (Audio, Graphics, Input, Physics, Player, Quality, Tags & Layers, Time). get commands read a group's current values into a ProjectSettingsResponse; set commands mutate them through the shared confirm/dryrun convention, so confirm=true is required…

Alex-Rachel/TEngine · 0 tokens

baking

Bake and clear precomputed scene data: lightmaps, NavMesh, and occlusion culling. Each bake runs asynchronously (returns immediately) — poll the matching bakestatus until completed. The clear commands are destructive and require confirm=true. The getsettings / setsettings pairs read and tune the bake parameters.

Alex-Rachel/TEngine · 0 tokens