Agent skill

Performance Optimization

by ukanwat in ukanwat/overtime

Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object…

Apache-2.0Auto-check passedDevelopment

Install Performance Optimization

skills CLI
$ npx skills add ukanwat/overtime --skill performance-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ukanwat/overtime performance-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ukanwat/overtime.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/performance-optimization .claude/skills/performance-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
performance-optimization
GitHub stars
387
Used in
1 other repo
Token cost
~2.3k tokens
SKILL.md length
720 words
Files
2 (incl. references)
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object…

  • Works in 5 steps: Frame budget math (turn "feels slow"… → Measure with the engine profiler (do… → Object pooling (stop allocating/freeing… → …
  • The user mentions performance
  • SKILL.md covers When to use, The golden rule: measure…, Core workflow and Patterns, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Performance Optimization is an agent skill from ukanwat/overtime. Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object pooling, draw-call batching, fewer allocations/GC spikes, and asset budgets. Engine- neutral method that pairs with each engine's profiler. Use when the user mentions performance, optimize, low/dropping FPS, frame drops, stutter, lag, profiler, frame budget, draw calls, batching, garbage collection/GC spikes, object…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/profiling-and-budgets.md`). Compatibility notes: Engine-agnostic methodology; profiler/tooling notes for Godot 4.x, Unity 6, and Unreal 5. Pairs with physics-tuning and the engine skills.

It sits in Development, covering Performance optimization. The repository describes itself as: Give a coding agent a brief, not a chat, and it works on its own across sessions. Includes an example run: an open-world city built in a real game engine with no human help. In… The licence is Apache-2.0.

When your agent uses it

  • The user mentions performance
  • Low/dropping FPS
  • Garbage collection/GC spikes
  • The game runs slow

Example prompts

  • “the game runs slow”
  • “/performance-optimization”

Requirements

  • Compatibility (from SKILL.md): Engine-agnostic methodology; profiler/tooling notes for Godot 4.x, Unity 6, and Unreal 5. Pairs with physics-tuning and the engine skills.

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Frame budget math (turn "feels slow" into a number)
  2. Measure with the engine profiler (do this before any fix)
  3. Object pooling (stop allocating/freeing in hot loops)
  4. Cut draw calls (the most common GPU-side win)
  5. Kill per-frame allocations (GC spikes = stutter)

What it can do on your machine

Read from SKILL.md and the folder at commit fc215d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript and csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Engine-agnostic methodology; profiler/tooling notes for Godot 4.x, Unity 6, and Unreal 5. Pairs with physics-tuning and the engine skills.

    From compatibility in the SKILL.md frontmatter.

Context cost

Performance Optimization loads about 2.3k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 143 tokens; SKILL.md has 720 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ukanwat/overtime at commit fc215d4, republished under its Apache-2.0 licence (© ukanwat). 720 words, ~2,300 tokens.

Download SKILL.mdSave it as .claude/skills/performance-optimization/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
performance-optimization
description
Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object pooling, draw-call batching, fewer allocations/GC spikes, and asset budgets. Engine- neutral method that pairs with each engine's profiler. Use when the user mentions performance, optimize, low/dropping FPS, frame drops, stutter, lag, profiler, frame budget, draw calls, batching, garbage collection/GC spikes, object pooling, or "the game runs slow".
compatibility
Engine-agnostic methodology; profiler/tooling notes for Godot 4.x, Unity 6, and Unreal 5. Pairs with physics-tuning and the engine skills.
license
Apache-2.0
metadata.engine
none
metadata.category
disciplines
metadata.difficulty
advanced

Performance optimization

Performance work is a measurement discipline, not a bag of tricks. The method is always the same: profile → find the one bottleneck → fix that → measure again. This skill teaches that loop and the highest-leverage fixes (pooling, batching, allocation control, asset budgets), and points you at each engine's profiler. It pairs with physics-tuning for simulation cost.

When to use

  • Use when the frame rate is low or uneven, the game stutters/hitches, or it must hit a target (60 FPS desktop, 30/60 mobile) and currently doesn't.
  • Use to decide what to optimize: profile, read the frame budget, and identify whether the CPU or GPU is the bottleneck before changing any code.
  • Use to apply specific fixes: object pooling, draw-call/batch reduction, removing per-frame allocations and GC spikes, and setting asset budgets.

When not to use: for physics jitter/tunneling/timestep specifically, use physics-tuning. For the engine's concrete profiler UI and rendering settings, use that engine skill (godot-export covers some build settings; engine cores cover the rest). This skill is the cross-engine method and the shared fixes.

The golden rule: measure first, never guess

Most performance "fixes" applied without profiling target the wrong thing and add complexity for no gain. Do not optimize code you have not measured. Open the profiler, find the single biggest cost in a representative scene on representative hardware, and fix that. Re-measure to confirm the fix helped before moving on. Profile a release/optimized build where it matters — editor and debug builds lie (editor overhead, no compiler optimization).

Core workflow

  1. Define the target and reproduce. State the goal (e.g. 60 FPS = 16.67 ms/frame) and find a repeatable worst-case scene. "Sometimes slow" is unfixable; a reproducible spike is fixable.
  2. Profile before touching code. Run the engine profiler and read the frame: total frame time, and the split between CPU (game logic, physics, scripts) and GPU (rendering).
  3. Find the bottleneck — CPU or GPU. If GPU time ≫ CPU, attack draw calls/overdraw/shaders/ resolution. If CPU time dominates, attack scripts/physics/allocations. Fixing the wrong side does nothing.
  4. Fix the single biggest cost. Prefer an algorithmic win (do less work, cache, spatial partition, run less often) over micro-optimizing a hot line. Apply the matching shared fix (pooling, batching, allocation removal).
  5. Re-measure on the same scene/hardware. Confirm the number moved. Keep or revert based on data, not intuition.
  6. Set budgets so it stays fixed. Per-frame ms budgets per subsystem, plus asset budgets (texture sizes, triangle counts, draw-call ceilings); add a perf check to verification.
  7. Report measured numbers. State before/after frame time, the bottleneck found, and the fix — never "should be faster". If you could only measure in-editor, say so.
Show full SKILL.md (282 more words)Show less

Patterns

1. Frame budget math (turn "feels slow" into a number)
text
target FPS → frame budget:   60 FPS = 16.67 ms   |   30 FPS = 33.3 ms   |   120 FPS = 8.33 ms
The WHOLE frame (CPU sim + render submit + GPU) must fit the budget; the GPU runs in parallel,
so the slower of CPU-frame and GPU-frame sets your FPS. Allocate sub-budgets, e.g. @60 FPS:
  gameplay/scripts ~5 ms · physics ~3 ms · rendering(CPU submit) ~4 ms · UI/other ~2 ms · slack.
If one subsystem blows its slice, that's your target — not whatever you assumed.
2. Measure with the engine profiler (do this before any fix)
text
Godot 4.x : Debugger ▸ Profiler (script/physics time) and Monitors tab (FPS, draw calls, memory).
            In code: Performance.get_monitor(Performance.TIME_PROCESS) and
            Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME).
Unity 6   : Profiler window (CPU/GPU/Memory/Rendering modules) + Frame Debugger for draw calls.
            In code: a ProfilerRecorder tracking "CPU Main Thread Frame Time" for a HUD/log.
Unreal 5  : `stat unit` (Frame/Game/Draw/GPU ms), `stat fps`, `stat scenerendering` (draw calls);
            Unreal Insights for deep traces.
# Read the split: is the Draw/GPU line the biggest, or the Game/CPU line? That decides the fix.
3. Object pooling (stop allocating/freeing in hot loops)
gdscript
# Bullets, particles, enemies, damage numbers: reuse a fixed set instead of instantiate()/free()
# every frame — that thrashes memory and (in C#) feeds the GC.
var _pool: Array[Node] = []
func acquire() -> Node:
    var n: Node = _pool.pop_back() if not _pool.is_empty() else bullet_scene.instantiate()
    n.set_process(true); n.visible = true
    return n
func release(n: Node) -> void:
    n.set_process(false); n.visible = false       # disable + hide; DON'T free
    _pool.append(n)                                # back to the pool for reuse
# RIGHT: pre-warm the pool at load; reuse. WRONG: instantiate()/queue_free() per shot.
4. Cut draw calls (the most common GPU-side win)
text
Each unique material/texture/state change is roughly a draw call; thousands of them stall the GPU.
- Atlas textures and share materials so sprites/meshes batch into one call.
- Identical meshes → GPU instancing (Unity), MultiMesh / MultiMeshInstance (Godot), Instanced
  Static Mesh (Unreal).
- Static geometry → static batching / baking; mark non-moving objects static.
- Reduce overdraw: limit large overlapping transparent/particle layers (they re-shade pixels).
- Fewer real-time lights/shadows; bake lighting where it doesn't move.
Measure draw calls before and after — the count should drop, and so should GPU frame time.
5. Kill per-frame allocations (GC spikes = stutter)
csharp
// Unity 6 (C#). Allocating every frame fills the managed heap; the GC then stalls a frame.
// WRONG (allocates each call): foreach (var e in FindObjectsOfType<Enemy>()) ...  // + LINQ, new[]
// RIGHT: cache references once, reuse buffers, avoid LINQ/boxing in Update.
void Update() {
    _hits = Physics.RaycastNonAlloc(ray, _hitBuffer);   // reuse a preallocated array
    for (int i = 0; i < _hits; i++) { /* ... */ }       // no per-frame allocation
}
// Godot/GDScript: avoid building new arrays/dictionaries every frame in _process; reuse them.

Pitfalls

  • Optimizing without profiling. The intuitive culprit is usually wrong. Measure first, every time.
  • Profiling the editor / a debug build. Editor overhead and unoptimized code mislead. Profile a release build on target hardware for real numbers.
  • Fixing the wrong side. Micro-optimizing CPU code when the GPU is the bottleneck (or vice versa) changes nothing. Check the CPU-vs-GPU split first.
  • Micro-optimizing over algorithm. Shaving a function when an O(n²) loop or a per-frame full-scene query is the real cost. Reduce the work, don't polish it.
  • Instantiate/free in hot loops. Spawning and destroying bullets/particles every frame causes fragmentation and GC spikes. Pool them.
  • Per-frame allocations / LINQ / boxing in Update (C#) feed the GC → periodic hitches. Cache and reuse.
  • Draw-call explosion from unique materials and unbatched sprites/meshes. Atlas, share materials, instance, batch.
  • Overdraw from stacked transparents/particles/full-screen effects re-shading pixels.
  • No budgets. Without per-subsystem ms and asset ceilings, performance silently regresses; enforce them in your build/CI checks.
  • Optimizing too early. Don't contort a prototype for performance before it's fun or measured.

References

  • For per-engine profiler walkthroughs, the CPU-vs-GPU triage flowchart, a complete pooling manager, batching/instancing rules per engine, allocation/GC guidance, LOD/culling, and asset budgets (texture sizes, triangle counts, audio, mobile thermals), read references/profiling-and-budgets.md.
  • physics-tuning — simulation cost, fixed-step budget, sleeping bodies, broadphase layers.
  • godot-export — release/build settings that affect measured performance.
  • procedural-gen, game-ai — common CPU hotspots (generation, pathfinding) to budget and defer.
  • roguelike, tower-defense, survival-crafting — entity-heavy genres that need pooling/budgets.

© ukanwat, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .claude/skills/performance-optimization of ukanwat/overtime.

  • SKILL.md
  • references/profiling-and-budgets.md

Open the folder on GitHubat commit fc215d4

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in ukanwat/overtime, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Performance Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Performance Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Performance Optimization this skillukanwat/overtime3871 repos~2.3kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
LLM Torch Profiler Analysissgl-project/sglang37k2 repos~6.4kAutomated safety check: PassApache-2.0
Pycrazyguitar/pysheeet8.2k—~886Automated safety check: PassMIT
Cmux Debugging Guidemanaflow-ai/cmux28k1 repos~1.1kAutomated safety check: PassCustom licence
Electron Heap Snapshot Analysiskeybase/client9.3k—~875Automated safety check: PassBSD-3-Clause

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • LLM Torch Profiler Analysis

    sgl-project/sglang

    Unified LLM torch-profiler triage skill for sglang, vllm, TensorRT-LLM, and TokenSpeed.

    37k GitHub starsUsed in 2 repos~6.4k tokens
    DevelopmentAuto-check passed
  • Py

    crazyguitar/pysheeet

    Comprehensive Python programming reference covering syntax, concurrency, networking, databases, ML/LLM development, and HPC.

    8.2k GitHub stars~886 tokensUpdated today
    DevelopmentAuto-check passed
  • Cmux Debugging Guide

    manaflow-ai/cmux

    Covers debug logging, the Debug menu, profiling rules and runtime pitfalls for working on the cmux macOS terminal app.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Analyzes V8, Chrome and Electron .heapsnapshot files with Node scripts to find memory leaks, detached DOM nodes and the retainer paths that keep objects alive.

    9.3k GitHub stars~875 tokensUpdated today
    DevelopmentAuto-check passed
  • Runs controlled JMH experiments on the Caffeine cache to find shared contention and hot-path waste, then reviews correctness and returns a reviewable patch.

    18k GitHub stars~2.6k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes

More from ukanwat/overtime

All 21 skills in this repo
  • Audio Design

    ukanwat/overtime

    Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via layering and re-sequencing, SFX variation, and beat synchronization.

    387 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Camera Systems

    ukanwat/overtime

    Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person orbit with collision and first-person look; plus multi-target framing…

    387 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Dialogue Systems

    ukanwat/overtime

    Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and Yarn Spinner or a custom data-driven…

    387 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Game AI

    ukanwat/overtime

    Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A pathfinding — engine-neutral algorithms that pair with the detected engine's navigation API.

    387 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Game Feel

    ukanwat/overtime

    Add "juice" and game feel that makes actions satisfying — screen shake, hit-stop/freeze frames, tweened/eased motion, squash & stretch, knockback, and layered audio-visual feedback — as…

    387 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Game UI UX

    ukanwat/overtime

    Design and build game UI/UX — HUDs, menus, and overlays — that survive every screen: anchor- based responsive layout, resolution/aspect scaling and safe areas, keyboard/gamepad focus navigation, a…

    387 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Categories

Questions about Performance Optimization

What does Performance Optimization do?

Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object…. Performance Optimization is an agent skill from ukanwat/overtime. Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object pooling, draw-call batching, fewer allocations/GC spikes, and asset budgets.

When should I use Performance Optimization?

Performance Optimization fits situations like: the user mentions performance; low/dropping FPS; garbage collection/GC spikes; the game runs slow.

How do I install Performance Optimization in Claude Code?

Run `npx skills add ukanwat/overtime --skill performance-optimization -a claude-code`. Or copy the skill folder (.claude/skills/performance-optimization in ukanwat/overtime) into .claude/skills/performance-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Performance Optimization in Codex?

Run `npx skills add ukanwat/overtime --skill performance-optimization -a codex`. Or copy the skill folder (.claude/skills/performance-optimization in ukanwat/overtime) into .agents/skills/performance-optimization in your project. Codex loads it when a task matches its description.

Can I use Performance Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ukanwat/overtime --skill performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-optimization, .gemini/skills/performance-optimization, .github/skills/performance-optimization and .opencode/skills/performance-optimization in your project.

What does Performance Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Performance Optimization is instructions for the agent only. Compatibility (from SKILL.md): Engine-agnostic methodology; profiler/tooling notes for Godot 4.x, Unity 6, and Unreal 5. Pairs with physics-tuning and the engine skills..

Does Performance Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Performance Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Performance Optimization use?

Performance Optimization is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Performance Optimization use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Performance Optimization?

Skills that share tags, products or a category with Performance Optimization: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), LLM Torch Profiler Analysis (sgl-project/sglang, 37k stars), Py (crazyguitar/pysheeet, 8.2k stars) and Cmux Debugging Guide (manaflow-ai/cmux, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Performance Optimization?

ukanwat (a GitHub user) maintains it in ukanwat/overtime, which has 387 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 6, 2026.

Source: ukanwat/overtime on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.