performance
Skill1 starsChanged yesterdayApache-2.0View on GitHub
Use when a Godot game stutters, hitches, drops frames, runs hot, or before a milestone or release where frame rate matters.
92 other projects use a version of this.
Adopted by
Most recently taken up by
- primer/reacttheir own version, first seen Nov 29, 2026
- uac-ops/founder-stacktheir own version, first seen Nov 29, 2026
- Bossmann007/cursor-kittheir own version, first seen Nov 29, 2026
- rshankras/claude-code-apple-skillstheir own version, first seen Nov 29, 2026
- YauhenBichel/engineering-skillstheir own version, first seen Nov 29, 2026
- atstaeff/ai-agentstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use app-brief, design-from-app and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
StijnusSkillapp-brief
One-page brief (docs/BRIEF.md) for a new macOS app, written before any code. Use when the user has an app idea, wants to replace an app they pay for, or the research and clone skills are done.
Also in 3 projects that use this
StijnusSkilldesign-from-app
Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type, colors, icons), building its parts, and comparing pixel by pixel until they match. Use when the user names an app whose look they want, shares screenshots of one, or says "make it look like X".
Also in 3 projects that use this
FlorianBruniauxSkilltdd-rust
Also in 3 projects that use this
launchapp-devSkilllayout-grid
Define responsive layout grid systems with columns, gutters, margins, and breakpoint behavior.
Also in 3 projects that use this
RodrigoTomeESSkillweb-quality-audit
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
Also in 9 projects that use this
ufodev-ioSkillsecurity-guardian
Comprehensive security layer for all interactions with Claude: audits code, dependencies, commands, configs, and AI-generated output for vulnerabilities. Protects against prompt injection, data leaks, unsafe advice, and social engineering. Works in Cursor, Claude Code, claude.ai, and API contexts. Use always as a background security protocol in any Claude-powered environment.
Also in 3 projects that use this
- +1 more from Stijnus
Other versions92 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 92
- rtk-ai/rtk★ 88ksame name
- millionco/react-doctor★ 15ksame name
- midudev/preguntas-entrevista-react★ 7.8ksame name
- BuilderIO/agent-native★ 7.8ksame name
- ethereum/ethereum-org-website★ 6ksame name
- primer/react★ 3.9ksame name
- plugin87/ux-ui-agent-skills★ 3.3ksame name
- static-web-server/static-web-server★ 2.4ksame name
- daveebbelaar/bama★ 1.7ksame name
- lichtblick-suite/lichtblick★ 1.3ksame name
82 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algorithmsSkill
- animationSkill
- anti-cheatSkill
- asset-pipelineSkill
- automation-hooksSkill
- calendarSkill
- cameraSkill
- console-certSkill
- debug-toolsSkill
- determinismSkill
- game-aiSkill
- game-audioSkill
- game-dataSkill
- game-designSkill
- game-juiceSkill
- game-planSkill
- game-playtestSkill
- gameSkill
- game-telemetrySkill
- godot-addonsSkill
- godot-diagnoseSkill
- godot-editor-bridgeSkill
- godot-export-releaseSkill
- godot-pitfallsSkill
- godot-shaders-vfxSkill
- godot-test-loopSkill
- inputSkill
- kit-reviewSkill
- kitSkill
- legalSkill
- llmSkill
- localizationSkill
- lookSkill
- mathSkill
- mobile-webSkill
- moddingSkill
- multiplayerSkill
- narrativeSkill
- new-gameSkill
- patternsSkill
- procgenSkill
- progressionSkill
- release-readinessSkill
- retroSkill
- savesSkill
- serversSkill
- steamSkill
- store-pageSkill
- typographySkill
- ui-accessibilitySkill
- ui-flowsSkill
- verify-before-doneSkill
- weekly-reviewSkill
- xrSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 63 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Read the hitch timestamps: If a hitch moves when you change -Warmup, it is a measurement artifact.
- Distinctive: line 43
Before optimising, write the budget down: 33.3 ms a frame at 30 fps, 16.7 ms at 60.
- Very specific: line 62
Start at hotspots[0].centre.
- Very specific: line 132
If you still test one: run from the editor, Godot reads its own runtimeconfig, so only DOTNET_* environment variables apply.
- Very specific: line 169
If V-Sync is "on" but the game runs at thousands of FPS, the driver is ignoring it.
- Distinctive: line 173
When the GPU or V-Sync is the limit, every queued frame is input lag.
“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frame pacing and performance (Godot 4.7, C#)
Budget, measure, change one thing, measure again. Average FPS hides what players feel; the numbers that matter are
per-frame times, the slowest frames, and when and where they happen. Sources for the C# measurements:
${CLAUDE_PLUGIN_ROOT}/docs/profiling-and-builds.md.
Measure
pwsh ${CLAUDE_PLUGIN_ROOT}/ci/godot/hyperdot.ps1 bench -Json -Quiet -Scene res://levels/Boss.tscn -GameArgs '--stress' -Seconds 30 -Warmup 5 -Uncapped -Label "uncapped 1080p" -Resolution 1920x1080
pwsh ${CLAUDE_PLUGIN_ROOT}/ci/godot/hyperdot.ps1 bench -Json -Quiet -Scene res://levels/Boss.tscn -GameArgs '--stress' -Seconds 30 -MaxFps 60 -BudgetMs 16.7 -Label "60 cap"bench records the wall-clock time of every frame after a warm-up and returns fps.low1/fps.low01 (1% and 0.1% lows),
frameMs.p50/p99/max, frames over 20 and 33 ms, a frameHistogram (shares of frames at 120, 60, 30 and 20 fps or
slower), a timestamped hitches[] log, the slowest places (hotspots), draw calls, the scene's load time (loadMs, from
load() to its first frame) and every custom monitor's delta.
Each run appends a labelled row to bench-results/bench.csv, so runs stay comparable. Several benchmark runs are a good job
for the godot-verifier subagent, which returns the numbers without the logs. -BudgetMs fails the run
(bench-over-budget) when p99 is above the budget; -MaxDrawCalls (bench-over-draw-calls, the average a frame) and
-MaxLoadMs (bench-over-load-time) hold the other two budgets.
- Benchmark the worst case, not the menu: the heaviest scene with the most on screen. Give the game a flag for it
(
--stress: a boss that never dies, every effect on) and pass it with-GameArgs(automation-hooks). - Sweep one knob to find where it crosses the budget:
bench -Sweep enemies=10,50,200 -BudgetMs 16.7runs once per value with--enemies=<n>, one CSV row each;sweep.lastWithinLimitsis the last value under the budget. - Uncapped, then capped.
-Uncapped(V-Sync off) shows the headroom;-MaxFps 60or V-Sync on shows whether pacing is stable. - Skip the warm-up (
-Warmup); first frames compile shaders and fill caches. - Use a display. Without
-Headless, frames are really drawn.-Headlessmeasures CPU time only (draw calls 0) and is what CI can run. - Read the hitch timestamps. If a hitch moves when you change
-Warmup, it is a measurement artifact; if it stays tied to a game event (first hit of a fight), it is real. - Find the scripting layer's limits in the first week. Bench the hot loop (pathfinding, the simulation tick, many
bodies) as first written, in GDScript if that is the game's language, and move only what
benchshows over budget to C# or a server. Toru Hidaka knew BASIC's limits within a month and turned to machine language (Untold History).
Budget per area
Before optimising, write the budget down: 33.3 ms a frame at 30 fps, 16.7 ms at 60. First take off what every frame pays
(HUD, post-processing, the player) and a margin of about 2 ms for the day something goes wrong; then split what is left
per area with whoever owns the art and design, by what the area is for: a combat arena spends it on AI, physics and
effects, a vista on scenery, a lighting showcase on lights. Bench each area against its own number (-BudgetMs, with
-Scene or a -GameArgs flag that starts there). An area over budget becomes a task for its owner (plan -Do add -Title)
with the milliseconds over and several ways to win them back: the owner picks which.
Where it is slow
pwsh ${CLAUDE_PLUGIN_ROOT}/ci/godot/hyperdot.ps1 bench -Json -Quiet -Scene res://levels/Canyon.tscn -GameArgs '--autoplay' -Seconds 120 -HotspotCell 20A level's frame times say that it is slow, not where; without a place, optimising means wandering the level. bench pairs
each frame with the root viewport's camera (the Camera3D's position, or the screen centre under a Camera2D) and
returns hotspots: grid cells (10 m in 3D, 512 px in 2D, or -HotspotCell) with the worst p99 first, each with
centre, frames, p99Ms and maxMs. Each hitches[] entry has a pos too.
- Cover the level the same way every run: a bot route, an autoplay flag or a scripted fly-through (
automation-hooks). - Start at
hotspots[0].centre. A cell with fewframeswas crossed quickly, so one slow frame sets its p99: readmaxMsand the hitches there before believing it. - Bench a short run that starts at that place, with a window and
-Uncapped, and comparegpuMs.avgwithframeMs.avg: GPU time well under the frame time means the CPU is the limit (scripts, physics, AI, spawning); close to it means drawing is. - Fix one thing, run the same route, compare the cell.
cameranone(no camera, or one inside aSubViewport) gives no places: usehitches[].tinstead.
What slow places usually hold
In Halo 4's last year of optimisation most fixes were content, not code, and kept the look
(${CLAUDE_PLUGIN_ROOT}/docs/gdc/halo-4-content-performance.md):
- Forgotten things. Dynamic lights left in a corner nobody visits (a few tiny spot lights cost 3 ms of a 33 ms frame), light ranges far
bigger than the light looks (
OmniLight3D.OmniRange,SpotLight3D.SpotRange, withShadowEnabled), scenery drawn far beyond where anyone can see it (pull inVisibilityRangeEnd,asset-pipeline), two post effects doing one job. - One huge mesh. A terrain or building in one piece is processed whole when a sliver is on screen; Godot culls per
MeshInstance3D, so cut it into chunks. - Detail too small to see where the asset is used (made for a close-up, placed far away): delete it or add a LOD.
- Transparency where it is not needed. Cut alpha-blended cards (sky, distant ridges, water) so only the edge strip
blends and the inside is opaque; fewer, richer particles instead of many layers (
godot-shaders-vfx). - General shaders. Copy a shader for one use and drop the terms that do not show there, or pack channels.
- Spawning all at once. Stagger AI and physics objects spawned before anyone can see them; simplify collision shapes that rays hit often.
- Prove it looks the same, blind. Show the art lead several copies, one optimised; if they cannot pick it out, keep it.
- Content players build cannot be tuned: give them a placement budget.
C#: kit runs and bench are Debug builds
Godot builds and runs a C# game in Debug, and a plain library the game references (match rules, a simulation, a server's
snapshot code) inherits it: no optimisation, so its hot paths measure slower in bench than they will ship. Set
<Optimize>true</Optimize> in that library's csproj for every configuration before judging it against a budget, and measure
before and after; doctor lists the referenced libraries that do not (INFO).
C#: zero garbage in the frame loop
A GC collection mid-fight is a hitch. Report collections as a custom monitor so bench shows them (customMonitors):
public override void _Ready() =>
Performance.AddCustomMonitor("game/gc_gen0", Callable.From(() => GC.CollectionCount(0)));
public override void _ExitTree() => Performance.RemoveCustomMonitor("game/gc_gen0"); // or the engine can crash on exitdelta should be 0 over a fight. Common allocations:
| Allocates every frame | Instead |
Input.IsActionPressed("jump"): a new StringName per call | static readonly StringName Jump = "jump"; |
reading Label.Text to check a value | keep your own field |
new StandardMaterial3D() per hit flash | create the overlay once per object, re-attach it |
| a node or tween per particle or damage number | pool CpuParticles3D (Restart()) and Label3D; animate them in one loop |
LINQ, string interpolation, closures in _Process | plain loops, cached strings |
Watch pause time, not only counts: Performance.AddCustomMonitor("game/gc_pause_ms", Callable.From(() =>
GC.GetTotalPauseDuration().TotalMilliseconds)). Custom monitors work in release exports; there TimeProcess and
TimePhysicsProcess are in seconds and MemoryStatic is always 0.
GC settings do not cure hitches; pooling does. Measured on 4.7.2 (3000 frames, about 80 MB kept alive, garbage that lives a while):
| Setting | Frames over 8 ms | Worst frame |
| Default | 58 | 34 to 56 ms |
DOTNET_gcConcurrent=0 | 17 | 128 to 153 ms |
DOTNET_gcServer=1 | 1 | 162 to 172 ms (and a heap per core) |
| The same work, pooled | 0 | 2.1 ms |
Settings trade many medium pauses for fewer huge ones; SustainedLowLatency left the slow frames as they were, and
TieredPGO, tiered compilation and ReadyToRun made no measurable difference under light garbage.
If you still test one: run from the editor, Godot reads its own runtimeconfig, so only DOTNET_* environment
variables apply; exported games read the game's, so csproj settings apply there. <ServerGarbageCollector> is ignored
in both; <RuntimeHostConfigurationOption Include="System.GC.Server" Value="true" /> works.
Find the cause
- The editor's Profiler does not see C# ("does not currently support C# scripts"); it shows engine time only. The Visual Profiler times rendering only.
dotnet-traceattaches to a running game (editor run or exported release), with the game's own process id:dotnet-trace collect -p <pid> --profile dotnet-sampled-thread-time --duration 00:00:00:10for where C# time goes,--profile gc-verbosefor which methods allocate;dotnet-trace convert x.nettrace --format speedscopeto read it.dotnet-gcdump collect -p <pid>lists what fills the heap.DOTNET_EnableDiagnostics=0blocks them.dotnet-countersshows nothing for a Godot game: Godot starts .NET without aMain, so the runtime's counters never start. In a debug build, start them yourself (using System.Reflection;), thendotnet-counters collect -p <pid> --counters System.Runtime:#if DEBUG typeof(System.Diagnostics.Tracing.EventSource).Assembly.GetType("System.Diagnostics.Tracing.RuntimeEventSource") ?.GetMethod("Initialize", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)?.Invoke(null, null); #endif- Engine (C++) time: Tracy, Perfetto and Instruments need a custom engine build (
scons profiler=tracy profiler_path=...); official 4.7.2 builds include Perfetto for Android only, and no desktop debug symbols. --benchmarkand--benchmark-filetime startup and shutdown only (editor builds), not frames;bench'sloadMsand-MaxLoadMshold one scene's load time.--debug-stringnamesprints everyStringNameallocated, which finds per-frame ones from C#.
First-use hitches are pipeline compiles
A one-frame spike the first time something appears (first enemy hit, first popup) is usually a shader or text pipeline compiling.
- During a loading or intro screen, show one of every visual (enemies, projectiles, pickups, popup text, tinted variants) tiny but on screen for a frame, then free it.
- Pre-rasterise glyphs at every size you use:
font.RenderRange(0, new Vector2I(size, outline), ' ', '~');. For text that shrinks to fit, fit a sample first to learn the final size.
Renderer and V-Sync
- If V-Sync is "on" but the game runs at thousands of FPS, the driver is ignoring it. One project saw this with the Compatibility
(OpenGL) renderer on an NVIDIA driver; Mobile on Vulkan (
rendering/rendering_device/fallback_to_opengl3=true) fixed it. - Safety net: if V-Sync is on but the first second runs far above the refresh rate, set
Engine.MaxFpsto the refresh rate. A fixed "refresh + 2" cap caused beat drops instead. - When the GPU or V-Sync is the limit, every queued frame is input lag. Shadow of War's pipeline (simulation, render,
driver, GPU, display queue) once put the screen about 200 ms behind the input (Piotr Mintus, GDC 2018); they stretched
the simulation 1 ms a frame until the display queue drained. Keep
rendering/rendering_device/vsync/frame_queue_sizeat its default 2 and measure input lag in the GPU-bound case, not only in the menu. - Movement that judders on a 144 Hz screen while the frame rate is fine: a body moved in
_PhysicsProcessat 60 Hz withphysics/common/physics_interpolationoff (the default;doctorwarns). Turn it on, and callResetPhysicsInterpolation()after a teleport.
Cheap wins
MultiMeshfor repeated static props: one draw call per kind. WatchdrawCallsinbench.- Billboards should not cast shadows (their shadow is a flat silhouette).
- In 3D, VRAM-compressed textures with mipmaps (never for pixel art or UI:
asset-pipeline); particle textures at most 256 px; audio as mono QOA around 32 kHz. - Shadow map 2048 with low soft-shadow quality is enough for a tilted top-down camera.
- Content that rarely changes (a board drawn on the floor): a
SubViewportwithUpdateMode.Once, re-triggered only on change. - Scale CPU work from frame time, not only resolution: Shadow of War pushed character LODs out when rendering neared
30 ms of a 33 ms frame, and paused streaming high mips if frames still dropped. Past about 90% of the budget for
several frames, raise
Viewport.MeshLodThresholdor pull inVisibilityRangeEnd; restore below a lower mark, held longer, so it never flips frame to frame. - AI that re-plans, paths or rebuilds influence maps for many agents in one frame: spread it under a fixed per-frame budget
(
game-ai,FrameBudget); 200 GOAP re-plans took 4 to 10 ms in one frame here, about 1 ms a frame over 4 to 6.
A Unity checklist, in Godot 4.7
Items from The Gamedev Guru's Performance Optimization Checklist (Unity 2020+, Lite v2) whose Godot counterpart exists in 4.7.2 (checked headless); its draw-call targets ("< 100 on mobile, < 1000 on desktop") are a starting point for a budget, not Godot measurements.
- "Restrict cameras' culling mask":
Camera3D.CullMaskagainstVisualInstance3D.Layers, so a minimap or second camera draws only its layers. - "Use occlusion culling in interiors":
OccluderInstance3Ddoes nothing untilrendering/occlusion_culling/use_occlusion_cullingis on (default off;doctorwarns). - "Pause out-of-screen subsystems":
VisibleOnScreenEnabler2D/3Dstops its target's processing off screen. - "Adapt the budget allocated to physics":
physics/common/max_physics_steps_per_frame(default 8) caps the steps one frame may catch up on, so a slow frame cannot snowball into ever slower ones. - Simple colliders:
ConcavePolygonShape3D(the importer's-col) for static level geometry only; moving bodies get convex or primitive shapes. Give each kind of body its ownCollisionLayerand aCollisionMaskwith only the pairs that must meet. - Baked over real-time light:
LightmapGIwith static lights instead of SDFGI or VoxelGI where the scene allows;ReflectionProbe.UpdateModeEnum.Once, notAlways. - "Avoid multi-pass shaders":
Material.NextPassdraws the mesh again. "Don't use GrabPass on mobile": a shader that readshint_screen_texturecopies the screen. - Loading screens: a small scene that stays animated while
ResourceLoader.LoadThreadedRequestloads the next one andLoadThreadedGetStatusreports progress. Measure load time too (a test scene and the real one, debug build included).
Done means
The worst-case scene meets the budget with V-Sync on and off, at the target resolution, in the window modes you ship (windowed,
borderless, fullscreen) and every other mode (split screen), with zero GC collections in the frame loop, and no area over
its own budget. In-game counters and profilers cost time themselves: confirm the final numbers on a release export that
logs frame times and little else. Record the bench.csv rows in the plan's beta gate
(game-plan) and keep the numbers from before and after each optimisation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

