performance-audit
Skill2 starsChanged 6 months agoMITView on GitHub
Audit a Godot 4.x project for common performance pitfalls — repeated node lookups, _process abuse, missing pooling, untyped collections, missing occlusion, heavy fragment shaders. Reports findings with severity and fix.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- LeonardoEnnes/ai-engineering-toolkittheir own version, first seen Nov 8, 2026
- nseney1/Soma-Governancetheir own version, first seen Nov 1, 2026
- RBraga01/a-teamtheir own version, first seen Nov 1, 2026
- nseney1/Aegis-Guardrailstheir own version, first seen Oct 25, 2026
- greglas75/zuvotheir own version, first seen Oct 16, 2026
- arndvs/ctrlshfttheir own version, first seen Oct 15, 2026
Used with
Projects with it also use incident-response, threat-model and 7 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.
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 4 projects that use this
OpenAISkillthreat-model
Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 8 projects that use this
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 4 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- octanejs/octane★ 1.5ksame name
- gwdevhub/GWToolboxpp★ 1.1ksame name
- termio-sh/termio★ 787same name
- me2resh/apexyard★ 542same name
- wallstop/unity-helpers★ 176same name
- RBraga01/a-team★ 24same name
- patrickserrano/skills★ 13same name
- fritzprix/libr-agent★ 11same name
- greglas75/zuvo★ 7same name
- nseney1/Aegis-Guardrails★ 4same name
10 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 repository33 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- bootstrap-godot-projectSkill
- codebase-surveySkill
- create-autoloadSkill
- create-componentSkill
- create-resourceSkill
- create-sceneSkill
- create-state-machineSkill
- export-configSkill
- feature-planSkill
- feature-specSkill
- game-brainstormingSkill
- gdd-writerSkill
- genre-pack-3d-actionSkill
- genre-pack-platformerSkill
- genre-pack-topdownSkill
- genre-pack-turnbasedSkill
- godot-patternsSkill
- gut-test-writerSkill
- networking-foundationSkill
- save-schema-migrationSkill
- setup-collision-layersSkill
- setup-git-godotSkill
- setup-input-mapSkill
- setup-localizationSkill
- setup-save-systemSkill
- sfx-generatorSkill
- shader-writerSkill
- subagent-dev-modeSkill
- ui-patterns-godotSkill
- update-docsSkill
- using-godot-superpowersSkill
- writing-game-planSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
1
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 64
If the path is a string literal, switch to preload.
- Very specific: line 100
Check for GPUParticles2D / GPUParticles3D with amount over a few thousand or process_material rebuilt every emit.
- Very specific: line 104
If 100+ instances of the same mesh, suggest MultiMeshInstance3D (or MultiMeshInstance2D).
- Distinctive: line 116
Look for shaders with:
- Very specific: line 196
Run code-reviewer agent for a deeper GDScript review (overlaps slightly with this audit but goes wider into correctness)
“Common” is measured: kept by at least 6 in 10 of the 17 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
Performance Audit
Static-analysis-style scan plus runtime suggestions. Run this when frame rate drops, before a milestone, or when adding many entities at once.
Audit checklist
1. Repeated node lookups in hot paths
grep -rn '\$' --include='*.gd' scripts/ scenes/ | \
grep -E '_process|_physics_process' | \
grep -v '@onready'Any $Path or get_node() inside _process / _physics_process is a candidate for @onready. Severity: HIGH.
2. find_child / find_node calls
grep -rn 'find_child\|find_node' --include='*.gd'find_child walks the tree. Use unique names (%) or direct @onready references. Severity: HIGH.
3. Untyped collections used for homogeneous data
grep -rn ': Array =\|: Dictionary =' --include='*.gd' scripts/Replace Array → Array[T], Dictionary → Dictionary[K, V] where contents are uniform. Severity: MEDIUM.
4. _process running on idle nodes
Any node with _process but no actual work happening every frame:
grep -B 1 -A 5 'func _process' --include='*.gd' -rn scripts/Disable with set_process(false) until needed, or use Timer for periodic work. Severity: MEDIUM.
5. instantiate() in hot loops
grep -rn 'instantiate' --include='*.gd' scripts/ | \
grep -v '_ready\|enter\|setup'Frequent instantiation = pool candidate. Severity: HIGH if in _process / _physics_process / spawn loops.
6. load() where preload() works
grep -rn 'load(' --include='*.gd' scripts/ | grep -v 'preload\|^.*://\|"user://'If the path is a string literal, switch to preload. Severity: LOW but free.
7. change_scene_to_file repeated
grep -rn 'change_scene_to_file' --include='*.gd'Re-parses on every call. Switch to change_scene_to_packed(packed) with a preloaded PackedScene. Severity: MEDIUM.
8. Missing @onready for cached refs
grep -rn '^var .* = \$' --include='*.gd'var x = $X runs at instantiation, not when the tree is ready — fragile. Always @onready. Severity: HIGH (correctness too).
9. TileMap (deprecated in 4.3+)
grep -rn '\[node .* type="TileMap"\]' --include='*.tscn'Migrate to TileMapLayer (one node per layer). Severity: MEDIUM.
10. ParallaxBackground / ParallaxLayer (deprecated in 4.3+)
grep -rn 'type="ParallaxBackground"\|type="ParallaxLayer"' --include='*.tscn'Migrate to Parallax2D. Severity: LOW.
11. Particles config
Check for GPUParticles2D / GPUParticles3D with amount over a few thousand or process_material rebuilt every emit. Severity: MEDIUM.
12. Many identical meshes
If 100+ instances of the same mesh, suggest MultiMeshInstance3D (or MultiMeshInstance2D). Severity: HIGH for stress scenes.
13. Missing occlusion (3D)
Project has 3D scenes but no OccluderInstance3D / Occlusion Culling enabled in the World Environment? Severity: MEDIUM.
14. Missing VisibleOnScreenNotifier for off-screen entities
Entities that _physics_process even when off-screen can be cheaper if disabled when invisible. Severity: LOW.
15. Fragment shader cost
Look for shaders with:
- Loops over more than ~16 iterations
- Multiple
texture()calls withscreen_texture/depth_texture - Per-pixel matrix math
Severity: HIGH on web/mobile, MEDIUM on desktop.
16. Resource not duplicated when mutated
grep -rn '\.tres' --include='*.gd' | grep -v 'duplicate\|preload'Mutating a shared Resource mutates it for every consumer. Severity: HIGH (bug, not just perf).
17. Signal connected multiple times
grep -rn '\.connect(' --include='*.gd' | wc -l
# review for any signal connected in _ready of an instanced scene that's spawned oftenWithout CONNECT_ONE_SHOT or a guard, repeated connects trigger duplicate handlers. Severity: MEDIUM (bug + perf).
18. _input vs _unhandled_input
_input runs even after UI consumes the event. Use _unhandled_input unless you specifically need to override UI. Severity: LOW.
Runtime profiling
Direct the user to:
- Debugger → Profiler — start before reproducing, sort by self time. Look for unexpected
_processconsumers. - Debugger → Visual Profiler — GPU-side, identifies render passes.
- Debugger → Monitor:
- Object Count — should be stable; growth = leak
- Node Count — bounded; growth in a long session = orphaned scenes
- Resource Count — bounded; same logic
- FPS — drops correlate with what frame in transcript
Engine.get_frames_per_second()— log periodically during the suspect activity.Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME)— if > ~3000 on desktop or > ~1000 on web/mobile, batch with MultiMesh.
Reporting format
=== Performance Audit ===
HIGH (3 findings):
scripts/player/player.gd:42 — get_node("Sprite2D") in _physics_process; cache via @onready
scripts/enemies/spawner.gd:88 — instantiate() in _process; pool via genre-pack
scenes/level_01.tscn — 600 identical TreeMesh instances; switch to MultiMeshInstance3D
MEDIUM (5 findings):
...
LOW (2 findings):
...
Recommended next steps:
1. Apply HIGH fixes
2. Profile after each fix to confirm impact
3. Re-run auditAnti-pattern reference
| Anti-pattern | Symptom | Fix |
$Path lookup in _process | Stable frame drop on a scene | @onready |
instantiate() in spawn loop | Frame hitches on burst | Object pool |
Shared Resource mutated | Confusing stat / progression bugs | .duplicate(true) |
_process on idle entities | High idle CPU | set_process(false) until needed |
_input instead of _unhandled_input | Input fires through UI | Switch to _unhandled_input |
Untyped Array | Missed compile-time errors | Array[T] |
| 100+ identical MeshInstance3D | GPU draw call spike | MultiMeshInstance3D |
| Heavy fragment shader on big quad | GPU fragment-bound | Reduce sample count, simpler ops |
Big _physics_process switch on state | Hard to refactor | State machine (create-state-machine) |
See also
- Run
code-revieweragent for a deeper GDScript review (overlaps slightly with this audit but goes wider into correctness) performance-profileragent — for interactive investigation with the profiler
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.

